public class ObjectMetadataExceptionHandler extends DefaultValidationExceptionHandler
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.
log
Constructor and Description |
---|
ObjectMetadataExceptionHandler() |
ObjectMetadataExceptionHandler(java.lang.Boolean b,
java.lang.String key) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getObjectMetadataKey() |
java.lang.Boolean |
getThrowException() |
void |
handle(org.everit.json.schema.ValidationException exc,
AdaptrisMessage msg) |
void |
setObjectMetadataKey(java.lang.String objectMetadataKey) |
void |
setThrowException(java.lang.Boolean b)
After adding the ValidationException as object metadata throw an exception.
|
buildExceptionMessage
public ObjectMetadataExceptionHandler()
public ObjectMetadataExceptionHandler(java.lang.Boolean b, java.lang.String key)
public void handle(org.everit.json.schema.ValidationException exc, AdaptrisMessage msg) throws ServiceException
handle
in interface ValidationExceptionHandler
handle
in class DefaultValidationExceptionHandler
ServiceException
public java.lang.String getObjectMetadataKey()
public void setObjectMetadataKey(java.lang.String objectMetadataKey)
public java.lang.Boolean getThrowException()
public void setThrowException(java.lang.Boolean b)
b
- true to throw an exception; false otherwise (default true).