public abstract class ChangeOrRemoveElementTO<T extends ChangeOrRemoveElementTO> extends TransformationOperation<T> implements ChangeOrRemoveElement<T>
ChangeOrRemoveElement
implementation ready for TransformationOperation
subclasses.
Protected instance variable ifNotPresent
can be used when deciding the result type,
in case the element to be changed or removed is not present.ChangeOrRemoveElement.IfNotPresent
Modifier and Type | Field and Description |
---|---|
protected ChangeOrRemoveElement.IfNotPresent |
ifNotPresent |
UTILITY_NAME_SYNTAX
Constructor and Description |
---|
ChangeOrRemoveElementTO() |
Modifier and Type | Method and Description |
---|---|
T |
failIfNotPresent()
Fail (
TOExecutionResult.Type.ERROR )
if the element to be changed or removed is not present |
T |
noOpIfNotPresent()
Do nothing, not warn neither fail, (
TOExecutionResult.Type.NO_OP )
if the element to be changed or removed is not present |
T |
warnIfNotPresent()
Warn (
TOExecutionResult.Type.WARNING )
if the element to be changed or removed is not present |
getOrCreateReadFile, perform, setSaveResult
abortOnFailure, 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, getTransformationTemplate, getUnlessConditionAttributeName, hasBeenPerformed, hashCode, hashCode, isFileSet, isSaveResult, normalizeRelativePathSeparator, relative, set, setContextAttributeName, setName, setParent, toString, wasFileExplicitlySet
protected ChangeOrRemoveElement.IfNotPresent ifNotPresent
public T failIfNotPresent()
ChangeOrRemoveElement
TOExecutionResult.Type.ERROR
)
if the element to be changed or removed is not presentfailIfNotPresent
in interface ChangeOrRemoveElement<T extends ChangeOrRemoveElementTO>
public T warnIfNotPresent()
ChangeOrRemoveElement
TOExecutionResult.Type.WARNING
)
if the element to be changed or removed is not presentwarnIfNotPresent
in interface ChangeOrRemoveElement<T extends ChangeOrRemoveElementTO>
public T noOpIfNotPresent()
ChangeOrRemoveElement
TOExecutionResult.Type.NO_OP
)
if the element to be changed or removed is not presentnoOpIfNotPresent
in interface ChangeOrRemoveElement<T extends ChangeOrRemoveElementTO>
Copyright © 2018. All rights reserved.