Class SchedulableJobModel

java.lang.Object
com.highdeal.bart.hci.SchedulableJobModel
All Implemented Interfaces:
XMLMarshallable, Comparable<SchedulableJobModel>
Direct Known Subclasses:
CleanDatabaseJobModel, RunRatingSessionJobModel

public abstract class SchedulableJobModel extends Object implements XMLMarshallable, Comparable<SchedulableJobModel>
This abstract Java class represents a job for BART Server as it is presented on client side and in the BART Tool user interface.

A schedulable job for BART is defined by three parameters:

  • Its polling period or its recurrence
  • Its status (active of inactive)
  • Its description

The known Java implementations of this class are:

  • Field Details

    • STATUS_ACTIVE

      public static final int STATUS_ACTIVE
      This status indicates that the job is active
      See Also:
    • STATUS_INACTIVE

      public static final int STATUS_INACTIVE
      This status indicates that the job is inactive
      See Also:
  • Constructor Details

    • SchedulableJobModel

      public SchedulableJobModel()
  • Method Details

    • setPollingPeriod

      public void setPollingPeriod(Long pollingPeriod)
      Sets the polling period.
      Parameters:
      pollingPeriod - The polling period
    • setRecurrenceAsString

      public void setRecurrenceAsString(String recurrenceFormat)
      Sets the recurrence in String format.
      Parameters:
      recurrenceFormat - The recurrence in String format
    • getPollingPeriod

      public Long getPollingPeriod()
      Gets the polling period.
      Returns:
      The polling period
    • getRecurrenceAsString

      public String getRecurrenceAsString()
      Gets the recurrence in String format.
      Returns:
      The recurrence in String format
    • setRecurrence

      public void setRecurrence(com.highdeal.util.Recurrence recurrence)
      Sets the recurrence.
      Parameters:
      recurrence - The recurrence
    • getRecurrence

      public com.highdeal.util.Recurrence getRecurrence()
      Gets the recurrence.
      Returns:
      The recurrence
    • getDescription

      public String getDescription()
      Returns The job description
    • setDescription

      public void setDescription(String s)
      Sets the job description
    • setStatus

      public void setStatus(int status)
      Sets the status of the job.
      Parameters:
      status - The status of the job
    • getStatus

      public int getStatus()
      Returns the status of the job.
      Returns:
      The status of the job
    • getJobClassName

      public abstract String getJobClassName()
      Gets the class name of the job.
      Returns:
      The class name of the job
    • _getJobID

      public Long _getJobID()
      Returns The unique job identifier
    • _setJobID

      public void _setJobID(Long id)
      Sets the unique job identifier
    • _getLastActivationDate

      public Date _getLastActivationDate()
      FOR INTERNAL USE ONLY - Returns the last activation date.
      Returns:
      lastActivationDate
    • _setLastActivationDate

      public void _setLastActivationDate(Date lad)
      FOR INTERNAL USE ONLY - Sets the last activation date.
      Parameters:
      lad - The last activation date
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • parseStatus

      protected int parseStatus(String s)
      Transforms the status from its string form to its constant value.
      Parameters:
      s - The status in its string form
      Returns:
      The status in its constant value
    • statusToString

      protected String statusToString()
      Transforms the current status to its string representation.
      Returns:
      The current status to its string representation
    • innerMarshall

      protected void innerMarshall(XMLOutputter output)
    • innerSetAttributes

      protected void innerSetAttributes(XMLAttributes atts)
    • compareTo

      public int compareTo(SchedulableJobModel o)
      Specified by:
      compareTo in interface Comparable<SchedulableJobModel>