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 Classes Modifier and Type Interface Description static class
RejectAttributeChecker.DefaultRejectAttributeChecker
A standard implementation of RejectAttributeChecker.static class
RejectAttributeChecker.ListRejectAttributeChecker
A RejectAttributeChecker forModelType.LIST
attribute valuesstatic class
RejectAttributeChecker.ObjectFieldsRejectAttributeChecker
A RejectAttributeChecker forModelType.OBJECT
attribute valuesstatic class
RejectAttributeChecker.SimpleAcceptAttributeChecker
Rejects an attribute if the value is anything other than the specified value..static class
RejectAttributeChecker.SimpleRejectAttributeChecker
Rejects the attribute if the value is equal to the specified value.
-
Field Summary
Fields Modifier and Type Field Description static RejectAttributeChecker
ALL
static RejectAttributeChecker
DEFINED
static RejectAttributeChecker
SIMPLE_EXPRESSIONS
Checks a simple attribute for expressionsstatic RejectAttributeChecker
UNDEFINED
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getRejectionLogMessage(Map<String,org.jboss.dmr.ModelNode> attributes)
Gets the log message if the attribute failed rejectionString
getRejectionLogMessageId()
Returns the log message id used by this checker.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.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.
-
-
-
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:
true
if the parameter value is not understandable by the target process and so needs to be rejected,false
otherwise.
-
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:
true
if the attribute value is not understandable by the target process and so needs to be rejected,false
otherwise.
-
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
-
-