Class DiscardAttributeChecker.DefaultDiscardAttributeChecker
- java.lang.Object
-
- org.jboss.as.controller.transform.description.DiscardAttributeChecker.DefaultDiscardAttributeChecker
-
- All Implemented Interfaces:
DiscardAttributeChecker
- Direct Known Subclasses:
DefaultCheckersAndConverter
,DiscardAttributeChecker.DiscardAttributeValueChecker
- Enclosing interface:
- DiscardAttributeChecker
public abstract static class DiscardAttributeChecker.DefaultDiscardAttributeChecker extends Object implements DiscardAttributeChecker
A default implementation of DiscardAttributeChecker
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.as.controller.transform.description.DiscardAttributeChecker
DiscardAttributeChecker.DefaultDiscardAttributeChecker, DiscardAttributeChecker.DiscardAttributeValueChecker
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
discardExpressions
protected boolean
discardUndefined
-
Fields inherited from interface org.jboss.as.controller.transform.description.DiscardAttributeChecker
ALWAYS, DEFAULT_VALUE, UNDEFINED
-
-
Constructor Summary
Constructors Modifier Constructor Description DefaultDiscardAttributeChecker()
Constructor.protected
DefaultDiscardAttributeChecker(boolean discardExpressions, boolean discardUndefined)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete 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 discardedprotected abstract boolean
isValueDiscardable(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context)
Gets called by the default implementations ofisOperationParameterDiscardable(PathAddress, String, ModelNode, ModelNode, TransformationContext)
andisResourceAttributeDiscardable(PathAddress, String, ModelNode, TransformationContext)
.
-
-
-
Constructor Detail
-
DefaultDiscardAttributeChecker
protected DefaultDiscardAttributeChecker(boolean discardExpressions, boolean discardUndefined)
Constructor- Parameters:
discardExpressions
-true
if the attribute should be discarded if expressions are useddiscardUndefined
-true
if the attribute should be discarded if expressions are used
-
DefaultDiscardAttributeChecker
public DefaultDiscardAttributeChecker()
Constructor. Sets it up withdiscardExpressions==false
anddiscardUndefined==true
-
-
Method Detail
-
isDiscardExpressions
public boolean isDiscardExpressions()
Description copied from interface:DiscardAttributeChecker
Returnstrue
if the attribute should be discarded if expressions are used- Specified by:
isDiscardExpressions
in interfaceDiscardAttributeChecker
- Returns:
- whether to discard if expressions are used
-
isDiscardUndefined
public boolean isDiscardUndefined()
Description copied from interface:DiscardAttributeChecker
Returnstrue
if the attribute should be discarded if it is undefined- Specified by:
isDiscardUndefined
in interfaceDiscardAttributeChecker
- Returns:
- whether to discard if the attribute is undefined
-
isOperationParameterDiscardable
public boolean isOperationParameterDiscardable(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, org.jboss.dmr.ModelNode operation, TransformationContext context)
Description copied from interface:DiscardAttributeChecker
Gets whether the given operation parameter can be discarded- Specified by:
isOperationParameterDiscardable
in interfaceDiscardAttributeChecker
- 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
public boolean isResourceAttributeDiscardable(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context)
Description copied from interface:DiscardAttributeChecker
Gets whether the given attribute can be discarded- Specified by:
isResourceAttributeDiscardable
in interfaceDiscardAttributeChecker
- 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.
-
isValueDiscardable
protected abstract boolean isValueDiscardable(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context)
Gets called by the default implementations ofisOperationParameterDiscardable(PathAddress, String, ModelNode, ModelNode, TransformationContext)
andisResourceAttributeDiscardable(PathAddress, String, ModelNode, TransformationContext)
.- Parameters:
address
- the address of the operation or resourceattributeName
- the name of the attributeattributeValue
- the value of the attributecontext
- the context of the transformation- Returns:
true
if the attribute or parameter value is not understandable by the target process and so needs to be rejected,false
otherwise.
-
-