public class LockedFileInferenceGraph
extends org.squashtest.tm.domain.library.structures.LibraryGraph<org.squashtest.tm.domain.NamedReference,org.squashtest.tm.service.internal.deletion.LockedFileInferenceGraph.Node>
| Constructor and Description |
|---|
LockedFileInferenceGraph() |
| Modifier and Type | Method and Description |
|---|---|
List<org.squashtest.tm.service.internal.deletion.LockedFileInferenceGraph.Node> |
collectDeletableNodes()
Once the locks are resolved, will return the nodes that are eventually
deletable.
|
List<org.squashtest.tm.service.internal.deletion.LockedFileInferenceGraph.Node> |
collectLockedCandidates()
Once the locks are resolved, will return the list of nodes that are both
locked and candidates.
|
List<org.squashtest.tm.service.internal.deletion.LockedFileInferenceGraph.Node> |
collectLockedNodes()
Once the locks are resolved, returns all the nodes that are locked.
|
List<org.squashtest.tm.service.internal.deletion.LockedFileInferenceGraph.Node> |
collectLockers()
Once the locks are resolved, return the list of nodes that are locked and
were not candidates.
|
boolean |
hasLockedFiles() |
void |
init(org.squashtest.tm.domain.library.structures.LibraryGraph<org.squashtest.tm.domain.NamedReference,org.squashtest.tm.domain.library.structures.LibraryGraph.SimpleNode<org.squashtest.tm.domain.NamedReference>> initialGraph) |
void |
reset() |
protected void |
resolveLockedFiles()
That method will check that if a test case is candidate to deletion, all
test cases calling it directly or indirectly will be deleted along.
|
void |
setCandidatesToDeletion(List<Long> candidates) |
addEdge, addNode, cardEdge, collect, createIfNotExists, disconnect, filter, filterAndcollect, getChildless, getNode, getNodes, getOrphans, hasEdge, mergeGraph, removeAllEdges, removeEdge, removeNode, substractGraphpublic void init(org.squashtest.tm.domain.library.structures.LibraryGraph<org.squashtest.tm.domain.NamedReference,org.squashtest.tm.domain.library.structures.LibraryGraph.SimpleNode<org.squashtest.tm.domain.NamedReference>> initialGraph)
public void reset()
protected void resolveLockedFiles()
That method will check that if a test case is candidate to deletion, all test cases calling it directly or indirectly will be deleted along. If so the test case is deletable, else it is locked.
Requires the graph to be built. The graph must be acyclic, of fear my wrath.
algorithm :note : the algorithm starts from the parent nodes of the graph and explore the nodes breadth-first. So we are sure that all parent nodes will be processed before their children are (and so the algorithm works).
public List<org.squashtest.tm.service.internal.deletion.LockedFileInferenceGraph.Node> collectLockedNodes()
public List<org.squashtest.tm.service.internal.deletion.LockedFileInferenceGraph.Node> collectLockedCandidates()
public List<org.squashtest.tm.service.internal.deletion.LockedFileInferenceGraph.Node> collectLockers()
public List<org.squashtest.tm.service.internal.deletion.LockedFileInferenceGraph.Node> collectDeletableNodes()
resolveLockedFiles() for the reasons of that
statement).public boolean hasLockedFiles()
Copyright © 2010–2017 Henix, henix.fr. All rights reserved.