Interface DiscardAttributeChecker
- All Known Implementing Classes:
DefaultCheckersAndConverter,DiscardAttributeChecker.DefaultDiscardAttributeChecker,DiscardAttributeChecker.DiscardAttributeValueChecker
public interface DiscardAttributeChecker
Checks whether an attribute should be discarded or not
- Author:
- Kabir Khan
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA default implementation of DiscardAttributeCheckerstatic classAn attribute checker that discards attributes if they are one or more allowed values -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DiscardAttributeCheckerA standard checker which will discard the attribute always.static final DiscardAttributeCheckerA standard checker which will discard the attribute if set to its default value.static final DiscardAttributeCheckerA standard checker which will discard the attribute if it is undefined, as long as it is not an expression -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the attribute should be discarded if expressions are usedbooleanReturnstrueif 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 Details
-
ALWAYS
A standard checker which will discard the attribute always. -
UNDEFINED
A standard checker which will discard the attribute if it is undefined, as long as it is not an expression -
DEFAULT_VALUE
A standard checker which will discard the attribute if set to its default value.
-
-
Method Details
-
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.
-