Class ConvertObjectMetadataService

java.lang.Object
com.adaptris.core.ServiceImp
com.adaptris.core.services.metadata.MetadataServiceImpl
com.adaptris.core.services.metadata.ConvertObjectMetadataService
All Implemented Interfaces:
AdaptrisComponent, ComponentLifecycle, ComponentLifecycleExtension, ConfigComment, MessageEventGenerator, Service, StateManagedComponent

@ComponentProfile(summary="Convert object metadata into normal metadata", tag="service,metadata") public class ConvertObjectMetadataService extends MetadataServiceImpl

Implementation of Service that copies Object metadata to standard metadata, overwriting standard metadata.

Object Metadata values are not easily translated to Strings; Object.toString() is used to perform the string conversion; this may produce metadata values that have no semantic meaning. The key from object metadata is preserved as the metadata key for the new element. Internally, the adapter uses String keys for object metadata; however this is not enforced for custom services, so behaviour may vary depending on what custom components are in use as the key names may not be consistent or predictable.

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

  • Constructor Details

    • ConvertObjectMetadataService

      public ConvertObjectMetadataService()
    • ConvertObjectMetadataService

      public ConvertObjectMetadataService(String regexp)
  • Method Details

    • doService

      public void doService(AdaptrisMessage msg) throws ServiceException
      Description copied from interface: Service

      Apply the service to the message.

      Parameters:
      msg - the AdaptrisMessage to process
      Throws:
      ServiceException - wrapping any underlying Exceptions
    • initService

      protected void initService() throws CoreException
      Overrides:
      initService in class MetadataServiceImpl
      Throws:
      CoreException
    • getObjectMetadataKeyRegexp

      public String getObjectMetadataKeyRegexp()
    • setObjectMetadataKeyRegexp

      public void setObjectMetadataKeyRegexp(String s)
      Set the regular expression used to parse object metadata keys.
      Parameters:
      s -
      See Also: