Class MetadataAppenderService

  • All Implemented Interfaces:
    AdaptrisComponent, ComponentLifecycle, ComponentLifecycleExtension, MessageEventGenerator, Service, StateManagedComponent

    @ComponentProfile(summary="Concatenate various metadata values into one",
                      tag="service,metadata")
    public class MetadataAppenderService
    extends MetadataServiceImpl
    Service to append multiple metadata keys together to form a new key.

    If any value associated with a metadata key is null, then that value will be ignored.

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

    • Constructor Detail

      • MetadataAppenderService

        public MetadataAppenderService()

        Creates a new instance. Default key for result metatadata is 'metadata-appender-service'.

    • Method Detail

      • doService

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

        Apply the service to the message.

        Parameters:
        msg - the AdaptrisMessage to process
      • getAppendKeys

        public java.util.List<java.lang.String> getAppendKeys()

        Returns the List of metadata keys whose values are to be appended.

        Returns:
        the List of metadata keys whose values are to be appended
      • setAppendKeys

        public void setAppendKeys​(java.util.List<java.lang.String> l)

        Sets the List of metadata keys whose values are to be appended.

        Parameters:
        l - the List of metadata keys whose values are to be appended
      • addAppendKey

        public void addAppendKey​(java.lang.String string)

        Adds a metadata key whose value to append.

        Parameters:
        string - the metadata key whose value to append, may not be null or empty.
      • getResultKey

        public java.lang.String getResultKey()

        Returns the metadata key that the concatenated metadata values will be stored against.

        Returns:
        the metadata key that the concatenated metadata will be stored against
      • setResultKey

        public void setResultKey​(java.lang.String string)

        Sets the metadata key that the concatenated metadata values will be stored against.

        Parameters:
        string - the metadata key that the concatenated metadata values will be stored against, may not be null or empty.