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 Object
implements PostTransform
PostTransform implementation that adds metadata.
Note that this wraps AddMetadataService under the covers with
AddMetadataService.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 -
Method Summary
Modifier and TypeMethodDescriptionApply any changes required to the message setting a metadata key to a new value.voidclose()voidinit()voidsetMetadataElements(Set<MetadataElement> metadata) withMetadata(MetadataElement... elements) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.adaptris.core.ComponentLifecycle
start, stop
-
Constructor Details
-
AddMetadata
public AddMetadata()
-
-
Method Details
-
init
- Specified by:
initin interfaceComponentLifecycle- Throws:
CoreException
-
close
public void close()- Specified by:
closein interfaceComponentLifecycle
-
applyChanges
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
-
setMetadataElements
-
withMetadata
-
withMetadata
-