|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.upgrade.ius.DependencyGraphModel
Maintains a graph of interdependencies betwee all the updates in a particular UpdateStore Provides an easy way to ask for predecessors and successors of an IncrementalUpdate. It will detect if there are dependency cycles between updates. It will also detect if there is more than one dependency path from an update to another where there are required/exclusion conflicts.
IncrementalUpdate
,
UpdateStore
Nested Class Summary | |
private class |
DependencyGraphModel.ConflictDetector
Searches for required/excludes conflicts in the dependency graph. |
private class |
DependencyGraphModel.CycleDetector
Searches for cycles in the dependency graph. |
private class |
DependencyGraphModel.Edge
Generic edge class. |
private class |
DependencyGraphModel.ExcludingEdge
Edge to denote an exclusion dependency as: "If the to-node is run, it precludes the from-node from running" |
private class |
DependencyGraphModel.InvalidVersionOrderingDetector
|
private class |
DependencyGraphModel.Node
A node in the dependency graph. |
private class |
DependencyGraphModel.RequiringEdge
Edge to denote an required dependency as: "The to-node is required for the from-node to work" |
Field Summary | |
private static String |
CLASSNAME
|
private static boolean |
DEBUG
|
private ArrayList |
edges_
|
private static String |
EOL
|
private HashMap |
fromKeyedEdges_
|
private List |
iuSequence_
|
private HashMap |
keyedNodes_
|
private HashMap |
keyedUpdates_
|
private static DebugWriter |
LOG
|
private String |
storeDescription_
|
private HashMap |
toKeyedEdges_
|
Constructor Summary | |
DependencyGraphModel()
Create a model that is a snapshot of the dependencies between incremental updates in the provided UpdateStore. |
|
DependencyGraphModel(UpdateStore store)
|
Method Summary | |
private void |
addToSequenceIfNotYetAdded(IncrementalUpdate update,
HashSet has_been_added)
|
private void |
adjustForVersionOrderInconsistencies()
|
private void |
assertIusAreOrderedCorrectly()
|
private void |
buildSequence()
Adds IUs to a sequence with depended-upon IUs being added first. |
private void |
collectUuidsFromNodesPointedToBy(DependencyGraphModel.Node node,
Class edge_class,
Set container,
boolean recurse)
Generic method to collect nodes pointed to by the specified node along edges of the provided class. |
private void |
collectUuidsFromNodesPointingTo(DependencyGraphModel.Node node,
Class edge_class,
Collection container,
boolean recurse)
Generic method to collect nodes pointing to the specified node along edges of the provided class. |
String |
describe()
|
String |
describe(Set ius_to_mark)
|
private String |
divWrap(String content)
|
private String |
divWrap(String content,
int depth,
String extra_style,
boolean hanging_indent)
|
private String |
divWrapWithTopBorder(String content,
int depth)
|
private String |
edgeStackToPath(Stack edge_stack)
Renders the path as a String. |
(package private) Set |
getAllPredecessorsOf(UUID uuid)
|
(package private) Set |
getAllSuccessorsOf(UUID uuid)
|
private ArrayList |
getEdgesFrom(DependencyGraphModel.Node node)
Collection of edges from this node. |
private ArrayList |
getEdgesTo(DependencyGraphModel.Node node)
Collection of edges to this node. |
Set |
getExcludedImmediateSuccessorsOf(UUID uuid)
Collection of UUIDs of updates that the corresponding node excludes. |
Set |
getExcludingImmediatePredecessorsOf(UUID uuid)
Collection of UUIDs of updates that the corresponding node is excluded by. |
List |
getIncrementalUpdateSequence()
|
Set |
getRequiredImmediatePredecessorsOf(UUID uuid)
Collection of UUIDs of updates that the corresponding node requires. |
Set |
getRequiringImmediateSuccessorsOf(UUID uuid)
Collection of UUIDs of updates that required the corresponding node. |
(package private) IncrementalUpdate |
getUpdateFor(UUID uuid)
|
(package private) Iterator |
getUpdates()
|
(package private) Iterator |
getUpdateUuids()
|
private void |
prepGraph(UpdateStore store)
Populate the graph's nodes and edges based on the contents of the UpdateStore. |
private void |
process(IncrementalUpdate update,
StringBuffer buffer,
int depth,
boolean forward)
|
private DependencyGraphModel.Node |
safeGetNodeFor(UUID uuid)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String EOL
private static final String CLASSNAME
private static final boolean DEBUG
private static final DebugWriter LOG
private HashMap keyedUpdates_
private HashMap keyedNodes_
private ArrayList edges_
private HashMap fromKeyedEdges_
private HashMap toKeyedEdges_
private List iuSequence_
private String storeDescription_
Constructor Detail |
public DependencyGraphModel() throws DependencyException
UpdateStoreException
- if there are problems reading the updates from the store
DependencyException
- if: public DependencyGraphModel(UpdateStore store) throws DependencyException
Method Detail |
Iterator getUpdateUuids()
Iterator getUpdates()
IncrementalUpdate getUpdateFor(UUID uuid)
private void prepGraph(UpdateStore store) throws DependencyException
UpdateStoreException
- if errors occur reading the updates from the UpdateStore
DependencyException
- if dependencies are specified on IncrementalUpdates that do not exist in the UpdateStore.private void collectUuidsFromNodesPointedToBy(DependencyGraphModel.Node node, Class edge_class, Set container, boolean recurse)
private void collectUuidsFromNodesPointingTo(DependencyGraphModel.Node node, Class edge_class, Collection container, boolean recurse)
private ArrayList getEdgesFrom(DependencyGraphModel.Node node)
private ArrayList getEdgesTo(DependencyGraphModel.Node node)
private DependencyGraphModel.Node safeGetNodeFor(UUID uuid)
public Set getRequiredImmediatePredecessorsOf(UUID uuid)
public Set getExcludingImmediatePredecessorsOf(UUID uuid)
public Set getRequiringImmediateSuccessorsOf(UUID uuid)
public Set getExcludedImmediateSuccessorsOf(UUID uuid)
Set getAllSuccessorsOf(UUID uuid)
Set getAllPredecessorsOf(UUID uuid)
private String edgeStackToPath(Stack edge_stack)
private void buildSequence() throws DependencyException
DependencyException
private void addToSequenceIfNotYetAdded(IncrementalUpdate update, HashSet has_been_added)
private void adjustForVersionOrderInconsistencies()
private void assertIusAreOrderedCorrectly() throws DependencyException
DependencyException
public List getIncrementalUpdateSequence()
public String describe()
public String describe(Set ius_to_mark)
private void process(IncrementalUpdate update, StringBuffer buffer, int depth, boolean forward)
private String divWrapWithTopBorder(String content, int depth)
private String divWrap(String content)
private String divWrap(String content, int depth, String extra_style, boolean hanging_indent)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |