Class RejectAttributeChecker.DefaultRejectAttributeChecker
java.lang.Object
org.jboss.as.controller.transform.description.RejectAttributeChecker.DefaultRejectAttributeChecker
- All Implemented Interfaces:
RejectAttributeChecker
- Direct Known Subclasses:
RejectAttributeChecker.SimpleAcceptAttributeChecker,RejectAttributeChecker.SimpleRejectAttributeChecker
- Enclosing interface:
- RejectAttributeChecker
public abstract static class RejectAttributeChecker.DefaultRejectAttributeChecker
extends Object
implements RejectAttributeChecker
A standard implementation of RejectAttributeChecker.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jboss.as.controller.transform.description.RejectAttributeChecker
RejectAttributeChecker.DefaultRejectAttributeChecker, RejectAttributeChecker.ListRejectAttributeChecker, RejectAttributeChecker.ObjectFieldsRejectAttributeChecker, RejectAttributeChecker.SimpleAcceptAttributeChecker, RejectAttributeChecker.SimpleRejectAttributeChecker -
Field Summary
Fields inherited from interface org.jboss.as.controller.transform.description.RejectAttributeChecker
ALL, DEFINED, SIMPLE_EXPRESSIONS, UNDEFINED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the log message id used by this checker.protected abstract booleanrejectAttribute(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context) Gets called by the default implementations ofrejectOperationParameter(PathAddress, String, ModelNode, ModelNode, TransformationContext)andrejectResourceAttribute(PathAddress, String, ModelNode, TransformationContext).booleanrejectOperationParameter(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, org.jboss.dmr.ModelNode operation, TransformationContext context) Determines whether the given operation parameter value is not understandable by the target process and needs to be rejected.booleanrejectResourceAttribute(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context) Gets whether the given resource attribute value is not understandable by the target process and needs to be rejected.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.as.controller.transform.description.RejectAttributeChecker
getRejectionLogMessage
-
Constructor Details
-
DefaultRejectAttributeChecker
protected DefaultRejectAttributeChecker()Constructor
-
-
Method Details
-
rejectOperationParameter
public boolean rejectOperationParameter(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, org.jboss.dmr.ModelNode operation, TransformationContext context) Determines whether the given operation parameter value is not understandable by the target process and needs to be rejected.- Specified by:
rejectOperationParameterin interfaceRejectAttributeChecker- Parameters:
address- the address of the operationattributeName- the name of the attributeattributeValue- the value of the attributeoperation- the operation executed. This is unmodifiable.context- the context of the transformation- Returns:
trueif the parameter value is not understandable by the target process and so needs to be rejected,falseotherwise.
-
rejectResourceAttribute
public boolean rejectResourceAttribute(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context) Gets whether the given resource attribute value is not understandable by the target process and needs to be rejected.- Specified by:
rejectResourceAttributein interfaceRejectAttributeChecker- 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 is not understandable by the target process and so needs to be rejected,falseotherwise.
-
rejectAttribute
protected abstract boolean rejectAttribute(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context) Gets called by the default implementations ofrejectOperationParameter(PathAddress, String, ModelNode, ModelNode, TransformationContext)andrejectResourceAttribute(PathAddress, String, ModelNode, TransformationContext).- Parameters:
address- the address of the operationattributeName- 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.
-
getRejectionLogMessageId
Returns the log message id used by this checker. This is used to group it so that all attributes failing a type of rejction end up in the same error message. This default implementation uses the formatted log message with an empty attribute map as the id.- Specified by:
getRejectionLogMessageIdin interfaceRejectAttributeChecker- Returns:
- the log message id
-