public abstract class TransformationTemplate
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BASELINE |
Constructor and Description |
---|
TransformationTemplate() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
add(TransformationUtility utility)
Adds a new transformation utility to the end of the list.
|
java.lang.String |
add(TransformationUtility utility,
java.lang.String utilityName)
Adds a new transformation utility to the end of the list.
|
java.lang.String |
addMultiple(TransformationOperation templateOperation,
java.lang.String... attributes)
Adds a special transformation utility to perform multiple transformation operations against
multiple files specified as a list, held as a transformation context attribute
|
void |
debug(java.lang.String debugMessage) |
void |
debug(java.lang.String debugMessage,
java.lang.String... attributeNames) |
java.lang.String |
getApplicationName()
Returns the name of the transformed application,
Returns null if the application name is unknown.
|
java.lang.String |
getApplicationType()
Returns the type of the transformed application,
Returns null if the application type is unknown.
|
java.util.List<TransformationUtility> |
getChildren() |
abstract java.lang.String |
getDescription()
Returns the transformation template description
|
abstract java.lang.Class<? extends Extension> |
getExtensionClass()
Returns the class of the extension this transformation
template belongs to
|
java.lang.String |
getName() |
protected java.lang.String |
getSimpleClassName()
Returns the transformation template class simple name
(see
Class.getSimpleName() ), or "AnonymousTransformationTemplate"
if that is an anonymous class |
java.util.List<TransformationUtility> |
getUtilities()
Returns a read-only ordered list of transformation utilities to be executed,
which defines the actual transformation offered by this template
|
void |
info(java.lang.String infoMessage) |
void |
info(java.lang.String infoMessage,
java.lang.String... attributeNames) |
boolean |
isBlank()
Returns true if this is a blank transformation template.
|
void |
log(org.slf4j.event.Level logLevel,
java.lang.String logMessage) |
void |
log(org.slf4j.event.Level logLevel,
java.lang.String logMessage,
java.lang.String... attributeNames) |
void |
log(java.lang.String logMessage)
Deprecated.
|
void |
log(java.lang.String logMessage,
java.lang.String... attributeNames)
Deprecated.
|
java.lang.String |
loop(TransformationUtility utility,
int iterations)
Execute an utility in a loop a number times specified in
iterations |
java.lang.String |
loop(TransformationUtility utility,
java.lang.String attribute)
Execute an utility in a loop while the value in
TransformationContext attribute is true. |
java.lang.String |
loop(TransformationUtility utility,
UtilityCondition condition)
Execute an utility in a loop while the execution value resulted by
condition is true. |
void |
setBlank(boolean blank)
Sets whether this is a blank transformation template or not.
|
java.lang.String |
toString() |
public static final java.lang.String BASELINE
public abstract java.lang.Class<? extends Extension> getExtensionClass()
public abstract java.lang.String getDescription()
public final java.lang.String add(TransformationUtility utility)
utility
- the utility to be addedpublic final java.lang.String add(TransformationUtility utility, java.lang.String utilityName)
utility
- the utility to be addedutilityName
- the name to be set to the utility before adding itpublic final java.lang.String addMultiple(TransformationOperation templateOperation, java.lang.String... attributes)
templateOperation
- a template of transformation operation to be performed
against all specified filesattributes
- one or more transformation context attributes that hold list
of Files which the transformation operations should perform
againstpublic final java.lang.String loop(TransformationUtility utility, int iterations)
iterations
utility
- the utility to be executed each iteration of the loop. To execute more than one, use a TransformationUtilityGroup
iterations
- the number of iterations to be executedpublic final java.lang.String loop(TransformationUtility utility, java.lang.String attribute)
TransformationContext
attribute is true.
The defined is specified based on its name, specified in attribute
.
If the attribute value is not a boolean, or if non-existent, it will be treated as false.utility
- the utility to be executed each iteration of the loop. To execute more than one, use a TransformationUtilityGroup
attribute
- the name of the transformation context attribute to hold the loop conditionpublic final java.lang.String loop(TransformationUtility utility, UtilityCondition condition)
condition
is true.
The TransformationUtility
object referenced by condition
won't be saved to the TransformationContext
,
it will be executed exclusively to the scope of this loop execution.
Any result other than a boolean true value, including failures, will be treated as false.utility
- the utility to be executed each iteration of the loop. To execute more than one, use a TransformationUtilityGroup
condition
- the UtilityCondition
object whose execution result will be used as the loop condition@Deprecated public final void log(java.lang.String logMessage)
public final void info(java.lang.String infoMessage)
public final void debug(java.lang.String debugMessage)
public final void log(org.slf4j.event.Level logLevel, java.lang.String logMessage)
@Deprecated public final void log(java.lang.String logMessage, java.lang.String... attributeNames)
public final void info(java.lang.String infoMessage, java.lang.String... attributeNames)
public final void debug(java.lang.String debugMessage, java.lang.String... attributeNames)
public final void log(org.slf4j.event.Level logLevel, java.lang.String logMessage, java.lang.String... attributeNames)
public final java.util.List<TransformationUtility> getUtilities()
public java.util.List<TransformationUtility> getChildren()
public final java.lang.String getName()
public final java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getApplicationType()
public java.lang.String getApplicationName()
protected java.lang.String getSimpleClassName()
Class.getSimpleName()
), or "AnonymousTransformationTemplate"
if that is an anonymous classpublic void setBlank(boolean blank)
UpgradeStep
cannot be blank.blank
- whether this is a blank transformation template or notpublic boolean isBlank()
setBlank(boolean)
.