@ComponentProfile(summary="Read a set of metadata from the filesystem and add/replace current metadata",
tag="service,metadata")
public class ReadMetadataFromFilesystem
extends MetadataServiceImpl
Implementation of Service that reads metadata from the filesystem.
Used in conjunction with WriteMetadataToFilesystem to allow preservation of metadata across integration points that make
use of the filesystem.
WriteMetadataToFilesystemIn the adapter configuration file this class is aliased as read-metadata-from-filesystem which is the preferred alternative to the fully qualified classname when building your configuration.
| Modifier and Type | Class and Description |
|---|---|
static class |
ReadMetadataFromFilesystem.InputStyle |
MetadataServiceImpl.LogWrapperDEBUG, ERROR, INFO, TRACE, WARNlog| Constructor and Description |
|---|
ReadMetadataFromFilesystem() |
ReadMetadataFromFilesystem(MessageDrivenDestination d) |
| Modifier and Type | Method and Description |
|---|---|
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
MessageDrivenDestination |
getDestination() |
FileNameCreator |
getFilenameCreator() |
ReadMetadataFromFilesystem.InputStyle |
getInputStyle() |
java.lang.Boolean |
getOverwriteExistingMetadata() |
protected void |
initService() |
boolean |
overwriteExistingMetadata() |
void |
setDestination(MessageDrivenDestination d)
Set the destination where things have been written.
|
void |
setFilenameCreator(FileNameCreator creator)
Set the filename creator implementation used to determine the filename to read..
|
void |
setInputStyle(ReadMetadataFromFilesystem.InputStyle style)
Set the output style for the metadata.
|
void |
setOverwriteExistingMetadata(java.lang.Boolean b)
Overwrite any existing metadata with the contents of the file.
|
closeService, getMetadataLogger, logMetadata, logMetadata, logMetadata, logMetadata, prepare, setMetadataLogger, withMetadataLoggerchangeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stoppublic ReadMetadataFromFilesystem()
public ReadMetadataFromFilesystem(MessageDrivenDestination d)
public void doService(AdaptrisMessage msg) throws ServiceException
ServiceApply the service to the message.
msg - the AdaptrisMessage to processServiceException - wrapping any underlying Exceptionsprotected void initService()
throws CoreException
initService in class MetadataServiceImplCoreExceptionpublic ReadMetadataFromFilesystem.InputStyle getInputStyle()
public void setInputStyle(ReadMetadataFromFilesystem.InputStyle style)
style - one of Text or XML (default is null, which means Text)ReadMetadataFromFilesystem.InputStylepublic MessageDrivenDestination getDestination()
public void setDestination(MessageDrivenDestination d)
d - the destination.public java.lang.Boolean getOverwriteExistingMetadata()
public void setOverwriteExistingMetadata(java.lang.Boolean b)
b - true or false (default false).public boolean overwriteExistingMetadata()
public FileNameCreator getFilenameCreator()
public void setFilenameCreator(FileNameCreator creator)
creator -