public class RetrieveFileCommand extends AbstractBaseFileTransferTransactionalResourceCommand
| Modifier and Type | Field and Description |
|---|---|
protected BaseFileTransferDao |
dao
Data Access Object for Base File Transfer
|
protected boolean |
destructive
Whether or not to destroy the file after we pick it up
|
protected String |
renameExtension
Extension with which to rename successfully retrieved files
As optional timestamp can be specified by using a pattern of
/[dateFormat]/ in the renameExtension
e.g.
|
protected boolean |
renameOnSuccess
Rename the file on successful retrieval
|
protected Pattern |
renameTimestampExtensionPattern
Pattern used in replacing a timestamp in a rename extension, for instance, captures /[dateFormat]/
|
protected String |
sourcePath
The original source path of the file we are retrieving
|
CURRENT_DIRECTORY, EOL, fileSeparator, listenersCOMMIT_IN_PROGRESS, COMPLETED_COMMITTING, EXECUTED_STATE, EXECUTION_IN_PROGRESS, executionContext, INITIALISED_STATE, ROLLBACK_IN_PROGRESS, ROLLED_BACK_STATE, transactionalResource| Modifier | Constructor and Description |
|---|---|
protected |
RetrieveFileCommand()
No args constructor required by Hibernate and unit tests
|
|
RetrieveFileCommand(BaseFileTransferDao dao,
boolean renameOnSuccess,
String renameExtension,
boolean moveOnSuccess,
String moveOnSuccessNewPath,
boolean destructive)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doCommit()
(non-Javadoc)
|
protected void |
doRollback()
(non-Javadoc)
|
protected String |
expandRenameExtension() |
String |
getMoveNewPath()
Get the new path a file is being moved to.
|
String |
getRenameExtension()
Get the extension that we'rerenaming the file with
|
String |
getSourcePath()
Accessor method for source path
|
boolean |
isDestructive()
Do we delete the file on successful delivery?
|
boolean |
isMoveOnSuccess()
Do we move the file on successful delivery?
|
boolean |
isRenameOnSuccess()
Do we rename the file on successful delivery?
|
protected void |
parseTimestampFormat() |
protected ExecutionOutput |
performExecute()
(non-Javadoc)
|
protected void |
setRenameExtension(String renameExtension)
Private setter used by Hibernate
|
String |
toString() |
addListener, changeDirectory, deleteDir, deleteFile, doExecute, findFile, getClient, getContentAsStream, getFile, getFile, listDirectory, logFileList, notifyListeners, printWorkingDirectoryName, putFile, putWithOutputStream, renameFilecommit, execute, getBeanFactory, getExecutionTimestamp, getId, getState, getXid, rollback, setBeanFactory, setExecutionContext, setTransactionalResource, setTransactionJournal, setXidprotected BaseFileTransferDao dao
protected String sourcePath
protected boolean renameOnSuccess
protected String renameExtension
protected boolean destructive
protected Pattern renameTimestampExtensionPattern
protected RetrieveFileCommand()
public RetrieveFileCommand(BaseFileTransferDao dao, boolean renameOnSuccess, String renameExtension, boolean moveOnSuccess, String moveOnSuccessNewPath, boolean destructive)
dao - hibernateDAOrenameOnSuccess - flagrenameExtension - to rename filemoveOnSuccess - flagmoveOnSuccessNewPath - to move filedestructive - flagprotected ExecutionOutput performExecute() throws javax.resource.ResourceException
performExecute in class AbstractBaseFileTransferTransactionalResourceCommandjavax.resource.ResourceException - -AbstractBaseFileTransferTransactionalResourceCommand.performExecute()protected void doCommit()
throws javax.resource.ResourceException
doCommit in class AbstractTransactionalResourceCommandjavax.resource.ResourceExceptionAbstractTransactionalResourceCommand.doCommit()protected void doRollback()
doRollback in class AbstractTransactionalResourceCommandAbstractTransactionalResourceCommand.doRollback()protected String expandRenameExtension()
protected void parseTimestampFormat()
public String toString()
toString in class ObjectObject.toString()public String getSourcePath()
public boolean isRenameOnSuccess()
public String getRenameExtension()
protected void setRenameExtension(String renameExtension)
renameExtension - when renaming filepublic boolean isDestructive()
public boolean isMoveOnSuccess()
public String getMoveNewPath()
Copyright © 2007-2017 Ikasan. All Rights Reserved.