public class MultipleOperations extends TransformationUtility<MultipleOperations> implements com.paypal.butterfly.extensions.api.TransformationUtilityParent
setFiles(String...)
setProperties(String, String)
UTILITY_NAME_SYNTAX
Constructor and Description |
---|
MultipleOperations()
Utility to perform multiple transformation operations.
|
MultipleOperations(TransformationOperation templateOperation)
Utility to perform multiple transformation operations.
|
Modifier and Type | Method and Description |
---|---|
protected TUExecutionResult |
execution(java.io.File transformedAppFolder,
TransformationContext transformationContext)
The implementation execution of this transformation utility.
|
java.util.List<TransformationUtility> |
getChildren()
Returns all
TransformationOperation instances generated out of the
transformation operation template. |
java.lang.String |
getDescription()
Returns a short one line, but SPECIFIC, description about the transformation
utility, including mentioning the files and/or folders
to be manipulated.
|
java.lang.String[] |
getFilesAttributes()
Return an array containing the name of transformation context attributes
that hold the list of files the operations should be performed against
|
TransformationOperation |
getTemplateOperation() |
MultipleOperations |
setFiles(java.lang.String... filesAttributes)
Sets one or more transformation context attributes that hold list of Files
which the transformation operations should perform against.
|
MultipleOperations |
setName(java.lang.String name)
Set this transformation utility instance name.
|
MultipleOperations |
setOperationTemplate(TransformationOperation templateOperation)
Sets the template of transformation operation to be performed against all specified files.
|
MultipleOperations |
setProperties(java.lang.String propertyName,
java.lang.String propertyAttribute)
This setter is similar to
TransformationUtility.set(String, String) , however it is more powerful, because
it allows setting, during transformation time, different properties values for each operation of a
MultipleOperations . |
void |
setPropertySetter() |
abortOnFailure, abortOnFailure, absolute, absolute, applyPropertiesFromContext, checkDependencies, checkForBlankString, checkForEmptyString, checkForNull, clone, copy, dependsOn, equals, executeIf, executeIf, executeUnless, getAbortionMessage, getAbsoluteFile, getContextAttributeName, getDependencies, getIfConditionAttributeName, getName, getOrder, getParent, getRelativePath, getRelativePath, getSimpleClassName, getTransformationTemplate, getUnlessConditionAttributeName, hasBeenPerformed, hashCode, hashCode, isAbortOnFailure, isFileSet, isSaveResult, normalizeRelativePathSeparator, perform, relative, set, setContextAttributeName, setParent, setSaveResult, toString, wasFileExplicitlySet
public MultipleOperations()
setFiles(String...)
setProperties(String, String)
public MultipleOperations(TransformationOperation templateOperation)
setFiles(String...)
setProperties(String, String)
templateOperation
- a template of transformation operation to be performed
against all specified filespublic MultipleOperations setFiles(java.lang.String... filesAttributes)
filesAttributes
- one or more transformation context attributes that hold list
of Files which the transformation operation should perform
againstpublic final MultipleOperations setProperties(java.lang.String propertyName, java.lang.String propertyAttribute)
TransformationUtility.set(String, String)
, however it is more powerful, because
it allows setting, during transformation time, different properties values for each operation of a
MultipleOperations
.
TransformationTemplate.addMultiple(TransformationOperation, String...)
propertyName
- the operation Java bean property name to be set during transformation timepropertyAttribute
- the name of the transformation context attribute that holds a Set
of
values to be each set individually (as the property value) to each operation of
a set of multiple operations. These values are set right before execution. If
the transformation context attribute value is not a Set
, then a
TransformationUtilityException
will be thrown right before executionpublic MultipleOperations setOperationTemplate(TransformationOperation templateOperation)
templateOperation
- the template of transformation operation to be performed against
all specified filespublic MultipleOperations setName(java.lang.String name)
TransformationUtility
setName
in class TransformationUtility<MultipleOperations>
name
- transformation utility instance namepublic java.lang.String[] getFilesAttributes()
public TransformationOperation getTemplateOperation()
public java.lang.String getDescription()
TransformationUtility
getDescription
in class TransformationUtility<MultipleOperations>
public void setPropertySetter()
protected TUExecutionResult execution(java.io.File transformedAppFolder, TransformationContext transformationContext)
TransformationUtility
TransformationUtility.isSaveResult()
returns false.
ExecutionResult
error object.execution
in class TransformationUtility<MultipleOperations>
transformedAppFolder
- the folder where the transformed application code istransformationContext
- the transformation context objectpublic java.util.List<TransformationUtility> getChildren()
TransformationOperation
instances generated out of the
transformation operation template.
Those instances though are not accessible during transformation definition time,
neither before this multiple operations is performed.
Actually, the purpose of a multiple operation is exactly to generate
all children transformation operation instances, which get them executed behind the scenes
by the transformation engine.getChildren
in interface com.paypal.butterfly.extensions.api.TransformationUtilityParent