public class SourceElementAttributeAction extends Object implements MergepointAction
Constructor and Description |
---|
SourceElementAttributeAction(String element,
String attributeName,
Boolean acceptNotSet)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
OutletResult |
execute(ControllerState controllerState)
Returns the value of the configured attribute of the configured source
element.
|
String |
toString() |
public SourceElementAttributeAction(String element, String attributeName, Boolean acceptNotSet)
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.public OutletResult execute(ControllerState controllerState) throws GeneratorException
execute
in interface MergepointAction
controllerState
- the current state of the controller.GeneratorException
- if acceptNotSet is false and either no
source element can be found or the attribute is not set.Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.