public abstract class AddElementTO<T extends AddElementTO> extends TransformationOperation<T> implements AddElement<T>
AddElement
implementation ready for TransformationOperation
subclasses.
Protected instance variable ifPresent
can be used when deciding the result type,
in case the element to be added is already present.AddElement.IfPresent
Modifier and Type | Field and Description |
---|---|
protected AddElement.IfPresent |
ifPresent |
UTILITY_NAME_SYNTAX
Constructor and Description |
---|
AddElementTO() |
Modifier and Type | Method and Description |
---|---|
T |
failIfPresent()
Fail (
TOExecutionResult.Type.ERROR )
if the element to be added is already present |
T |
noOpIfPresent()
Do nothing, not add, not warn neither fail, (
TOExecutionResult.Type.NO_OP )
if the element to be added is already present |
T |
overwriteIfPresent()
Overwrite and not warn (
TOExecutionResult.Type.SUCCESS )
if the element to be added is already present |
T |
warnButAddIfPresent()
Warn, but add, (
TOExecutionResult.Type.WARNING )
if the element to be added is already present |
T |
warnNotAddIfPresent()
Warn and do not add (
TOExecutionResult.Type.WARNING )
if the element to be added is already present |
getOrCreateReadFile, perform, setSaveResult
abortOnFailure, abortOnFailure, absolute, absolute, applyPropertiesFromContext, checkDependencies, checkForBlankString, checkForEmptyString, checkForNull, clone, copy, dependsOn, equals, executeIf, executeIf, executeUnless, execution, getAbortionMessage, getAbsoluteFile, getContextAttributeName, getDependencies, getDescription, getIfConditionAttributeName, getName, getOrder, getParent, getRelativePath, getRelativePath, getSimpleClassName, getTransformationTemplate, getUnlessConditionAttributeName, hasBeenPerformed, hashCode, hashCode, isAbortOnFailure, isFileSet, isSaveResult, normalizeRelativePathSeparator, relative, set, setContextAttributeName, setName, setParent, toString, wasFileExplicitlySet
protected AddElement.IfPresent ifPresent
public T failIfPresent()
AddElement
TOExecutionResult.Type.ERROR
)
if the element to be added is already presentfailIfPresent
in interface AddElement<T extends AddElementTO>
public T warnNotAddIfPresent()
AddElement
TOExecutionResult.Type.WARNING
)
if the element to be added is already presentwarnNotAddIfPresent
in interface AddElement<T extends AddElementTO>
public T warnButAddIfPresent()
AddElement
TOExecutionResult.Type.WARNING
)
if the element to be added is already presentwarnButAddIfPresent
in interface AddElement<T extends AddElementTO>
public T noOpIfPresent()
AddElement
TOExecutionResult.Type.NO_OP
)
if the element to be added is already presentnoOpIfPresent
in interface AddElement<T extends AddElementTO>
public T overwriteIfPresent()
AddElement
TOExecutionResult.Type.SUCCESS
)
if the element to be added is already presentoverwriteIfPresent
in interface AddElement<T extends AddElementTO>