|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.borg.model.TaskTypes
public class TaskTypes
The Class TaskTypes manages the Task type and state information, including the state transitions allowed for each task type.
Constructor Summary | |
---|---|
TaskTypes()
constructor. |
Method Summary | |
---|---|
void |
addNextState(String type,
String state,
String nextstate)
add a next state transition to a state for a type. |
void |
addState(String type,
String state)
Adds a state to a type. |
void |
addSubtask(String type,
String value)
add a subtask to a type |
void |
addType(String type)
Adds a new type to the state model with default OPEN and CLOSE states. |
void |
changeState(String type,
String state,
String newstate)
change a state name for a type. |
void |
changeType(String type,
String newtype)
Change a type name. |
TaskTypes |
copy()
Deep Copy this object. |
void |
deleteNextState(String type,
String state,
String nextstate)
Delete a next state transition from a state for a type. |
void |
deleteState(String type,
String state)
Delete a state from a type. |
void |
deleteSubtask(String type,
String value)
delete a subtask from a type |
void |
deleteType(String type)
Delete a type. |
void |
fillFromLegacyXml(String xml)
This method will read a string containin the pre-1.7.2 XML that describes a task state model and convert it to the 1.7.2 format. |
void |
fromString(String xmlString)
load this TaskTypes object from an XML string. |
void |
fromXml(InputStream is)
load this TaskTypes object from an XML input stream. |
String |
getFinalState(String type)
Gets the final state for a type. |
String |
getInitialState(String type)
Gets the initial state for a type. |
Collection<String> |
getStates(String type)
Gets the states for a given task type. |
String[] |
getSubTasks(String type)
get the built-in subtasks for a type. |
Vector<String> |
getTaskTypes()
Gets all task types. |
void |
loadDefault()
Load the default state model XML from the borg JAR file. |
Collection<String> |
nextStates(String type,
String state)
get a list of possible Next states for a given state and type. |
void |
setInitialState(String type,
String state)
Sets the initial state for a type. |
String |
toXml()
return the task state model as XML |
void |
validate()
validate the state model (somewhat). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TaskTypes()
Method Detail |
---|
public void addNextState(String type, String state, String nextstate)
type
- the typestate
- the statenextstate
- the nextstatepublic void addState(String type, String state)
type
- the typestate
- the statepublic void addSubtask(String type, String value)
type
- the typevalue
- the subtask textpublic void addType(String type)
type
- the typepublic void changeState(String type, String state, String newstate)
type
- the typestate
- the statenewstate
- the newstatepublic void changeType(String type, String newtype)
type
- the type namenewtype
- the new type namepublic TaskTypes copy() throws Exception
Exception
- the exceptionpublic void deleteNextState(String type, String state, String nextstate)
type
- the typestate
- the statenextstate
- the nextstatepublic void deleteState(String type, String state)
type
- the typestate
- the statepublic void deleteSubtask(String type, String value)
type
- the typevalue
- the subtask textpublic void deleteType(String type)
type
- the typepublic void fillFromLegacyXml(String xml) throws Exception
xml
- the pre-1.7.2 format XML for task types
Exception
public void fromString(String xmlString) throws Exception
xmlString
- the XML string
Exception
public void fromXml(InputStream is) throws Exception
is
- the InputStream
Exception
public String getFinalState(String type)
type
- the type
public String getInitialState(String type)
type
- the type
public Collection<String> getStates(String type)
type
- the task type
public String[] getSubTasks(String type)
type
- the type
public Vector<String> getTaskTypes()
public void loadDefault() throws Exception
Exception
- the exceptionpublic Collection<String> nextStates(String type, String state)
type
- the typestate
- the state
public void setInitialState(String type, String state)
type
- the typestate
- the statepublic String toXml() throws Exception
Exception
- the exceptionpublic void validate() throws Exception
Exception
- the exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |