public abstract class SourceTargetAttributeTransformer extends Object implements SourceTransformer
| Constructor and Description |
|---|
SourceTargetAttributeTransformer()
Standard constructor.
|
SourceTargetAttributeTransformer(String sourceAttributeName,
String targetAttributeName)
Constructor used to set default attribute names.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getSourceAttributeName()
Returns the name of the attribute which is read as Input.
|
String |
getTargetAttributeName()
Returns the name of the attribute into which the result is stored.
|
boolean |
isOverwrite()
Returns whether the content of the target attribute is overwritten
if it exists.
|
void |
setOverwrite(boolean overwrite)
Sets whether the content of the target attribute should be overwritten
if it exists.
|
void |
setSourceAttributeName(String sourceAttributeName)
Sets the name of the attribute which is read as Input.
|
void |
setTargetAttributeName(String targetAttributeName)
Sets the name of the attribute into which the result is stored.
|
abstract Object |
transform(Object toTransformRoot,
ControllerState controllerState)
Performs the transformation.
|
public SourceTargetAttributeTransformer()
public String getSourceAttributeName()
public void setSourceAttributeName(String sourceAttributeName)
sourceAttributeName - the name of the attribute which is read
as Input, not null.NullPointerException - if sourceAttributeName is null.public String getTargetAttributeName()
public void setTargetAttributeName(String targetAttributeName)
targetAttributeName - the name of the attribute into which
the result is stored, not null.NullPointerException - if targetAttributeName is null.public boolean isOverwrite()
public void setOverwrite(boolean overwrite)
overwrite - true if the target is overwritten, false if it is
only filled when not set.public abstract Object transform(Object toTransformRoot, ControllerState controllerState) throws SourceTransformerException
transform in interface SourceTransformertoTransformRoot - the root object of the source tree
to transform, not null.controllerState - the state of the controller, not null.SourceTransformerException - if the source cannot be transformed.SourceTransformer.transform(Object, ControllerState)Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.