Class Base64DecodeMetadataService

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

@ComponentProfile(summary="Base64 decode an item of metadata", tag="service,metadata,base64") public class Base64DecodeMetadataService extends Base64MetadataService
Base64 decods an item of metadata.

Each matching metadata key from ReformatMetadata.getMetadataKeyRegexp() will be decoded, and the value overwitten with the bytes after translating it into a String with the specified InterlokMessage.getContentEncoding()

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

  • Constructor Details

    • Base64DecodeMetadataService

      public Base64DecodeMetadataService()
    • Base64DecodeMetadataService

      public Base64DecodeMetadataService(String regexp)
  • Method Details

    • reformat

      public String reformat(String s, String charEncoding) throws Exception
      Description copied from interface: MetadataReformatter
      Reformat a metadata value
      Parameters:
      s - the string to reformat
      charEncoding - the charset of the message
      Returns:
      the replacment string.
      Throws:
      Exception