Class ScheduleTask

  • All Implemented Interfaces:
    ITaskItem

    public class ScheduleTask
    extends java.lang.Object
    implements ITaskItem
    This class represents a task in a Schedule.
    • Constructor Summary

      Constructors 
      Constructor Description
      ScheduleTask​(com.uc4.util.XMLDocument doc, org.w3c.dom.Element task)
      Constructs a ScheduleTask from the specified XML document.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      TaskCalendar calendar()
      Gets the calendar condition of this task.
      ScheduleTask copy()
      This method is used to return the copy of the ScheduleTask.
      void copy​(ScheduleTask task)
      Method to copy the attributes from the provided ScheduleTask
      int getDayOffset()
      Returns the number of days which should are added to the start time.
      java.lang.String getIdnr()
      Returns the ID of this or ScheduleTask task.
      int getLnr()
      Returns number containing the order of activation.
      Time getStartTime()
      Returns the start time of this task.
      java.lang.String getTaskName()
      Gets the name of this Schedule or Workflow task.
      java.lang.String getType()
      Returns the object type of this task.
      boolean hasCalendarCondition()  
      boolean hasResultCondition()
      Returns true if the result condition of this Schedule task is set.
      boolean hasRuntimeCondition()  
      boolean isActive()
      Returns true if this task is active.
      TaskResult result()
      Gets the TaskResult of this task.
      TaskRuntime runtime()
      Returns the runtime settings of this task.
      void setActive​(boolean active)
      Sets this ScheduleTask active or inactive.
      void setDayOffset​(int dayOffset)
      Sets the number of days which should are added to the start time.
      protected void setLnr​(int lnr)  
      void setStartTime​(Time startTime)
      Sets the start time of this task.
      protected void store​(com.uc4.util.XMLDocument doc, org.w3c.dom.Element struct)  
      TaskValues values()
      Provides access to the values and PromptSets of a Schedule or Workflow task.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScheduleTask

        public ScheduleTask​(com.uc4.util.XMLDocument doc,
                            org.w3c.dom.Element task)
        Constructs a ScheduleTask from the specified XML document.
        Parameters:
        doc - XML Document
        task - Element containing the schedule task
    • Method Detail

      • calendar

        public TaskCalendar calendar()
        Description copied from interface: ITaskItem
        Gets the calendar condition of this task.
        Specified by:
        calendar in interface ITaskItem
        Returns:
        TaskCalendar containing the calendar conditions
      • values

        public TaskValues values()
        Description copied from interface: ITaskItem
        Provides access to the values and PromptSets of a Schedule or Workflow task.
        Specified by:
        values in interface ITaskItem
        Returns:
        Values and PromptSets
      • runtime

        public TaskRuntime runtime()
        Description copied from interface: ITaskItem
        Returns the runtime settings of this task.
        Specified by:
        runtime in interface ITaskItem
        Returns:
        Runtime settings
      • getLnr

        public int getLnr()
        Description copied from interface: ITaskItem
        Returns number containing the order of activation. A task with Lnr = 1 is executed first.
        Specified by:
        getLnr in interface ITaskItem
        Returns:
        Order of activation
      • result

        public TaskResult result()
        Gets the TaskResult of this task. The TaskResult may be used to define reactions to the end status of a task. Any task can so be re-activated and/or re-started if the specified status cannot be reached.
        Returns:
        Task result
      • getDayOffset

        public int getDayOffset()
        Returns the number of days which should are added to the start time.
        Returns:
        Number of days added to the start time
      • setDayOffset

        public void setDayOffset​(int dayOffset)
        Sets the number of days which should are added to the start time.
        Parameters:
        dayOffset - Number of days added to the start times
      • store

        protected void store​(com.uc4.util.XMLDocument doc,
                             org.w3c.dom.Element struct)
      • getTaskName

        public java.lang.String getTaskName()
        Description copied from interface: ITaskItem
        Gets the name of this Schedule or Workflow task.
        Specified by:
        getTaskName in interface ITaskItem
        Returns:
        Name of the task
      • getType

        public java.lang.String getType()
        Description copied from interface: ITaskItem
        Returns the object type of this task.
        Specified by:
        getType in interface ITaskItem
        Returns:
        Object type
      • isActive

        public boolean isActive()
        Returns true if this task is active.
        Returns:
        True if this task is active
      • setActive

        public void setActive​(boolean active)
        Sets this ScheduleTask active or inactive.
        Parameters:
        active - Boolean to enable or disable the task
      • getStartTime

        public Time getStartTime()
        Returns the start time of this task.
        Returns:
        Start time
      • setStartTime

        public void setStartTime​(Time startTime)
        Sets the start time of this task.
        Parameters:
        startTime - Start time
      • setLnr

        protected void setLnr​(int lnr)
      • hasCalendarCondition

        public boolean hasCalendarCondition()
        Specified by:
        hasCalendarCondition in interface ITaskItem
        Returns:
        true if this task has a calendar condition.
      • hasRuntimeCondition

        public boolean hasRuntimeCondition()
        Specified by:
        hasRuntimeCondition in interface ITaskItem
        Returns:
        true if this task has a runtime condition.
      • hasResultCondition

        public boolean hasResultCondition()
        Returns true if the result condition of this Schedule task is set.
        Returns:
        true if the task has a result setting
      • getIdnr

        public java.lang.String getIdnr()
        Description copied from interface: ITaskItem
        Returns the ID of this or ScheduleTask task.
        Specified by:
        getIdnr in interface ITaskItem
        Returns:
        String containing the ID
      • copy

        public ScheduleTask copy()
        This method is used to return the copy of the ScheduleTask.
        Returns:
        ScheduleTask
      • copy

        public void copy​(ScheduleTask task)
        Method to copy the attributes from the provided ScheduleTask
        Parameters:
        task - the ScheduleTask from which the attributes are to be copied
        Throws:
        java.lang.IllegalArgumentException - if the task parameter is null