public class InjectionChainBuilder<T> extends Object implements ChainBuilder<T>
Constructor and Description |
---|
InjectionChainBuilder() |
Modifier and Type | Method and Description |
---|---|
protected CommandContainer<T> |
buildChain()
Builds the chain for this builder.
|
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 |
setCommands(List<Command<T>> commands)
Sets the list of commands.
|
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
protected CommandContainer<T> buildChain()
public void execute(T context) throws CommandException
Command
execute
in interface Command<T>
context
- The parameter object to pass.CommandException
- if something happens.Command.execute(java.lang.Object)
public boolean executeAsChain(T context)
ChainCommand
execute
method.executeAsChain
in interface ChainCommand<T>
context
- The parameter object to passChainCommand.executeAsChain(java.lang.Object)
public CommandTransitionEnum.CommandTransition executeCommandAsChain(T parameterObject)
executeCommandAsChain
in interface ChainCommand<T>
parameterObject
- The parameter object to pass.ChainCommand.executeCommandAsChain(java.lang.Object)
public 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.ProcessCommand.executeAsProcess(java.lang.String,
java.lang.Object)
public String getProcessID()
ProcessCommand
getProcessID
in interface ProcessCommand<T>
ProcessCommand.getProcessID()
public void setCommands(List<Command<T>> commands)
commands
- Command to set from the injection framework.public void setProcessID(String processID)
ProcessCommand
setProcessID
in interface ProcessCommand<T>
processID
- Sets the process id of this process command.ProcessCommand.setProcessID(java.lang.String)
public String executeAsProcess(T context)
ProcessCommand
executeAsProcess
in interface ProcessCommand<T>
context
- The context to work with.ProcessCommand.executeAsProcess(java.lang.Object)
Copyright © 2017 neusta software development GmbH. All rights reserved.