de.esprit.netsuite.client.workflow

## Class AbstractFileTransferWFT<C extends ClientContext,S extends ServerContext>

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<C>
    - - de.esprit.appsuite.task.AbstractAsyncExecutable<C>
      - - de.esprit.appsuite.task.AbstractAsyncTask<C>
        - - de.esprit.appsuite.gui.task.AbstractSwingTask<C>
          - - de.esprit.appsuite.workflow.wft.AbstractWFT<C>
            - - de.esprit.netsuite.client.workflow.AbstractClientWFT<C>
              - - de.esprit.netsuite.client.workflow.AbstractFileTransferWFT<C,S>

- All Implemented Interfaces:
    ApplicationObject<C>, AsyncExecutable<C>, AsyncTask<C>, CancellableTask, LocalCancellableTask, TaskMonitorSupport, TaskEvent.Source, TaskIdHolder, WorkflowTask<C>, ErrorHandlerSupport, Renderable, SimpleLogSupport, Dumpable, Executable, ClientObject<C>, java.lang.Runnable
  Direct Known Subclasses:
    FileDownloadWFT, FileUploadWFT

      public abstract class AbstractFileTransferWFT<C extends ClientContext,S extends ServerContext>
      extends AbstractClientWFT<C>

  This workflow task runs a FileTransferAgent with the jobs added
  Author:
    Rainer Buesch

