Class ChecksumValidatorCommand
- java.lang.Object
-
- org.ikasan.connector.base.command.AbstractTransactionalResourceCommand
-
- org.ikasan.connector.basefiletransfer.outbound.command.AbstractBaseFileTransferTransactionalResourceCommand
-
- org.ikasan.connector.basefiletransfer.outbound.command.ChecksumValidatorCommand
-
- All Implemented Interfaces:
org.ikasan.connector.base.command.TransactionalResourceCommand,org.ikasan.connector.listener.TransactionCommitFailureObserverable
public class ChecksumValidatorCommand extends AbstractBaseFileTransferTransactionalResourceCommand
Command for comparing the calculated checksum of a retrieved file with that provided by the remote system, if any- Author:
- Ikasan Development Team
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringchecksumFilePathThe path of the checksum file we are validating against-
Fields inherited from class org.ikasan.connector.basefiletransfer.outbound.command.AbstractBaseFileTransferTransactionalResourceCommand
CURRENT_DIRECTORY, EOL, fileSeparator, listeners
-
-
Constructor Summary
Constructors Constructor Description ChecksumValidatorCommand()Default constructor for HibernateChecksumValidatorCommand(org.ikasan.filetransfer.util.checksum.ChecksumSupplier checksumFileParser, boolean destructive, java.lang.String checksumFilePath)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoCommit()protected voiddoRollback()java.lang.StringgetChecksumFilePath()Accessor method for checksum file pathbooleanisDestructive()Do we delete the file on successful delivery?protected org.ikasan.connector.base.command.ExecutionOutputperformExecute()execute method for subclasses to implementvoidsetDestructive(boolean destructive)Setter method to allow the destructive flag to be set later than constructionvoidsetSkip(boolean skip)Setter method to allow the skip flag to be set later than construction-
Methods inherited from class org.ikasan.connector.basefiletransfer.outbound.command.AbstractBaseFileTransferTransactionalResourceCommand
addListener, changeDirectory, deleteDir, deleteFile, doExecute, findFile, getClient, getContentAsStream, getFile, getFile, listDirectory, logFileList, notifyListeners, printWorkingDirectoryName, putFile, putWithOutputStream, renameFile
-
-
-
-
Constructor Detail
-
ChecksumValidatorCommand
public ChecksumValidatorCommand()
Default constructor for Hibernate
-
ChecksumValidatorCommand
public ChecksumValidatorCommand(org.ikasan.filetransfer.util.checksum.ChecksumSupplier checksumFileParser, boolean destructive, java.lang.String checksumFilePath)Constructor- Parameters:
checksumFileParser- The checksum file parserdestructive- Whether it's a destructive readchecksumFilePath- THe path of where the checksum file is
-
-
Method Detail
-
doCommit
protected void doCommit() throws javax.resource.ResourceException- Specified by:
doCommitin classorg.ikasan.connector.base.command.AbstractTransactionalResourceCommand- Throws:
javax.resource.ResourceException
-
performExecute
protected org.ikasan.connector.base.command.ExecutionOutput performExecute() throws javax.resource.ResourceExceptionDescription copied from class:AbstractBaseFileTransferTransactionalResourceCommandexecute method for subclasses to implement- Specified by:
performExecutein classAbstractBaseFileTransferTransactionalResourceCommand- Returns:
- ExecutionOutput
- Throws:
javax.resource.ResourceException- -
-
doRollback
protected void doRollback()
- Specified by:
doRollbackin classorg.ikasan.connector.base.command.AbstractTransactionalResourceCommand
-
setSkip
public void setSkip(boolean skip)
Setter method to allow the skip flag to be set later than construction- Parameters:
skip- skip flag to set
-
isDestructive
public boolean isDestructive()
Do we delete the file on successful delivery?- Returns:
- true if we delete, else false
-
setDestructive
public void setDestructive(boolean destructive)
Setter method to allow the destructive flag to be set later than construction- Parameters:
destructive- destructive flag to set
-
getChecksumFilePath
public java.lang.String getChecksumFilePath()
Accessor method for checksum file path- Returns:
- checksumFilePath
-
-