Package com.adaptris.stax.services
Class AddMetadata
- java.lang.Object
-
- com.adaptris.stax.services.AddMetadata
-
- All Implemented Interfaces:
ComponentLifecycle,PostTransform
@ComponentProfile(summary="PostTransform implementation that adds metadata", since="3.8.4") public class AddMetadata extends java.lang.Object implements PostTransformPostTransformimplementation that adds metadata.Note that this wraps
AddMetadataServiceunder the covers withAddMetadataService.setOverwrite(Boolean)true, so behaviour is consistent with the documentation for that class.In the adapter configuration file this class is aliased as stax-plugin-add-metadata which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description AddMetadata()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AdaptrisMessageapplyChanges(AdaptrisMessage msg)Apply any changes required to the message setting a metadata key to a new value.voidclose()java.util.Set<MetadataElement>getMetadataElements()voidinit()voidsetMetadataElements(java.util.Set<MetadataElement> metadata)AddMetadatawithMetadata(MetadataElement... elements)AddMetadatawithMetadata(java.util.Set<MetadataElement> e)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
start, stop
-
-
-
-
Method Detail
-
init
public void init() throws CoreException- Specified by:
initin interfaceComponentLifecycle- Throws:
CoreException
-
close
public void close()
- Specified by:
closein interfaceComponentLifecycle
-
applyChanges
public AdaptrisMessage applyChanges(AdaptrisMessage msg) throws ServiceException
Description copied from interface:PostTransformApply any changes required to the message setting a metadata key to a new value.- Specified by:
applyChangesin interfacePostTransform- Parameters:
msg- the msg- Throws:
ServiceException
-
getMetadataElements
public java.util.Set<MetadataElement> getMetadataElements()
-
setMetadataElements
public void setMetadataElements(java.util.Set<MetadataElement> metadata)
-
withMetadata
public AddMetadata withMetadata(java.util.Set<MetadataElement> e)
-
withMetadata
public AddMetadata withMetadata(MetadataElement... elements)
-
-