- - ### Field Summary

    - ### Fields inherited from class de.esprit.appsuite.task.AbstractAsyncExecutable

      `childTaskRef, isTestMode, monitorController, resultRef, stateFlag`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractFileTransferWFT(AbstractWorkflow workflow, java.lang.String taskName)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addJob(FileTransferJob job)` Adds a `FileTransferJob` to the underlying `FileTransferAgent`
    `void` | `cancel()` Flags the task as being cancelled.
    `void` | `clearJobs()`
    `protected FileTransferAgent<C,S>` | `createFileTransferAgent()`
    `void` | `enterTask(WorkflowTask previousTask)` Runs in the ET before the task starts to run async
    `void` | `executeAsyncImpl()` This method is executed asynchronously
    `FileTransferAgent<C,S>` | `getAgent()`
    `int` | `getJobCount()`
    `java.util.List<FileTransferJob>` | `getJobList()`
    `void` | `setTransferLocked(boolean isLocked)`
    `TaskId` | `submit(java.util.concurrent.ExecutorService pool)` Submits this task for execution to the given thread pool

    - ### Methods inherited from class de.esprit.netsuite.client.workflow.AbstractClientWFT

      `getClientConfig, getClientContext, getWorkspaceDir`

    - ### Methods inherited from class de.esprit.appsuite.workflow.wft.AbstractWFT

      `executeAsync, exitTask, getTaskIndex, getWorkflow, getWorkingDir, isDeciderTask, isTaskRepeating, setName, setTaskIndex, updateTaskName`

    - ### Methods inherited from class de.esprit.appsuite.gui.task.AbstractSwingTask

      `addMonitor, addTaskListener, awaitEventsDone, doneChildFinished, doneChildStarted, doneTaskCancelled, doneTaskFailed, doneTaskFinished, doneTaskProceeded, doneTaskStarted, doneTaskStateChanged, doneTaskSucceeded, getActionCancel, getRenderColor, getRenderIcon, getRenderText, getSwingTaskMonitor, isRegisterInTaskList, removeTaskListener, showError, showError, showError, showInfo, showInfo, showWarning, showWarning`

    - ### Methods inherited from class de.esprit.appsuite.task.AbstractAsyncTask

      `awaitFinished, awaitFinished, awaitStarted, createTaskId, deregisterTask, doOnFinish, doOnStart, doOnSuccess, executeChildTask, executeChildTask, getCurrentFuture, getMaxChildTasks, getPriority, getProcessingDuration, getStartTime, getStopWatch, handleFinish, handleStart, handleSuccess, isRegisterForCancel, isRunning, notifyProceeded, registerTask, releaseStart, run, setCurrentFuture, setMaxChildTasks, setPriority, setRegisterForCancel, setReleaseTimeout, submit, submitInternal, toString, wasSucceeded`

    - ### Methods inherited from class de.esprit.appsuite.task.AbstractAsyncExecutable

      `checkCancelled, checkForErrorAndRethrow, clearMonitors, createRunStateFlag, doOnCancel, doOnFailure, execute, executeSubTask, getError, getMaxProgressSteps, getMonitorCount, getMonitors, getName, getProgressStepCount, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, hasError, hasMonitor, isCancellable, registerTaskStateChange, removeMonitor, resetProgress, setCancellable, setLogLevel, setMaxProgressSteps, setMonitor, setName, setResult, setRunStateFlag, setTaskId, setType, shouldFireMonitor, sleepChecked, wasCancelled`

    - ### Methods inherited from class de.esprit.appsuite.launch.AbstractApplicationObject

      `getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

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

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

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

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

    - ### Methods inherited from interface de.esprit.appsuite.task.AsyncTask

      `awaitFinished, awaitFinished, awaitStarted, executeChildTask, executeChildTask, getError, getProcessingDuration, hasError, isRegisterForCancel, isRunning, releaseStart, setName, setReleaseTimeout, submit`

    - ### Methods inherited from interface de.esprit.appsuite.task.AsyncExecutable

      `checkCancelled, checkForErrorAndRethrow, executeSubTask, getName, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, isCancellable, notifyProceeded, setCancellable, setResult, setRunStateFlag, sleepChecked`

    - ### Methods inherited from interface de.esprit.appsuite.launch.ApplicationObject

      `getApplicationContext`

    - ### Methods inherited from interface de.esprit.common.type.Executable

      `execute`

    - ### Methods inherited from interface de.esprit.appsuite.task.monitor.TaskMonitorSupport

      `addMonitor, clearMonitors, getMonitorCount, getMonitors, hasMonitor, removeMonitor`

    - ### Methods inherited from interface de.esprit.common.log.SimpleLogSupport

      `getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

    - ### Methods inherited from interface java.lang.Runnable

      `run`

    - ### Methods inherited from interface de.esprit.appsuite.task.CancellableTask

      `wasCancelled`

    - ### Methods inherited from interface de.esprit.appsuite.task.TaskIdHolder

      `getTaskId`

    - ### Methods inherited from interface de.esprit.common.type.Dumpable

      `toDumpString, toDumpString, toString, toString`

- - ### Constructor Detail

    - #### AbstractFileTransferWFT

          public AbstractFileTransferWFT(AbstractWorkflow workflow,
                                 java.lang.String taskName)

  - ### Method Detail

    - #### getAgent

          public FileTransferAgent<C,S> getAgent()

    - #### createFileTransferAgent

          protected FileTransferAgent<C,S> createFileTransferAgent()

    - #### enterTask

          public void enterTask(WorkflowTask previousTask)
                         throws java.lang.Exception

      Description copied from interface: `WorkflowTask`
      Runs in the ET before the task starts to run async
      Specified by:
        `enterTask` in interface `WorkflowTask<C extends ClientContext>`
      Overrides:
        `enterTask` in class `AbstractWFT<C extends ClientContext>`
      Throws:
        `java.lang.Exception`

    - #### executeAsyncImpl

          public void executeAsyncImpl()
                                throws java.lang.Exception

      Description copied from interface: `WorkflowTask`
      This method is executed asynchronously
      Specified by:
        `executeAsyncImpl` in interface `WorkflowTask<C extends ClientContext>`
      Overrides:
        `executeAsyncImpl` in class `AbstractWFT<C extends ClientContext>`
      Throws:
        `java.lang.Exception`

    - #### setTransferLocked

          public void setTransferLocked(boolean isLocked)

    - #### submit

          public TaskId submit(java.util.concurrent.ExecutorService pool)
                        throws java.lang.Exception

      Description copied from interface: `AsyncTask`
      Submits this task for execution to the given thread pool
      Specified by:
        `submit` in interface `AsyncTask<C extends ClientContext>`
      Overrides:
        `submit` in class `AbstractAsyncTask<C extends ClientContext>`
      Throws:
        `java.lang.Exception` - if the pool is busy

    - #### addJob

          public void addJob(FileTransferJob job)

      Adds a `FileTransferJob` to the underlying `FileTransferAgent`

    - #### getJobCount

          public int getJobCount()

    - #### clearJobs

          public void clearJobs()

    - #### getJobList

          public java.util.List<FileTransferJob> getJobList()

    - #### cancel

          public void cancel()

      Description copied from class: `AbstractAsyncTask`
      Flags the task as being cancelled. The next call to `AbstractAsyncExecutable.checkCancelled()` will result a `CancellationException` being thrown. As a result `AbstractAsyncExecutable.doOnCancel()` is being called on the task.
      Specified by:
        `cancel` in interface `LocalCancellableTask`
      Overrides:
        `cancel` in class `AbstractAsyncTask<C extends ClientContext>`

Copyright © 2013 EsprIT-Systems. All Rights Reserved.