Class RejectAttributeChecker.ObjectFieldsRejectAttributeChecker

    • 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 interface RejectAttributeChecker
        Parameters:
        address - the address of the operation
        attributeName - the name of the attribute
        attributeValue - the value of the attribute
        operation - 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 interface RejectAttributeChecker
        Parameters:
        address - the address of the resource
        attributeName - the name of the attribute
        attributeValue - the value of the attribute
        context - 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 interface RejectAttributeChecker
        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 interface RejectAttributeChecker
        Parameters:
        attributes - a map of all attributes failed in this checker and their values
        Returns:
        the formatted log message