Class 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 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​(org.ikasan.filetransfer.util.checksum.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 org.ikasan.connector.base.command.AbstractTransactionalResourceCommand
        Throws:
        javax.resource.ResourceException
      • doRollback

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