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

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.DeliverBatchCommand
All Implemented Interfaces:
TransactionalResourceCommand

public class DeliverBatchCommand
extends AbstractBaseFileTransferTransactionalResourceCommand

Delivers a batch of files via file transfer

Author:
Ikasan Development Team

Field Summary
 
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
DeliverBatchCommand(java.lang.String outputDirectory, boolean overwriteExisting)
          Constructor
 
Method Summary
protected  void doCommit()
          (non-Javadoc) Needs to move everything out of the temp directory to which it was delivered, to its final destination
protected  void doRollback()
           
 java.lang.String getBatchFolder()
           
 java.lang.String getTempDirectory()
           
 boolean isPutAttempted()
          Accessor for putAttempted
protected  ExecutionOutput performExecute()
          execute method for subclasses to implement
 void setIdGenerator(UniqueIdGenerator idGenerator)
          allows the default id generator to be overridden
 
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
 

Constructor Detail

DeliverBatchCommand

public DeliverBatchCommand(java.lang.String outputDirectory,
                           boolean overwriteExisting)
Constructor

Parameters:
outputDirectory - The directory we're delivering to
overwriteExisting - Whether we overwrite existing files or not
Method Detail

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 - -

doCommit

protected void doCommit()
                 throws javax.resource.ResourceException
(non-Javadoc) Needs to move everything out of the temp directory to which it was delivered, to its final destination

Specified by:
doCommit in class AbstractTransactionalResourceCommand
Throws:
javax.resource.ResourceException
See Also:
AbstractTransactionalResourceCommand.doCommit()

doRollback

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

getTempDirectory

public java.lang.String getTempDirectory()
Returns:
tempDirectory

getBatchFolder

public java.lang.String getBatchFolder()
Returns:
batchFolder

setIdGenerator

public void setIdGenerator(UniqueIdGenerator idGenerator)
allows the default id generator to be overridden

Parameters:
idGenerator - The id generator

isPutAttempted

public boolean isPutAttempted()
Accessor for putAttempted

Returns:
putAttempted


Copyright © 2007-2010 Ikasan. All Rights Reserved.