Class RejectAttributeChecker.ObjectFieldsRejectAttributeChecker
- java.lang.Object
-
- org.jboss.as.controller.transform.description.RejectAttributeChecker.ObjectFieldsRejectAttributeChecker
-
- All Implemented Interfaces:
RejectAttributeChecker
- Enclosing interface:
- RejectAttributeChecker
public static class RejectAttributeChecker.ObjectFieldsRejectAttributeChecker extends Object implements RejectAttributeChecker
A RejectAttributeChecker forModelType.OBJECT
attribute values
-
-
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 Constructor Description ObjectFieldsRejectAttributeChecker(Map<String,RejectAttributeChecker> fields)
Constructor
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Constructor Detail
-
ObjectFieldsRejectAttributeChecker
public ObjectFieldsRejectAttributeChecker(Map<String,RejectAttributeChecker> fields)
Constructor- Parameters:
fields
- map of keys in the object type and the RejectAttributeChecker to use to check the entries
-
-
Method Detail
-
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:
rejectOperationParameter
in 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:
true
if the parameter value is not understandable by the target process and so needs to be rejected,false
otherwise.
-
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:
rejectResourceAttribute
in interfaceRejectAttributeChecker
- 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
public String getRejectionLogMessageId()
Description copied from interface:RejectAttributeChecker
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- Specified by:
getRejectionLogMessageId
in interfaceRejectAttributeChecker
- Returns:
- the log message id
-
getRejectionLogMessage
public String getRejectionLogMessage(Map<String,org.jboss.dmr.ModelNode> attributes)
Description copied from interface:RejectAttributeChecker
Gets the log message if the attribute failed rejection- Specified by:
getRejectionLogMessage
in interfaceRejectAttributeChecker
- Parameters:
attributes
- a map of all attributes failed in this checker and their values- Returns:
- the formatted log message
-
-