Class CopyMetadataService

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

    @ComponentProfile(summary="Copy metadata values to other metadata keys",
                      tag="service,metadata")
    public class CopyMetadataService
    extends MetadataServiceImpl
    Copies metadata from one key to another.

    Updates message metadata by

    • obtaining the metadata value stored against the 'original' key configured as the key in the metadata-keys section
    • copying this value to the 'new' key configured as the value of the associated metadata-keys element
    • .

      If the configured 'original' metadata key does not exist, then metadata is not copied, if the 'new' metadata key already exists, it is overwritten.

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