Class AbstractTaskType

  • All Implemented Interfaces:
    TaskType, java.io.Serializable

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

      • AbstractTaskType

        public AbstractTaskType​(java.lang.String ownerId,
                                java.lang.String typeId,
                                java.lang.String bundleKey,
                                boolean canCancel,
                                boolean canSuspend)
    • Method Detail

      • ownerId

        public java.lang.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 java.lang.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 java.lang.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
      • 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.