Class SourceElementAttributeAction
java.lang.Object
org.apache.torque.generator.control.action.SourceElementAttributeAction
- All Implemented Interfaces:
MergepointAction
Applies an outlet to a given source element.
-
Constructor Summary
ConstructorsConstructorDescriptionSourceElementAttributeAction(String element, String attributeName, Boolean acceptNotSet) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionexecute(ControllerState controllerState) Returns the value of the configured attribute of the configured source element. ${...}toString()
-
Constructor Details
-
SourceElementAttributeAction
Constructor.- Parameters:
element- the SourcePath to the element, not null.attributeName- The name of the attribute to evaluate, or null to access the attribute with name null.acceptNotSet- true if the attribute may not exist, false if it is an error that the attribute does not exist, null means true.
-
-
Method Details
-
execute
Returns the value of the configured attribute of the configured source element. ${...} Tokens are replaced within the element path and the attribute name.- Specified by:
executein interfaceMergepointAction- Parameters:
controllerState- the current state of the controller.- Returns:
- The value of the attribute, or the empty String if acceptNotSet is true and the attribute is not set.
- Throws:
GeneratorException- if acceptNotSet is false and either no source element can be found or the attribute is not set.
-
toString
-