Interface RejectAttributeChecker
- All Known Implementing Classes:
DefaultCheckersAndConverter,RejectAttributeChecker.DefaultRejectAttributeChecker,RejectAttributeChecker.ListRejectAttributeChecker,RejectAttributeChecker.ObjectFieldsRejectAttributeChecker,RejectAttributeChecker.SimpleAcceptAttributeChecker,RejectAttributeChecker.SimpleRejectAttributeChecker
public interface RejectAttributeChecker
Checks whether an attribute should be rejected or not
- Author:
- Kabir Khan
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA standard implementation of RejectAttributeChecker.static classA RejectAttributeChecker forModelType.LISTattribute valuesstatic classA RejectAttributeChecker forModelType.OBJECTattribute valuesstatic classRejects an attribute if the value is anything other than the specified value..static classRejects the attribute if the value is equal to the specified value. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RejectAttributeCheckerstatic final RejectAttributeCheckerstatic final RejectAttributeCheckerChecks a simple attribute for expressionsstatic final RejectAttributeChecker -
Method Summary
Modifier and TypeMethodDescriptiongetRejectionLogMessage(Map<String, org.jboss.dmr.ModelNode> attributes) Gets the log message if the attribute failed rejectionReturns the log message id used by this checker.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.
-
Field Details
-
SIMPLE_EXPRESSIONS
Checks a simple attribute for expressions -
DEFINED
-
UNDEFINED
-
ALL
-
-
Method Details
-
rejectOperationParameter
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.- 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
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.- 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.
-
getRejectionLogMessageId
String 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- Returns:
- the log message id
-
getRejectionLogMessage
Gets the log message if the attribute failed rejection- Parameters:
attributes- a map of all attributes failed in this checker and their values- Returns:
- the formatted log message
-