de.esprit.appsuite.workflow.wft

## Class AbstractDataParserWFT<C extends ApplicationContext>

- 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.io.parser.DataParserTask<C>
            - - de.esprit.appsuite.workflow.wft.AbstractDataParserWFT<C>

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

      public abstract class AbstractDataParserWFT<C extends ApplicationContext>
      extends DataParserTask<C>
      implements WorkflowTask<C>

  This is the base class for all `WorkflowTask` implementations. Such a task is being run as a child task within an `AbstractWorkflow`.
  Author:
    Rainer Buesch

- - ### Field Summary

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

      `childTaskRef, isTestMode, monitorController, resultRef, stateFlag`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `AbstractDataParserWFT(AbstractWorkflow<C> workflow)`
    `` | `AbstractDataParserWFT(AbstractWorkflow<C> workflow, DataParser parser)`
    `` | `AbstractDataParserWFT(AbstractWorkflow<C> workflow, java.lang.String name)`
    `protected` | `AbstractDataParserWFT(AbstractWorkflow<C> workflow, java.lang.String name, DataParser parser)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `enterTask(WorkflowTask previousTask)` Runs in the ET before the task starts to run async
    `void` | `executeAsync()` Must be overridden to perform the async part.
    `void` | `executeAsyncImpl()` This method is executed asynchronously
    `void` | `exitTask()` Runs in the ET after the task has run async
    `int` | `getTaskIndex()` Returns the index of this task within the controlling workflow
    `<W extends AbstractWorkflow<C>> W` | `getWorkflow()` Returns the workflow this task obtains to.
    `java.io.File` | `getWorkingDir()` Returns the working-dir of the executing task.
    `boolean` | `isDeciderTask()` Tells, whether this is a decider-WFT.
    `boolean` | `isTaskRepeating()` Is called after the task has been executed.
    `void` | `setName(java.lang.String taskName)` Overridden to allow dynamic taskName setting.
    `void` | `setTaskIndex(int taskIndex, WorkflowTask previousTask)` Sets the previous task from which this task may have to overtake results
    `void` | `updateTaskName()` Is called when a change in the task-naming may be required.

    - ### Methods inherited from class de.esprit.appsuite.io.parser.DataParserTask

      `getParser, setParser`

    - ### 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, cancel, 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, 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, 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.LocalCancellableTask

      `cancel`

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

    - #### AbstractDataParserWFT

          public AbstractDataParserWFT(AbstractWorkflow<C> workflow)

    - #### AbstractDataParserWFT

          public AbstractDataParserWFT(AbstractWorkflow<C> workflow,
                               java.lang.String name)

    - #### AbstractDataParserWFT

          public AbstractDataParserWFT(AbstractWorkflow<C> workflow,
                               DataParser parser)

    - #### AbstractDataParserWFT

          protected AbstractDataParserWFT(AbstractWorkflow<C> workflow,
                               java.lang.String name,
                               DataParser parser)

  - ### Method Detail

    - #### setTaskIndex

          public void setTaskIndex(int taskIndex,
                          WorkflowTask previousTask)

      Description copied from interface: `WorkflowTask`
      Sets the previous task from which this task may have to overtake results
      Specified by:
        `setTaskIndex` in interface `WorkflowTask<C extends ApplicationContext>`

    - #### getTaskIndex

          public int getTaskIndex()

      Description copied from interface: `WorkflowTask`
      Returns the index of this task within the controlling workflow
      Specified by:
        `getTaskIndex` in interface `WorkflowTask<C extends ApplicationContext>`

    - #### setName

          public void setName(java.lang.String taskName)

      Overridden to allow dynamic taskName setting. The name change is forwarded to the according `TaskCheckLabel` in the `WorkflowMonitorDialog`
      Specified by:
        `setName` in interface `AsyncExecutable<C extends ApplicationContext>`
      Overrides:
        `setName` in class `AbstractAsyncExecutable<C extends ApplicationContext>`

    - #### 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 ApplicationContext>`
      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 ApplicationContext>`
      Throws:
        `java.lang.Exception`

    - #### exitTask

          public void exitTask()
                        throws java.lang.Exception

      Description copied from interface: `WorkflowTask`
      Runs in the ET after the task has run async
      Specified by:
        `exitTask` in interface `WorkflowTask<C extends ApplicationContext>`
      Throws:
        `java.lang.Exception`

    - #### isTaskRepeating

          public boolean isTaskRepeating()

      Description copied from interface: `WorkflowTask`
      Is called after the task has been executed. As long as this method returns true the task will be re-submitted again.
      Specified by:
        `isTaskRepeating` in interface `WorkflowTask<C extends ApplicationContext>`

    - #### getWorkflow

          public <W extends AbstractWorkflow<C>> W getWorkflow()

      Description copied from interface: `WorkflowTask`
      Returns the workflow this task obtains to.
      Specified by:
        `getWorkflow` in interface `WorkflowTask<C extends ApplicationContext>`

    - #### getWorkingDir

          public java.io.File getWorkingDir()

      Description copied from interface: `WorkflowTask`
      Returns the working-dir of the executing task.
      Specified by:
        `getWorkingDir` in interface `WorkflowTask<C extends ApplicationContext>`

    - #### executeAsync

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

      Description copied from class: `AbstractAsyncTask`
      Must be overridden to perform the async part. From within this method you may directly call `AbstractAsyncTask.notifyProceeded(Object, int, int, String)` in order to notify about task progress. Note: the running task should periodically call `AbstractAsyncExecutable.checkCancelled()` in order to detect cancellation.
      Specified by:
        `executeAsync` in interface `AsyncExecutable<C extends ApplicationContext>`
      Overrides:
        `executeAsync` in class `DataParserTask<C extends ApplicationContext>`
      Throws:
        `java.lang.Exception`
      See Also:
        `for synchronous execution`

    - #### isDeciderTask

          public boolean isDeciderTask()

      Description copied from interface: `WorkflowTask`
      Tells, whether this is a decider-WFT. Such a WFT will ask the user for a decision by popping up an choice editor with choosable `CheckOption`s.
      Specified by:
        `isDeciderTask` in interface `WorkflowTask<C extends ApplicationContext>`

    - #### updateTaskName

          public void updateTaskName()

      Description copied from interface: `WorkflowTask`
      Is called when a change in the task-naming may be required.
      Specified by:
        `updateTaskName` in interface `WorkflowTask<C extends ApplicationContext>`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.