Class OptionAction
- java.lang.Object
-
- org.apache.torque.generator.control.action.OptionAction
-
- All Implemented Interfaces:
MergepointAction
public class OptionAction extends Object implements MergepointAction
Inserts the value of an option into a mergepoint.
-
-
Constructor Summary
Constructors Constructor Description OptionAction(String option, Boolean acceptNotSet)
Constructor.
-
-
-
Constructor Detail
-
OptionAction
public OptionAction(String option, Boolean acceptNotSet)
Constructor.- Parameters:
option
- the name of the option. May or may not be prefixed with a namespace (if no namespace is used, the namespace of the current outlet is used).acceptNotSet
- true if it is acceptable that the option is not set, false if it is an error that the option is not set. null means true.
-
-
Method Detail
-
execute
public OutletResult execute(ControllerState controllerState) throws GeneratorException
Returns the value of the configured option.- Specified by:
execute
in interfaceMergepointAction
- Parameters:
controllerState
- the current state of the controller.- Returns:
- The value of the option, or the empty String if acceptNotSet is true and the option is not set.
- Throws:
GeneratorException
- if acceptNotSet is false and the option is not set.
-
-