Class ViolationsAsMetadata
- java.lang.Object
-
- com.adaptris.core.transform.schema.ViolationHandlerImpl
-
- com.adaptris.core.transform.schema.ViolationsAsMetadata
-
- All Implemented Interfaces:
SchemaViolationHandler
@ComponentProfile(summary="Render an XML representation of the schema violations as standard metadata", since="3.10.2") public class ViolationsAsMetadata extends ViolationHandlerImpl
UsesSchemaViolations
and adds it as standard metadata.This renders any schema violations as XML and stores it as standard metadata against the specified key.
In the adapter configuration file this class is aliased as schema-violations-as-metadata which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.transform.schema.ViolationHandlerImpl
DEFAULT_KEY
-
-
Constructor Summary
Constructors Constructor Description ViolationsAsMetadata()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getMetadataKey()
protected void
render(SchemaViolations violations, AdaptrisMessage msg)
void
setMetadataKey(java.lang.String metadataKey)
The metadata key.ViolationsAsMetadata
withMetadataKey(java.lang.String key)
-
Methods inherited from class com.adaptris.core.transform.schema.ViolationHandlerImpl
handle, toString
-
-
-
-
Method Detail
-
render
protected void render(SchemaViolations violations, AdaptrisMessage msg) throws ServiceException
- Specified by:
render
in classViolationHandlerImpl
- Throws:
ServiceException
-
withMetadataKey
public ViolationsAsMetadata withMetadataKey(java.lang.String key)
-
getMetadataKey
public java.lang.String getMetadataKey()
-
setMetadataKey
public void setMetadataKey(java.lang.String metadataKey)
The metadata key.If not explicitly specified defaults to "schema_violations"
-
-