Class ObjectMetadataExceptionHandler

  • All Implemented Interfaces:
    ValidationExceptionHandler

    @ComponentProfile(summary="Store schema violations as object metadata",
                      tag="json,validation")
    public class ObjectMetadataExceptionHandler
    extends DefaultValidationExceptionHandler
    Implementation of ValidationExceptionHandler that stores the actual exception as object metadata.

    In the adapter configuration file this class is aliased as json-schema-validation-exception-as-object-metadata which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • ObjectMetadataExceptionHandler

        public ObjectMetadataExceptionHandler()
      • ObjectMetadataExceptionHandler

        public ObjectMetadataExceptionHandler​(java.lang.Boolean b,
                                              java.lang.String key)
    • Method Detail

      • getObjectMetadataKey

        public java.lang.String getObjectMetadataKey()
      • setObjectMetadataKey

        public void setObjectMetadataKey​(java.lang.String objectMetadataKey)
      • getThrowException

        public java.lang.Boolean getThrowException()
      • setThrowException

        public void setThrowException​(java.lang.Boolean b)
        After adding the ValidationException as object metadata throw an exception.
        Parameters:
        b - true to throw an exception; false otherwise (default true).