|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.spray.template.flow.DefaultFlowStep
public class DefaultFlowStep
A default implementation of FlowStep. This implementation keeps itself synchronized with the FlowFilterMBeean until locally modified.
| Field Summary |
|---|
| Fields inherited from interface org.norther.tammi.spray.template.flow.FlowStep |
|---|
CURRENT_FLOW_INDICATOR, FLOW_PATH_SEPARATOR, STEP_INDEX_SEPARATOR, STEP_PATH_SEPARATOR |
| Constructor Summary | |
|---|---|
DefaultFlowStep(String name)
Constructs a named flow step. |
|
DefaultFlowStep(String name,
FlowStep flow)
Constructs a named flow step with a flow. |
|
| Method Summary | |
|---|---|
void |
addStateListener(StepStateListener listener)
Adds a state listener of this flow step. |
void |
addStepName(int index,
String name)
Adds a named flow step. |
void |
addVariable(int index,
Variable var)
Adds a new variable at the specified index. |
void |
addVariable(Variable var)
Adds a new variable. |
Object |
clone()
|
boolean |
containsInvalidVariables()
Returns true, if there are one or more invalid variables. |
void |
disposeFlows()
Disposes flows of this flow step and their resources. |
void |
disposeSteps()
Disposes steps of this flow step and their resources. |
String |
getAbsolutePath()
Gets the absolute path to this flow step. |
List |
getActionNames()
Gets the action names. |
FlowStep |
getFlow()
Gets the flow of this flow step. |
int |
getIndex()
Gets the index of this flow step. |
String |
getLabel()
Gets the label. |
String |
getName()
Gets the name of this flow step. |
String |
getPath()
Gets the relative path to this flow step. |
String |
getProperty(int index)
Gets the indexed property. |
StepMatrix |
getRouteMatrix()
Gets the step route matrix. |
FlowStep |
getStep(int index)
Gets the indexed flow step |
String |
getStepName(int index)
Gets the name of the indexed flow step. |
List |
getStepNames()
Gets the names of flow steps. |
String |
getStepPath(int index)
Gets the relative path to the indexed flow step. |
String |
getTemplate()
Gets the template. |
List |
getTemplatePaths()
Gets the template paths. |
String |
getTransition(int index)
Gets the indexed transition. |
Variable |
getVariable(int index)
Gets the indexed variable. |
List |
getVariables()
Gets the variables. |
List |
getVariableTypes()
Gets the variable types. |
int |
indexOfStep(String name)
Returns the index of the named flow step. |
boolean |
isHeritable()
Checks whether heritable. |
boolean |
isInvalidVariable(int index)
Checks the invalidity of the indexed variable. |
boolean |
isState(int index)
Checks the indexed state. |
boolean |
isValidVariable(int index)
Checks the validity of the indexed variable. |
boolean |
isValidVariables()
Checks whether all variables are valid, i.e. |
protected void |
relocate()
Relocates the step. |
void |
removeStateListener(StepStateListener listener)
Removes a state listener of this flow step. |
void |
removeStep(int index)
Removes the indexed flow step. |
void |
removeTemplate()
Removes the template. |
void |
removeVariable(int index)
Removes the indexed variable. |
void |
removeVariables()
Removes all variables. |
Variable |
renewVariable(int index)
Renews the indexed variable by replacing it with a fresh one. |
List |
renewVariables()
Renews all variables by replacing them with fresh ones. |
void |
resetInvalidVariables()
Resets invalid variables by marking them as not updated. |
void |
resetVariable(int index)
Resets the indexed variable by marking it as not updated. |
void |
resetVariables()
Resets all variables by marking them as not updated. |
void |
setActionNames(List tasks)
Sets the action names. |
protected void |
setFlow(FlowStep flow)
Sets the flow. |
void |
setHeritable(boolean flag)
Sets whether heritable. |
void |
setLabel(String label)
Sets the label. |
String |
setProperty(int index,
String value)
Sets the indexed property. |
void |
setRouteMatrix(StepMatrix matrix)
Sets the step route matrix. |
boolean |
setState(int index,
boolean flag)
Sets the indexed state. |
void |
setStepName(int index,
String name)
Sets the named flow step. |
void |
setStepNames(List names)
Sets the names of flow steps. |
void |
setTemplate(String path)
Sets the template. |
void |
setTemplatePaths(List paths)
Sets the template paths. |
String |
setTransition(int index,
String value)
Sets the indexed transition. |
void |
setValidVariable(int index,
boolean flag)
Sets the validity of the indexed variable. |
void |
setValidVariables(boolean flag)
Sets the validity of all variables. |
void |
setVariable(int index,
Variable var)
Sets the indexed variable. |
void |
setVariables(List list)
Sets the variables. |
void |
setVariableTypes(List types)
Sets the variable types. |
void |
sortVariables(Comparator comparator)
Sorts variables. |
int |
stepCount()
Returns the number of steps. |
String |
toClassName()
Converts the name of this flow to the corresponding class name. |
int |
variableCount()
Returns the number of variables. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultFlowStep(String name)
name - the flow step name.
NullPointerException - for a null name.
IllegalArgumentException - for an invalid name.
public DefaultFlowStep(String name,
FlowStep flow)
name - the flow step name.flow - the flow.
NullPointerException - for a null name.
IllegalArgumentException - for an invalid name.| Method Detail |
|---|
public Object clone()
clone in class Objectpublic String getName()
FlowStep
getName in interface FlowSteppublic FlowStep getFlow()
FlowStep
getFlow in interface FlowSteppublic int getIndex()
FlowStep
getIndex in interface FlowSteppublic String getPath()
FlowStep
getPath in interface FlowSteppublic String getAbsolutePath()
FlowStep
getAbsolutePath in interface FlowSteppublic boolean isHeritable()
FlowStep
isHeritable in interface FlowSteppublic void setHeritable(boolean flag)
FlowStep
setHeritable in interface FlowStepflag - true if heritable, false otherwise.public StepMatrix getRouteMatrix()
FlowStep
getRouteMatrix in interface FlowSteppublic void setRouteMatrix(StepMatrix matrix)
FlowStep
setRouteMatrix in interface FlowStepmatrix - the step matrix.public FlowStep getStep(int index)
FlowStep
getStep in interface FlowStepindex - the index.
public void removeStep(int index)
FlowStep
removeStep in interface FlowStepindex - the index.public int indexOfStep(String name)
FlowStep
indexOfStep in interface FlowStepname - the flow step name.
public String getStepName(int index)
FlowStep
getStepName in interface FlowStepindex - the index.
public void setStepName(int index,
String name)
FlowStep
setStepName in interface FlowStepindex - the index.name - the flow step name.
public void addStepName(int index,
String name)
FlowStep
addStepName in interface FlowStepindex - the index.name - the flow step name.public List getStepNames()
FlowStep
getStepNames in interface FlowSteppublic void setStepNames(List names)
FlowStep
setStepNames in interface FlowStepnames - a list of flow step names.public String getStepPath(int index)
FlowStep
getStepPath in interface FlowStepindex - the index.
public int stepCount()
FlowStep
stepCount in interface FlowSteppublic void disposeSteps()
FlowStep
disposeSteps in interface FlowSteppublic void disposeFlows()
FlowStep
disposeFlows in interface FlowSteppublic String toClassName()
FlowStep
toClassName in interface FlowSteppublic String getLabel()
FlowStepNote that the name is returned if the label is not set.
getLabel in interface FlowSteppublic void setLabel(String label)
FlowStep
setLabel in interface FlowSteplabel - the label.public List getTemplatePaths()
FlowStep
getTemplatePaths in interface FlowSteppublic void setTemplatePaths(List paths)
FlowStep
setTemplatePaths in interface FlowSteppaths - a list of template paths.public List getVariableTypes()
FlowStep
getVariableTypes in interface FlowSteppublic void setVariableTypes(List types)
FlowStep
setVariableTypes in interface FlowSteptypes - a list of variable types or null.public List getActionNames()
FlowStep
getActionNames in interface FlowSteppublic void setActionNames(List tasks)
FlowStep
setActionNames in interface FlowSteptasks - a list of action names or null.public boolean isState(int index)
FlowStepNote that the index depends on the context of this flow step.
isState in interface FlowStepindex - the state index.
public boolean setState(int index,
boolean flag)
FlowStepNote that the index depends on the context of this flow step.
setState in interface FlowStepindex - the state index.flag - true if set, false otherwise.
public String getProperty(int index)
FlowStepNote that the index depends on the context of this flow step.
getProperty in interface FlowStepindex - the property index.
public String setProperty(int index,
String value)
FlowStepNote that the index depends on the context of this flow step.
setProperty in interface FlowStepindex - the property index.value - the value of the property.
public String getTransition(int index)
FlowStepNote that the index depends on the context of this flow step.
getTransition in interface FlowStepindex - the state index.
public String setTransition(int index,
String value)
FlowStepNote that the index depends on the context of this flow step.
setTransition in interface FlowStepindex - the state index.value - the value of the transition.
public void addStateListener(StepStateListener listener)
FlowStep
addStateListener in interface FlowSteplistener - the listener.public void removeStateListener(StepStateListener listener)
FlowStep
removeStateListener in interface FlowSteplistener - the listener.public String getTemplate()
FlowStep
getTemplate in interface FlowSteppublic void setTemplate(String path)
FlowStep
setTemplate in interface FlowSteppath - the template path.public void removeTemplate()
FlowStep
removeTemplate in interface FlowStep
public Variable getVariable(int index)
throws ConstructionException
FlowStep
getVariable in interface FlowStepindex - the index of the variable.
ConstructionException - if construction fails.
public void setVariable(int index,
Variable var)
throws ConstructionException
FlowStep
setVariable in interface FlowStepindex - the index of the variable.var - the variable.
ConstructionException - if construction fails.
public List getVariables()
throws ConstructionException
FlowStep
getVariables in interface FlowStepConstructionException - if construction fails.public void setVariables(List list)
FlowStep
setVariables in interface FlowSteplist - a list of variables.
public void addVariable(Variable var)
throws ConstructionException
FlowStep
addVariable in interface FlowStepvar - the variable.
ConstructionException - if construction fails.
public void addVariable(int index,
Variable var)
throws ConstructionException
FlowStep
addVariable in interface FlowStepindex - the index of the variable.var - the variable.
ConstructionException - if construction fails.
public Variable renewVariable(int index)
throws ConstructionException
FlowStep
renewVariable in interface FlowStepindex - the index of the variable.
ConstructionException - if construction fails.
public List renewVariables()
throws ConstructionException
FlowStep
renewVariables in interface FlowStepConstructionException - if construction fails.
public void removeVariable(int index)
throws ConstructionException
FlowStep
removeVariable in interface FlowStepindex - the index of the variable.
ConstructionException - if construction fails.
public void removeVariables()
throws ConstructionException
FlowStep
removeVariables in interface FlowStepConstructionException - if construction fails.
public void sortVariables(Comparator comparator)
throws ConstructionException
FlowStep
sortVariables in interface FlowStepcomparator - the comparator to apply.
ConstructionException - if construction fails.public int variableCount()
FlowStep
variableCount in interface FlowSteppublic boolean isValidVariable(int index)
FlowStep
isValidVariable in interface FlowStepindex - the index of the variable.
public boolean isInvalidVariable(int index)
FlowStep
isInvalidVariable in interface FlowStepindex - the index of the variable.
public void setValidVariable(int index,
boolean flag)
FlowStep
setValidVariable in interface FlowStepindex - the inded of the variable.flag - true if valid, false otherwise.public boolean isValidVariables()
FlowStep
isValidVariables in interface FlowSteppublic void setValidVariables(boolean flag)
FlowStep
setValidVariables in interface FlowStepflag - true if valid, false otherwise.public void resetVariable(int index)
FlowStep
resetVariable in interface FlowStepindex - the index of the variable.public void resetVariables()
FlowStep
resetVariables in interface FlowSteppublic boolean containsInvalidVariables()
FlowStep
containsInvalidVariables in interface FlowSteppublic void resetInvalidVariables()
FlowStep
resetInvalidVariables in interface FlowStepprotected void setFlow(FlowStep flow)
flow - the flow.protected void relocate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||