Class AbstractTaskType

java.lang.Object
com.inductiveautomation.ignition.gateway.tasks.AbstractTaskType
All Implemented Interfaces:
TaskType, Serializable

public abstract class AbstractTaskType extends Object implements TaskType
An abstract implementation of TaskType that handles the storage of the basic traits defined by the interface.
See Also:
  • Constructor Details

    • AbstractTaskType

      public AbstractTaskType(String ownerId, String typeId, String bundleKey, boolean canCancel, boolean canSuspend)
  • Method Details

    • ownerId

      public String ownerId()
      Description copied from interface: TaskType
      Tasks are organized by owner, and can be displayed for selection based on owner. This string is a constant that is used to group tasks from the same owner.
      Specified by:
      ownerId in interface TaskType
    • typeId

      public String typeId()
      Description copied from interface: TaskType
      A name/id for the task type that identifies it relative to the owner. The combination of "ownerid" and "typeid" are used to identify particular tasks.
      Specified by:
      typeId in interface TaskType
    • getBaseBundleKey

      public String getBaseBundleKey()
      Description copied from interface: TaskType
      Returns a base Bundle key for this type. "Base" means that the task specific keys are under "base.typeid". Overall, the following keys are expected: Owner - Owner description typeid.Name - the name of the task. typeid.Desc - the description of the task typeid.Category - the category for the task
      Specified by:
      getBaseBundleKey in interface TaskType
    • getOwnerName

      public LocalizedString getOwnerName()
      Description copied from interface: TaskType
      Shortcut for baseBundleKey.Owner
      Specified by:
      getOwnerName in interface TaskType
    • getTypeName

      public LocalizedString getTypeName()
      Description copied from interface: TaskType
      Shortcut for baseBundleKey.typeId.Name
      Specified by:
      getTypeName in interface TaskType
    • canCancel

      public boolean canCancel()
      Description copied from interface: TaskType
      Returns whether or not the task can be canceled.
      Specified by:
      canCancel in interface TaskType
    • canSuspend

      public boolean canSuspend()
      Description copied from interface: TaskType
      Returns whether or not the task supports suspending and resuming.
      Specified by:
      canSuspend in interface TaskType
    • findProfileSettingsRecord

      protected <T> T findProfileSettingsRecord(GatewayContext context, PersistentRecord taskRecord)
      Convenience function for looking up the task's type-specific settings. Relies on getSettingsRecordForeignKey() to get the reference field for the settings record.