Package com.highdeal.bart.hci
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intThis status indicates that the job is activestatic final intThis status indicates that the job is inactive -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns The unique job identifierFOR INTERNAL USE ONLY - Returns the last activation date.voidSets the unique job identifiervoidFOR INTERNAL USE ONLY - Sets the last activation date.intReturns The job descriptionabstract StringGets the class name of the job.Gets the polling period.com.highdeal.util.RecurrenceGets the recurrence.Gets the recurrence in String format.intReturns the status of the job.protected voidinnerMarshall(XMLOutputter output) protected voidprotected intTransforms the status from its string form to its constant value.voidSets the job descriptionvoidsetPollingPeriod(Long pollingPeriod) Sets the polling period.voidsetRecurrence(com.highdeal.util.Recurrence recurrence) Sets the recurrence.voidsetRecurrenceAsString(String recurrenceFormat) Sets the recurrence in String format.voidsetStatus(int status) Sets the status of the job.protected StringTransforms the current status to its string representation.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.highdeal.hci.XMLMarshallable
addCharacterData, addChild, marshal, setAttributes
-
Field Details
-
STATUS_ACTIVE
public static final int STATUS_ACTIVEThis status indicates that the job is active- See Also:
-
STATUS_INACTIVE
public static final int STATUS_INACTIVEThis status indicates that the job is inactive- See Also:
-
-
Constructor Details
-
SchedulableJobModel
public SchedulableJobModel()
-
-
Method Details
-
setPollingPeriod
Sets the polling period.- Parameters:
pollingPeriod- The polling period
-
setRecurrenceAsString
Sets the recurrence in String format.- Parameters:
recurrenceFormat- The recurrence in String format
-
getPollingPeriod
Gets the polling period.- Returns:
- The polling period
-
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
Returns The job description -
setDescription
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
Gets the class name of the job.- Returns:
- The class name of the job
-
_getJobID
Returns The unique job identifier -
_setJobID
Sets the unique job identifier -
_getLastActivationDate
FOR INTERNAL USE ONLY - Returns the last activation date.- Returns:
- lastActivationDate
-
_setLastActivationDate
FOR INTERNAL USE ONLY - Sets the last activation date.- Parameters:
lad- The last activation date
-
toString
-
parseStatus
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
Transforms the current status to its string representation.- Returns:
- The current status to its string representation
-
innerMarshall
-
innerSetAttributes
-
compareTo
- Specified by:
compareToin interfaceComparable<SchedulableJobModel>
-