net.dpml.metro.tools
Class StateTask

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended bynet.dpml.tools.tasks.GenericTask
              extended bynet.dpml.metro.tools.StateTask

public class StateTask
extends GenericTask

Task that handles the creation of an encoded state graph.

Version:
1.1.0
Author:
Digital Product Meta Library

Field Summary
 
Fields inherited from class net.dpml.tools.tasks.GenericTask
ASC_EXT, GPG_EXE_KEY, MD5_EXT
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
StateTask()
           
 
Method Summary
 void createGraph(File file)
          Create an encoded state graph.
 InterfaceDataType createInterface()
          Add an interface within this state.
 OperationDataType createOperation()
          Add an operation within this state.
 StateDataType createState()
          Add a substate within the state.
 TransitionDataType createTransition()
          Add an transition within this state.
 TriggerDataType createTrigger()
          Add an trigger to the state.
 void execute()
          Execute the task.
protected  File getDefaultOutputFile()
          Create and return the part output file.
 void setClass(String classname)
          Override the class as the colocated destination.
 void setDest(File file)
          Override the default output destination.
 void setName(String name)
          Set the state name.
 void setTerminal(boolean flag)
          Mark the state as a terminal state.
 
Methods inherited from class net.dpml.tools.tasks.GenericTask
asc, checksum, copy, deleteDir, getContext, getLibrary, getResource, init, isInitialized, mkDir
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateTask

public StateTask()
Method Detail

setDest

public void setDest(File file)
Override the default output destination.

Parameters:
file - the overriding destination

setClass

public void setClass(String classname)
Override the class as the colocated destination.

Parameters:
classname - the classname of the target component.

setName

public void setName(String name)
Set the state name.

Parameters:
name - the cname of the state

setTerminal

public void setTerminal(boolean flag)
Mark the state as a terminal state.

Parameters:
flag - true if this is a terminal state

createState

public StateDataType createState()
Add a substate within the state.

Returns:
the sub-state datatype

createOperation

public OperationDataType createOperation()
Add an operation within this state.

Returns:
the operation datatype

createInterface

public InterfaceDataType createInterface()
Add an interface within this state.

Returns:
the interface datatype

createTransition

public TransitionDataType createTransition()
Add an transition within this state.

Returns:
the operation datatype

createTrigger

public TriggerDataType createTrigger()
Add an trigger to the state.

Returns:
the trigger datatype

execute

public void execute()
Execute the task.


createGraph

public void createGraph(File file)
Create an encoded state graph.

Parameters:
file - the output file

getDefaultOutputFile

protected File getDefaultOutputFile()
Create and return the part output file.

Returns:
the part output file