Interface RejectAttributeChecker
-
- All Known Implementing Classes:
DefaultCheckersAndConverter,RejectAttributeChecker.DefaultRejectAttributeChecker,RejectAttributeChecker.ListRejectAttributeChecker,RejectAttributeChecker.ObjectFieldsRejectAttributeChecker,RejectAttributeChecker.SimpleAcceptAttributeChecker,RejectAttributeChecker.SimpleRejectAttributeChecker
public interface RejectAttributeCheckerChecks whether an attribute should be rejected or not- Author:
- Kabir Khan
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classRejectAttributeChecker.DefaultRejectAttributeCheckerA standard implementation of RejectAttributeChecker.static classRejectAttributeChecker.ListRejectAttributeCheckerA RejectAttributeChecker forModelType.LISTattribute valuesstatic classRejectAttributeChecker.ObjectFieldsRejectAttributeCheckerA RejectAttributeChecker forModelType.OBJECTattribute valuesstatic classRejectAttributeChecker.SimpleAcceptAttributeCheckerRejects an attribute if the value is anything other than the specified value..static classRejectAttributeChecker.SimpleRejectAttributeCheckerRejects the attribute if the value is equal to the specified value.
-
Field Summary
Fields Modifier and Type Field Description static RejectAttributeCheckerALLstatic RejectAttributeCheckerDEFINEDstatic RejectAttributeCheckerSIMPLE_EXPRESSIONSChecks a simple attribute for expressionsstatic RejectAttributeCheckerUNDEFINED
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetRejectionLogMessage(Map<String,org.jboss.dmr.ModelNode> attributes)Gets the log message if the attribute failed rejectionStringgetRejectionLogMessageId()Returns 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 Detail
-
SIMPLE_EXPRESSIONS
static final RejectAttributeChecker SIMPLE_EXPRESSIONS
Checks a simple attribute for expressions
-
DEFINED
static final RejectAttributeChecker DEFINED
-
UNDEFINED
static final RejectAttributeChecker UNDEFINED
-
ALL
static final RejectAttributeChecker ALL
-
-
Method Detail
-
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
-
-