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 Classes Modifier and Type Interface Description static class
DiscardAttributeChecker.DefaultDiscardAttributeChecker
A default implementation of DiscardAttributeCheckerstatic class
DiscardAttributeChecker.DiscardAttributeValueChecker
An attribute checker that discards attributes if they are one or more allowed values
-
Field Summary
Fields Modifier and Type Field Description static DiscardAttributeChecker
ALWAYS
A standard checker which will discard the attribute always.static DiscardAttributeChecker
DEFAULT_VALUE
A standard checker which will discard the attribute if set to its default value.static DiscardAttributeChecker
UNDEFINED
A 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 boolean
isDiscardExpressions()
Returnstrue
if the attribute should be discarded if expressions are usedboolean
isDiscardUndefined()
Returnstrue
if the attribute should be discarded if it is undefinedboolean
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 discardedboolean
isResourceAttributeDiscardable(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()
Returnstrue
if the attribute should be discarded if expressions are used- Returns:
- whether to discard if expressions are used
-
isDiscardUndefined
boolean isDiscardUndefined()
Returnstrue
if 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:
true
if the operation parameter value should be discarded,false
otherwise.
-
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:
true
if the attribute value should be discarded,false
otherwise.
-
-