public class ContextAttributeRetriever<T> extends TransformationUtility
TransformationTemplate.getApplicationName()
. The
application name mostly will only be known after the transformation
has began, but it might be necessary to know it outside of transformation
time (after it). For example, the metrics system needs to know it, as
seen in TransformationMetrics.getApplicationName()
.UTILITY_NAME_SYNTAX
Constructor and Description |
---|
ContextAttributeRetriever() |
ContextAttributeRetriever(String attributeName) |
Modifier and Type | Method and Description |
---|---|
protected ExecutionResult |
execution(File transformedAppFolder,
TransformationContext transformationContext)
The implementation execution of this transformation utility.
|
T |
getAttributeValue()
Returns the value of the transformation context attribute
specified earlier.
|
String |
getDescription()
Returns a short one line, but SPECIFIC, description about the transformation
utility, including mentioning the files and/or folders
to be manipulated.
|
void |
setAttributeName(String attributeName) |
abortOnFailure, 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, getTransformationTemplate, getUnlessConditionAttributeName, hasBeenPerformed, hashCode, hashCode, isFileSet, isSaveResult, normalizeRelativePathSeparator, perform, relative, set, setContextAttributeName, setName, setParent, setSaveResult, toString, wasFileExplicitlySet
public ContextAttributeRetriever()
public ContextAttributeRetriever(String attributeName)
public void setAttributeName(String attributeName)
public String getDescription()
TransformationUtility
getDescription
in class TransformationUtility
protected ExecutionResult execution(File transformedAppFolder, TransformationContext transformationContext)
TransformationUtility
TransformationUtility.isSaveResult()
returns false.
ExecutionResult
error object.execution
in class TransformationUtility
transformedAppFolder
- the folder where the transformed application code istransformationContext
- the transformation context objectpublic T getAttributeValue()
IllegalStateException
is thrown.Copyright © 2018. All rights reserved.