com.ptc.windchill.upgrade.ius
Class DependencyGraphModel.ConflictDetector
java.lang.Object
com.ptc.windchill.upgrade.ius.DependencyGraphModel.ConflictDetector
- Enclosing class:
- DependencyGraphModel
- private class DependencyGraphModel.ConflictDetector
- extends Object
Searches for required/excludes conflicts in the dependency graph.
For example, a graph that looks like the following contains conflicts.
D--->B--->A
D--->C-/->A
This is a problem because D both requires A (transitively) but is
also excluded by it.
Currently, it is a brute force search with recursively traverses
from each node along all possible paths to graph leaves. It tracks
the boolean state at each node along a path inverting the state for
ExcludingEdges and retaining the same state for RequiringEdges.
As leafs are reached the state is recorded. If a leaf is reached from
a particular source node an the state along that path is different than
the state reached along a different path, then there is a conflict
and an exception will be thrown.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
edgeStack_
private Stack edgeStack_
leafRegistry_
private HashMap leafRegistry_
DependencyGraphModel.ConflictDetector
public DependencyGraphModel.ConflictDetector()
- Create an instance.
checkForConflictingDependencies
public void checkForConflictingDependencies()
throws DependencyException
- Perform the check.
- Throws:
DependencyException
checkForConflictingDependenciesFrom
private void checkForConflictingDependenciesFrom(DependencyGraphModel.Node node)
throws DependencyException
- Throws:
DependencyException
recursivelyCheckForConflictingDependenciesFrom
private void recursivelyCheckForConflictingDependenciesFrom(DependencyGraphModel.Node node,
boolean state)
throws DependencyException
- Throws:
DependencyException