de.esprit.netsuite.netdata.transfer

## Class FileTransferJob

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.util.TransferableObject
    - - de.esprit.netsuite.netdata.transfer.AbstractTransferJob
      - - de.esprit.netsuite.netdata.transfer.FileTransferJob

- All Implemented Interfaces:
    DeepCloneable, Dumpable, java.io.Serializable, java.lang.Cloneable

      public class FileTransferJob
      extends AbstractTransferJob

  This class describes a single file to be transferred between client and server.
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileTransferJob(SessionId sessionId, JobConstraint constr, java.io.File serverBaseDir, java.lang.String serverFileName, java.io.File clientBaseDir, java.lang.String clientFileName)`
    `FileTransferJob(SessionId sessionId, TransferDirection trDir, FileDataType trDataType, java.io.File serverBaseDir, java.lang.String serverFileName, java.io.File clientBaseDir, java.lang.String clientFileName)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkClientEntry(ClientContext clientCtx)`
    `void` | `checkConsistency()` Must be called by subclasses as a last step.
    `RemoteFileInfo` | `checkServerEntry(ServerContext serverCtx)`
    `void` | `commitOnClient()`
    `void` | `commitOnServer()`
    `int` | `getJobIndex()`
    `int` | `getMaxIndex()`
    `java.lang.Exception` | `getTestError()`
    `boolean` | `isLast()`
    `boolean` | `isTransferSkipped()` Tells whether this entry is being ignored during transfer because the source file is not required to exist.
    `void` | `rollbackOnClient()`
    `void` | `rollbackOnServer()`
    `void` | `setJobIndex(int jobIndex, int maxIndex)`
    `void` | `setTestError(java.lang.Exception error)`
    `ToString` | `toString(ToString s)` This method allows subclasses to add values to the existing ToString of the superclass.

    - ### Methods inherited from class de.esprit.netsuite.netdata.transfer.AbstractTransferJob

      `findServerFile, getClientBaseDir, getClientFile, getClientFileName, getFileDataType, getJobId, getJobName, getPercentageDone, getRealFileSize, getResourceName, getServerBaseDir, getServerFile, getServerFileName, getServerRootDir, getSessionId, getTransferDirection, isCreateTargetDir, isDownload, isKeepZippedOnServer, isSourceFileRequired, isTransferZipped, isUpload, isZippable, setClientFile, setCreateTargetDir, setJobId, setKeepZippedOnServer, setPercentageDone, setRealFileSize, setServerFile, setServerRootSubPath, setTransferZipped, setWasFoundZippedOnServer, toDumpString, wasFoundZippedOnServer`

    - ### Methods inherited from class de.esprit.common.util.TransferableObject

      `clone, deepClone`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FileTransferJob

          public FileTransferJob(SessionId sessionId,
                         TransferDirection trDir,
                         FileDataType trDataType,
                         java.io.File serverBaseDir,
                         java.lang.String serverFileName,
                         java.io.File clientBaseDir,
                         java.lang.String clientFileName)

    - #### FileTransferJob

          public FileTransferJob(SessionId sessionId,
                         JobConstraint constr,
                         java.io.File serverBaseDir,
                         java.lang.String serverFileName,
                         java.io.File clientBaseDir,
                         java.lang.String clientFileName)

  - ### Method Detail

    - #### setTestError

          public final void setTestError(java.lang.Exception error)

    - #### getTestError

          public final java.lang.Exception getTestError()

    - #### checkConsistency

          public void checkConsistency()

      Description copied from class: `AbstractTransferJob`
      Must be called by subclasses as a last step.
      Overrides:
        `checkConsistency` in class `AbstractTransferJob`

    - #### setJobIndex

          public final void setJobIndex(int jobIndex,
                         int maxIndex)

    - #### isLast

          public final boolean isLast()

    - #### getJobIndex

          public final int getJobIndex()

    - #### getMaxIndex

          public final int getMaxIndex()

    - #### checkClientEntry

          public final void checkClientEntry(ClientContext clientCtx)
                                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### isTransferSkipped

          public final boolean isTransferSkipped()

      Tells whether this entry is being ignored during transfer because the source file is not required to exist.

    - #### checkServerEntry

          public final RemoteFileInfo checkServerEntry(ServerContext serverCtx)
                                                throws ServerException

      Specified by:
        `checkServerEntry` in class `AbstractTransferJob`
      Throws:
        `ServerException`

    - #### rollbackOnServer

          public final void rollbackOnServer()

    - #### rollbackOnClient

          public final void rollbackOnClient()

    - #### commitOnServer

          public final void commitOnServer()
                                    throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### commitOnClient

          public final void commitOnClient()
                                    throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### toString

          public ToString toString(ToString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing ToString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `DumpableObject`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.