org.ikasan.connector.basefiletransfer.outbound.command
Class ChecksumValidatorCommand

java.lang.Object
  extended by org.ikasan.connector.base.command.AbstractTransactionalResourceCommand
      extended by org.ikasan.connector.basefiletransfer.outbound.command.AbstractBaseFileTransferTransactionalResourceCommand
          extended by org.ikasan.connector.basefiletransfer.outbound.command.ChecksumValidatorCommand
All Implemented Interfaces:
TransactionalResourceCommand

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
protected  java.lang.String checksumFilePath
          The path of the checksum file we are validating against
 
Fields inherited from class org.ikasan.connector.basefiletransfer.outbound.command.AbstractBaseFileTransferTransactionalResourceCommand
CURRENT_DIRECTORY, EOL, fileSeparator
 
Fields inherited from class org.ikasan.connector.base.command.AbstractTransactionalResourceCommand
COMMIT_IN_PROGRESS, COMPLETED_COMMITTING, EXECUTED_STATE, EXECUTION_IN_PROGRESS, executionContext, INITIALISED_STATE, ROLLBACK_IN_PROGRESS, ROLLED_BACK_STATE, transactionalResource
 
Constructor Summary
ChecksumValidatorCommand()
          Default constructor for Hibernate
ChecksumValidatorCommand(ChecksumSupplier checksumFileParser, boolean destructive, java.lang.String checksumFilePath)
          Constructor
 
Method Summary
protected  void doCommit()
           
protected  void doRollback()
           
 java.lang.String getChecksumFilePath()
          Accessor method for checksum file path
 boolean isDestructive()
          Do we delete the file on successful delivery?
protected  ExecutionOutput performExecute()
          execute method for subclasses to implement
 void setDestructive(boolean destructive)
          Setter method to allow the destructive flag to be set later than construction
 void setSkip(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
changeDirectory, deleteDir, deleteFile, doExecute, findFile, getClient, getContentAsStream, getFile, getFile, listDirectory, logFileList, printWorkingDirectoryName, putFile, putWithOutputStream, renameFile
 
Methods inherited from class org.ikasan.connector.base.command.AbstractTransactionalResourceCommand
commit, execute, getBeanFactory, getExecutionTimestamp, getId, getState, getXid, rollback, setBeanFactory, setExecutionContext, setTransactionalResource, setTransactionJournal, setXid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

checksumFilePath

protected java.lang.String checksumFilePath
The path of the checksum file we are validating against

Constructor Detail

ChecksumValidatorCommand

public ChecksumValidatorCommand()
Default constructor for Hibernate


ChecksumValidatorCommand

public ChecksumValidatorCommand(ChecksumSupplier checksumFileParser,
                                boolean destructive,
                                java.lang.String checksumFilePath)
Constructor

Parameters:
checksumFileParser - The checksum file parser
destructive - Whether it's a destructive read
checksumFilePath - THe path of where the checksum file is
Method Detail

doCommit

protected void doCommit()
                 throws javax.resource.ResourceException
Specified by:
doCommit in class AbstractTransactionalResourceCommand
Throws:
javax.resource.ResourceException

performExecute

protected ExecutionOutput performExecute()
                                  throws javax.resource.ResourceException
Description copied from class: AbstractBaseFileTransferTransactionalResourceCommand
execute method for subclasses to implement

Specified by:
performExecute in class AbstractBaseFileTransferTransactionalResourceCommand
Returns:
ExecutionOutput
Throws:
javax.resource.ResourceException - -

doRollback

protected void doRollback()
Specified by:
doRollback in class 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


Copyright © 2007-2010 Ikasan. All Rights Reserved.