Interface DiscardAttributeChecker
-
- All Known Implementing Classes:
DefaultCheckersAndConverter,DiscardAttributeChecker.DefaultDiscardAttributeChecker,DiscardAttributeChecker.DiscardAttributeValueChecker
public interface DiscardAttributeCheckerChecks whether an attribute should be discarded or not- Author:
- Kabir Khan
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classDiscardAttributeChecker.DefaultDiscardAttributeCheckerA default implementation of DiscardAttributeCheckerstatic classDiscardAttributeChecker.DiscardAttributeValueCheckerAn attribute checker that discards attributes if they are one or more allowed values
-
Field Summary
Fields Modifier and Type Field Description static DiscardAttributeCheckerALWAYSA standard checker which will discard the attribute always.static DiscardAttributeCheckerDEFAULT_VALUEA standard checker which will discard the attribute if set to its default value.static DiscardAttributeCheckerUNDEFINEDA standard checker which will discard the attribute if it is undefined, as long as it is not an expression
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisDiscardExpressions()Returnstrueif the attribute should be discarded if expressions are usedbooleanisDiscardUndefined()Returnstrueif the attribute should be discarded if it is undefinedbooleanisOperationParameterDiscardable(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, org.jboss.dmr.ModelNode operation, TransformationContext context)Gets whether the given operation parameter can be discardedbooleanisResourceAttributeDiscardable(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context)Gets whether the given attribute can be discarded
-
-
-
Field Detail
-
ALWAYS
static final DiscardAttributeChecker ALWAYS
A standard checker which will discard the attribute always.
-
UNDEFINED
static final DiscardAttributeChecker UNDEFINED
A standard checker which will discard the attribute if it is undefined, as long as it is not an expression
-
DEFAULT_VALUE
static final DiscardAttributeChecker DEFAULT_VALUE
A standard checker which will discard the attribute if set to its default value.
-
-
Method Detail
-
isDiscardExpressions
boolean isDiscardExpressions()
Returnstrueif the attribute should be discarded if expressions are used- Returns:
- whether to discard if expressions are used
-
isDiscardUndefined
boolean isDiscardUndefined()
Returnstrueif the attribute should be discarded if it is undefined- Returns:
- whether to discard if the attribute is undefined
-
isOperationParameterDiscardable
boolean isOperationParameterDiscardable(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, org.jboss.dmr.ModelNode operation, TransformationContext context)
Gets whether the given operation parameter can be discarded- Parameters:
address- the address of the operationattributeName- the name of the operation parameterattributeValue- the value of the operation parameteroperation- the operation executed. This is unmodifiable.context- the context of the transformation- Returns:
trueif the operation parameter value should be discarded,falseotherwise.
-
isResourceAttributeDiscardable
boolean isResourceAttributeDiscardable(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context)
Gets whether the given attribute can be discarded- Parameters:
address- the address of the resourceattributeName- the name of the attributeattributeValue- the value of the attributecontext- the context of the transformation- Returns:
trueif the attribute value should be discarded,falseotherwise.
-
-