Class ConvertObjectMetadataService

  • All Implemented Interfaces:
    AdaptrisComponent, ComponentLifecycle, ComponentLifecycleExtension, 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 Detail

      • ConvertObjectMetadataService

        public ConvertObjectMetadataService()
      • ConvertObjectMetadataService

        public ConvertObjectMetadataService​(java.lang.String regexp)
    • Method Detail

      • 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
      • getObjectMetadataKeyRegexp

        public java.lang.String getObjectMetadataKeyRegexp()
      • setObjectMetadataKeyRegexp

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