public class XMLChainBuilder<T> extends Object implements ChainBuilder<T>
Constructor and Description |
---|
XMLChainBuilder(String xmlFileName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected CommandContainer<T> |
buildChain() |
void |
execute(T context)
Executes the command.
|
boolean |
executeAsChain(T context)
Executes a command as a chain.
|
String |
executeAsProcess(String startCommand,
T context)
Execute a command as a process.
|
String |
executeAsProcess(T context)
Execute a command as a process.
|
CommandTransitionEnum.CommandTransition |
executeCommandAsChain(T parameterObject) |
String |
getProcessID()
Gets the process ID of the command.
|
void |
setProcessID(String processID)
Sets the process ID of the command
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addTransition, findNext, getTransitionList
executeCommand
public XMLChainBuilder(String xmlFileName)
xmlFileName
- Filename of the XML file. File has to reachable during
CLASSPATH.protected CommandContainer<T> buildChain() throws CommandException
CommandException
public void execute(T context) throws CommandException
Command
execute
in interface Command<T>
context
- The parameter object to pass.CommandException
- if something happens.public boolean executeAsChain(T context)
ChainCommand
execute
method.executeAsChain
in interface ChainCommand<T>
context
- The parameter object to passpublic String executeAsProcess(String startCommand, T context)
ProcessCommand
executeAsProcess
in interface ProcessCommand<T>
startCommand
- The command the process should start with.context
- The context to work with.public String getProcessID()
ProcessCommand
getProcessID
in interface ProcessCommand<T>
public void setProcessID(String processID)
ProcessCommand
setProcessID
in interface ProcessCommand<T>
processID
- Sets the process id of this process command.public String executeAsProcess(T context)
ProcessCommand
executeAsProcess
in interface ProcessCommand<T>
context
- The context to work with.public CommandTransitionEnum.CommandTransition executeCommandAsChain(T parameterObject)
executeCommandAsChain
in interface ChainCommand<T>
parameterObject
- The parameter object to pass.Copyright © 2017 neusta software development GmbH. All rights reserved.