Class DiscardAttributeChecker.DiscardAttributeValueChecker
- java.lang.Object
-
- org.jboss.as.controller.transform.description.DiscardAttributeChecker.DefaultDiscardAttributeChecker
-
- org.jboss.as.controller.transform.description.DiscardAttributeChecker.DiscardAttributeValueChecker
-
- All Implemented Interfaces:
DiscardAttributeChecker
- Enclosing interface:
- DiscardAttributeChecker
public static class DiscardAttributeChecker.DiscardAttributeValueChecker extends DiscardAttributeChecker.DefaultDiscardAttributeChecker
An attribute checker that discards attributes if they are one or more allowed values
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.as.controller.transform.description.DiscardAttributeChecker
DiscardAttributeChecker.DefaultDiscardAttributeChecker, DiscardAttributeChecker.DiscardAttributeValueChecker
-
-
Field Summary
-
Fields inherited from class org.jboss.as.controller.transform.description.DiscardAttributeChecker.DefaultDiscardAttributeChecker
discardExpressions, discardUndefined
-
Fields inherited from interface org.jboss.as.controller.transform.description.DiscardAttributeChecker
ALWAYS, DEFAULT_VALUE, UNDEFINED
-
-
Constructor Summary
Constructors Constructor Description DiscardAttributeValueChecker(boolean discardExpressions, boolean discardUndefined, org.jboss.dmr.ModelNode... values)Constructor.DiscardAttributeValueChecker(org.jboss.dmr.ModelNode... values)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisValueDiscardable(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context)Gets called by the default implementations ofDiscardAttributeChecker.DefaultDiscardAttributeChecker.isOperationParameterDiscardable(PathAddress, String, ModelNode, ModelNode, TransformationContext)andDiscardAttributeChecker.DefaultDiscardAttributeChecker.isResourceAttributeDiscardable(PathAddress, String, ModelNode, TransformationContext).-
Methods inherited from class org.jboss.as.controller.transform.description.DiscardAttributeChecker.DefaultDiscardAttributeChecker
isDiscardExpressions, isDiscardUndefined, isOperationParameterDiscardable, isResourceAttributeDiscardable
-
-
-
-
Constructor Detail
-
DiscardAttributeValueChecker
public DiscardAttributeValueChecker(org.jboss.dmr.ModelNode... values)
Constructor. Discards if the attribute value is either undefined or matches one of the allowed values;- Parameters:
values- the allowed values
-
DiscardAttributeValueChecker
public DiscardAttributeValueChecker(boolean discardExpressions, boolean discardUndefined, org.jboss.dmr.ModelNode... values)Constructor. Discards if the attribute value if it matches one of the passed in values;- Parameters:
discardExpressions-trueif the attribute should be discarded if expressions are useddiscardUndefined-trueif the attribute should be discarded if expressions are usedvalues- the allowed values
-
-
Method Detail
-
isValueDiscardable
protected boolean isValueDiscardable(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context)
Description copied from class:DiscardAttributeChecker.DefaultDiscardAttributeCheckerGets called by the default implementations ofDiscardAttributeChecker.DefaultDiscardAttributeChecker.isOperationParameterDiscardable(PathAddress, String, ModelNode, ModelNode, TransformationContext)andDiscardAttributeChecker.DefaultDiscardAttributeChecker.isResourceAttributeDiscardable(PathAddress, String, ModelNode, TransformationContext).- Specified by:
isValueDiscardablein classDiscardAttributeChecker.DefaultDiscardAttributeChecker- 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:
trueif the attribute or parameter value is not understandable by the target process and so needs to be rejected,falseotherwise.
-
-