@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.
WriteMetadataToFilesystem
In 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.LogWrapper
DEBUG, ERROR, INFO, TRACE, WARN
log
CONFIRMATION_ID_KEY
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, withMetadataLogger
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getLookupName, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setLookupName, setUniqueId, start, stop
public ReadMetadataFromFilesystem()
public ReadMetadataFromFilesystem(MessageDrivenDestination d)
public void doService(AdaptrisMessage msg) throws ServiceException
Service
Apply the service to the message.
msg
- the AdaptrisMessage
to processServiceException
- wrapping any underlying Exception
sprotected void initService() throws CoreException
initService
in class MetadataServiceImpl
CoreException
public ReadMetadataFromFilesystem.InputStyle getInputStyle()
public void setInputStyle(ReadMetadataFromFilesystem.InputStyle style)
style
- one of Text or XML (default is null, which means Text)ReadMetadataFromFilesystem.InputStyle
public 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
-