|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ix.ileed.ProcessModel
A ProcessModel contains a model of a process and handles the propagation of state changes. There are a number of interior classes so that the whole thing can be contained in one file and can avoid name conflicts with other parts of the panel (e.g. for class names such as "Node").
A ProcessModel receives information from a Watcher and is therefore an implementation of WatcherListener. It sends information to an implementation of ProcessViewer.
Before you can do anything very interesting, you have to install a viewer and read in a process definition. For example:
ProcessModel model = new ProcessModel(); model.setViewer(someViewer); model.initFromFile("coax-process.lsp");
WatcherListener
,
ProcessViewer
Inner Class Summary | |
(package private) class |
ProcessModel.Node
Nodes represent actions in the process. |
(package private) static class |
ProcessModel.NodeTable
Nodes are stored in a NodeTable, indexed by pattern. |
(package private) class |
ProcessModel.OverallCell
Overall column cells, a member class of ProcessModel. |
(package private) class |
ProcessModel.OverallCollectionCell
A subclass of OverallCell that reports the collective status of some earlier row. |
Field Summary | |
(package private) java.util.Vector |
allNodes
|
(package private) HashedSet |
changedNodes
|
(package private) Domain |
domain
|
(package private) ProcessModel.NodeTable |
nodeTable
|
(package private) int |
numberOfCoas
|
(package private) java.util.Hashtable |
overallColumn
|
(package private) java.util.Vector |
products
|
(package private) java.util.Hashtable |
productTable
|
(package private) java.util.Hashtable |
rowTable
|
(package private) ProcessViewer |
viewer
|
Fields inherited from interface ix.icore.process.StatusValues |
PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_MEDIUM, PRIORITY_NONE, PRODUCT_BLANK, PRODUCT_COMPLETE, PRODUCT_DRAFT, STATUS_BLANK, STATUS_COMPLETE, STATUS_EXECUTING, STATUS_IMPOSSIBLE, STATUS_NA, STATUS_POSSIBLE |
Constructor Summary | |
ProcessModel()
Create an empty ProcessModel. |
Method Summary | |
void |
addCoa(int coaNumber)
Add the actions for a new COA to the model. |
(package private) void |
addProduct(Product p)
|
(package private) void |
addRowElement(ProcessModel.Node node)
|
void |
checkConnectivity()
Checks that we can reach all of the nodes in various ways. |
LList |
depthFirstFinishOrder(LList roots,
Function1 successors)
|
(package private) ProcessModel.OverallCell |
ensureOverallCell(java.lang.String action)
|
LList |
finalNodes()
|
LList |
finalNodes(java.util.Enumeration ne,
int level)
|
ProcessModel.Node |
findActionNode(java.lang.String action)
|
ProcessModel.Node |
findActionNode(java.lang.String action,
int coa)
|
protected ProcessModel.Node |
findNode(LList pattern)
|
(package private) ProcessModel.OverallCell |
findOverallCell(java.lang.String action)
|
void |
finishAction(java.lang.String action)
Called by a watcher when it detects that an action has finished. |
void |
finishAction(java.lang.String action,
int coa)
Called by a watcher when it detects that an action has finished. |
void |
finishAction(java.lang.String action,
int coa,
int level)
Called by a watcher when it detects that an action has finished. |
protected java.util.Vector |
fullStateDescription()
|
java.util.Vector |
getAllProducts()
|
(package private) Product |
getProduct(java.lang.Object name)
|
void |
initFromFile(java.lang.String filename)
Read action definitions from a file. |
LList |
initialNodes()
|
LList |
initialNodes(java.util.Enumeration ne,
int level)
|
protected int[] |
issueCounts()
|
(package private) ProcessModel.OverallCell |
newOverallCellInstance(java.lang.String action)
Create an instance of an appropriate OverallCell class. |
LList |
nodesAfter(ProcessModel.Node before)
|
LList |
nodesBefore(ProcessModel.Node after)
|
LList |
nodesBetween(ProcessModel.Node before,
ProcessModel.Node after)
|
LList |
nodesInDepthFirstFinishOrder()
|
(package private) void |
registerNode(ProcessModel.Node node)
|
void |
reset()
Remove all COAs, their associated actions, and all current state information. |
protected void |
resetChangeRecord()
|
protected void |
seeIfNewCoa(int coa)
|
void |
sendFullStateDescription()
Send the viewer a complete state description, rather than a delta. |
void |
setViewer(ProcessViewer viewer)
Install a viewer that will be sent status information when changes occur. |
void |
startAction(java.lang.String action)
Called by a watcher when it detects that an action has started. |
void |
startAction(java.lang.String action,
int coa)
Called by a watcher when it detects that an action has started. |
void |
startAction(java.lang.String action,
int coa,
int level)
Called by a watcher when it detects that an action has started. |
protected void |
startRecordingChanges()
|
LList |
staticExpansionTree()
Returns a tree that shows the action nesting of the process, to the extent that this can be determined directly from the schema definitions. |
protected java.util.Vector |
statusChanges()
|
protected void |
tellViewer()
|
LList |
topLevelNodes()
|
Methods inherited from class java.lang.Object |
|
Field Detail |
ProcessViewer viewer
Domain domain
ProcessModel.NodeTable nodeTable
java.util.Vector allNodes
java.util.Hashtable rowTable
java.util.Hashtable overallColumn
int numberOfCoas
HashedSet changedNodes
java.util.Vector products
java.util.Hashtable productTable
Constructor Detail |
public ProcessModel()
Method Detail |
public void setViewer(ProcessViewer viewer)
public void initFromFile(java.lang.String filename)
void addProduct(Product p)
Product getProduct(java.lang.Object name)
public java.util.Vector getAllProducts()
public LList staticExpansionTree()
public void reset()
public void addCoa(int coaNumber)
public void sendFullStateDescription()
protected java.util.Vector fullStateDescription()
public void startAction(java.lang.String action)
startAction
in interface WatcherListener
public void startAction(java.lang.String action, int coa)
startAction
in interface WatcherListener
public void startAction(java.lang.String action, int coa, int level)
startAction
in interface WatcherListener
public void finishAction(java.lang.String action)
finishAction
in interface WatcherListener
public void finishAction(java.lang.String action, int coa)
finishAction
in interface WatcherListener
public void finishAction(java.lang.String action, int coa, int level)
finishAction
in interface WatcherListener
protected void seeIfNewCoa(int coa)
protected void startRecordingChanges()
protected void resetChangeRecord()
protected void tellViewer()
protected java.util.Vector statusChanges()
protected int[] issueCounts()
void registerNode(ProcessModel.Node node)
protected ProcessModel.Node findNode(LList pattern)
public ProcessModel.Node findActionNode(java.lang.String action)
public ProcessModel.Node findActionNode(java.lang.String action, int coa)
void addRowElement(ProcessModel.Node node)
ProcessModel.OverallCell ensureOverallCell(java.lang.String action)
ProcessModel.OverallCell findOverallCell(java.lang.String action)
public LList topLevelNodes()
public LList initialNodes()
public LList initialNodes(java.util.Enumeration ne, int level)
public LList finalNodes()
public LList finalNodes(java.util.Enumeration ne, int level)
public LList nodesBefore(ProcessModel.Node after)
public LList nodesAfter(ProcessModel.Node before)
public LList nodesBetween(ProcessModel.Node before, ProcessModel.Node after)
public LList nodesInDepthFirstFinishOrder()
public LList depthFirstFinishOrder(LList roots, Function1 successors)
public void checkConnectivity()
ProcessModel.OverallCell newOverallCellInstance(java.lang.String action)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |