Class GatewayTaskRecord

All Implemented Interfaces:
Serializable

public class GatewayTaskRecord extends PersistentRecord
This record holds the definition of a task. A task might be scheduled for a single execution, or might execute repeatedly.
See Also:
  • Field Details

  • Constructor Details

    • GatewayTaskRecord

      public GatewayTaskRecord()
  • Method Details

    • getMeta

      public RecordMeta<GatewayTaskRecord> getMeta()
      Description copied from class: SRecordInstance
      This must be defined in every user record's definition to access the SRecord which provides the meta data for this instance. It is normally defined as:-

       SRecord getMeta() {
         return meta;
       };
       

      The actual meta variable is thus not Serialized, but it would not be anyway as it is usually static.

      Specified by:
      getMeta in class PersistentRecord
    • getId

      public Long getId()
    • getType

      public String getType()
    • getName

      public String getName()
    • setName

      public void setName(String value)
    • getOwnerId

      public String getOwnerId()
    • setOwnerId

      public void setOwnerId(String value)
    • getTaskId

      public String getTaskId()
    • setTaskId

      public void setTaskId(String value)
    • getMode

      public ScheduleMode getMode()
    • setMode

      public void setMode(ScheduleMode mode)
    • getSchedule

      public String getSchedule()
      The meaning of this string is relative to the mode. If mode=single, it is a date. If mode=repeat, it is a chron string. *
    • setSchedule

      public void setSchedule(String value)
    • getParentId

      public Long getParentId()
      Returns null if this record does not have a parent id. Use when a GatewayTaskRecord is duplicated, and the duplicate is executed immediately. Modules can use this field to look up the original id in case they have their own records tied to the original record.
    • setParentId

      public void setParentId(Long parentId)
      Use when a GatewayTaskRecord is duplicated, and the duplicate is executed immediately. Modules can use this field to look up the original id in case they have their own records tied to the original record.
    • isForced

      public boolean isForced()
      Returns true if the user has hit the "run now" link on the page, forcing a scheduled task to run immediately.
    • setForced

      public void setForced(boolean isForced)
    • isSuspended

      public boolean isSuspended()
      Returns true if the this task is suspended, meaning that the scheduled task will not be executed at its schedule time.
    • setSuspended

      public void setSuspended(boolean isSuspended)
      Set to true to suspend this task, meaning that the scheduled task will not be executed at its scheduled time.
    • getFailData

      public String getFailData()
    • setFailData

      public void setFailData(String failData)
    • taskInErrorState

      public boolean taskInErrorState()
      Returns:
      true if the task has previously run and failed. Error state means that there is something in the FailData field, indicating which items failed during a previous run.