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
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final booleanFields inherited from interface org.jboss.as.controller.transform.description.DiscardAttributeChecker
ALWAYS, DEFAULT_VALUE, UNDEFINED -
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructor.protectedDefaultDiscardAttributeChecker(boolean discardExpressions, boolean discardUndefined) Constructor -
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 discardedprotected abstract booleanisValueDiscardable(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).
-
Field Details
-
discardExpressions
protected final boolean discardExpressions -
discardUndefined
protected final boolean discardUndefined
-
-
Constructor Details
-
DefaultDiscardAttributeChecker
protected DefaultDiscardAttributeChecker(boolean discardExpressions, boolean discardUndefined) Constructor- Parameters:
discardExpressions-trueif the attribute should be discarded if expressions are useddiscardUndefined-trueif the attribute should be discarded if expressions are used
-
DefaultDiscardAttributeChecker
public DefaultDiscardAttributeChecker()Constructor. Sets it up withdiscardExpressions==falseanddiscardUndefined==true
-
-
Method Details
-
isDiscardExpressions
public boolean isDiscardExpressions()Description copied from interface:DiscardAttributeCheckerReturnstrueif the attribute should be discarded if expressions are used- Specified by:
isDiscardExpressionsin interfaceDiscardAttributeChecker- Returns:
- whether to discard if expressions are used
-
isDiscardUndefined
public boolean isDiscardUndefined()Description copied from interface:DiscardAttributeCheckerReturnstrueif the attribute should be discarded if it is undefined- Specified by:
isDiscardUndefinedin 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:DiscardAttributeCheckerGets whether the given operation parameter can be discarded- Specified by:
isOperationParameterDiscardablein 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:
trueif the operation parameter value should be discarded,falseotherwise.
-
isResourceAttributeDiscardable
public boolean isResourceAttributeDiscardable(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context) Description copied from interface:DiscardAttributeCheckerGets whether the given attribute can be discarded- Specified by:
isResourceAttributeDiscardablein interfaceDiscardAttributeChecker- 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.
-
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:
trueif the attribute or parameter value is not understandable by the target process and so needs to be rejected,falseotherwise.
-