de.esprit.netsuite.server.batch

## Class BatchTaskManager

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<S>
    - - de.esprit.netsuite.server.AbstractServerObject<S>
      - - de.esprit.netsuite.server.AbstractInitializableServerObject<ServerContext>
        - - de.esprit.netsuite.server.batch.BatchTaskManager

- All Implemented Interfaces:
    ApplicationObject<ServerContext>, CloseableComponent, Initializable, SimpleLogSupport, Dumpable, PermissionControlled, ServerObject<ServerContext>, java.lang.AutoCloseable

      public class BatchTaskManager
      extends AbstractInitializableServerObject<ServerContext>
      implements CloseableComponent, PermissionControlled

  This class encapsulates the entries in the coservers.cfg configuration file
  Author:
    Rainer Buesch

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `LOG_CLEANUP_TASK`
    `static java.lang.String` | `TEST_PROC_TASK`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BatchTaskManager(ServerContext serverCtx)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cancelCurrentProcess(SessionId sessionId)` Stops the process if it is currently running.
    `void` | `close()`
    `AbstractBatchTask` | `fetchTaskByName(java.lang.String procName)`
    `BatchTaskConfigEntry` | `fetchTaskConfigByName(java.lang.String procName)`
    `PermissionDefinition` | `getPermissionDefinition()` Returns an object that identifies a `PermissionControlled` object with a unique name and provides a list of supported assignable permissions.
    `BatchTaskConfigEntry[]` | `getTaskConfigEntries()`
    `void` | `init()` Performs the initialization of this class.
    `void` | `saveConfig(SessionId sessionId, BatchTaskConfigEntry procCfg)`
    `void` | `scheduleTask(BatchTaskConfigEntry procCfg)`
    `AbstractBatchTask` | `startBatchTask(SessionId sessionId, java.lang.String taskName)` Runs the process directly, no matter whether it is enabled or not
    `DumpString` | `toDumpString(DumpString s)` This method allows subclasses to add values to the existing DumpString of the superclass.

    - ### Methods inherited from class de.esprit.netsuite.server.AbstractInitializableServerObject

      `checkInitialized, isInitialized, setInitialized, toString`

    - ### Methods inherited from class de.esprit.netsuite.server.AbstractServerObject

      `checkPermission, getServerConfig, getServerContext, getStatisticManager`

    - ### 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, toString`

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

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

- - ### Field Detail

    - #### LOG_CLEANUP_TASK

          public static final java.lang.String LOG_CLEANUP_TASK

      See Also:
        Constant Field Values

    - #### TEST_PROC_TASK

          public static final java.lang.String TEST_PROC_TASK

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### BatchTaskManager

          public BatchTaskManager(ServerContext serverCtx)

  - ### Method Detail

    - #### getPermissionDefinition

          public PermissionDefinition getPermissionDefinition()

      Description copied from interface: `PermissionControlled`
      Returns an object that identifies a `PermissionControlled` object with a unique name and provides a list of supported assignable permissions.
      Specified by:
        `getPermissionDefinition` in interface `PermissionControlled`

    - #### init

          public void init()
                    throws java.lang.Exception

      Description copied from interface: `Initializable`
      Performs the initialization of this class. Note that the implementation should maintain an isInitialized flag which must be set when initialization has completed.
      Specified by:
        `init` in interface `Initializable`
      Throws:
        `java.lang.Exception`

    - #### close

          public void close()

      Specified by:
        `close` in interface `java.lang.AutoCloseable`

    - #### scheduleTask

          public void scheduleTask(BatchTaskConfigEntry procCfg)
                            throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### startBatchTask

          public AbstractBatchTask startBatchTask(SessionId sessionId,
                                         java.lang.String taskName)
                                           throws java.lang.Exception

      Runs the process directly, no matter whether it is enabled or not
      Throws:
        `java.lang.Exception`

    - #### cancelCurrentProcess

          public void cancelCurrentProcess(SessionId sessionId)
                                    throws java.lang.Exception

      Stops the process if it is currently running.
      Throws:
        `java.lang.Exception`

    - #### getTaskConfigEntries

          public BatchTaskConfigEntry[] getTaskConfigEntries()

    - #### fetchTaskConfigByName

          public BatchTaskConfigEntry fetchTaskConfigByName(java.lang.String procName)
                                                     throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### fetchTaskByName

          public AbstractBatchTask fetchTaskByName(java.lang.String procName)
                                            throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### saveConfig

          public void saveConfig(SessionId sessionId,
                        BatchTaskConfigEntry procCfg)
                          throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

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

Copyright © 2014 EsprIT-Systems. All Rights Reserved.