|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.object.PersistentObject
com.waveset.object.TaskSchedule
A class used to maintain a "crontab" of background tasks waiting to be executed.
I thought about just having all of these in one object, but that may result in too much contention.
Nested Class Summary | |
static class |
TaskSchedule.RepetitionUnit
An enumeration class used for values of the _repetitionUnit field, also used as an argument to the scheduling interface. |
static class |
TaskSchedule.ResultOption
An enumeration class used for values of the _resultOption field, used to specify how the results of prior executions of repetative tasks are handled. |
Nested classes inherited from class com.waveset.object.PersistentObject |
PersistentObject.Comparator, PersistentObject.InitialInstance |
Field Summary | |
static java.util.List |
ANY_HOST
A constant for the default value of Attribute.HOSTNAME . |
static java.lang.String |
ATT_COUNT
|
static java.lang.String |
ATT_DAEMON
|
static java.lang.String |
ATT_DISABLED
|
static java.lang.String |
ATT_DISPLAYNAME
|
static java.lang.String |
ATT_MAX
|
static java.lang.String |
ATT_NAME
|
static java.lang.String |
ATT_REPC
|
static java.lang.String |
ATT_REPU
|
static java.lang.String |
ATT_RESULTOP
|
static java.lang.String |
ATT_SINGLETON
|
static java.lang.String |
ATT_SKIPMISSEDTIMES
|
static java.lang.String |
ATT_START
|
static java.lang.String |
ATT_TIME
|
static java.lang.String |
code_id
|
Fields inherited from class com.waveset.object.PersistentObject |
_trace, trace |
Constructor Summary | |
TaskSchedule()
Construct a new empty configuration object. |
|
TaskSchedule(org.w3c.dom.Element e)
Deserialize a TaskSchedule object from XML. |
Method Summary | |
java.util.Date |
addOneRepetition(java.util.Date startDate)
Add the repetition unit to a date. |
boolean |
doSkipMissedTimes()
Return whether the schedule should wait until the next scheduled time when a scheduled time was missed. |
protected WSAttribute |
getAttributeValues(java.lang.String attrName)
|
java.util.Date |
getDailyStartTime()
Get the daily start date. |
TaskDefinition |
getDefinition()
Get the task definition object. |
ObjectRef |
getDefinitionRef()
Get the definition reference. |
java.lang.String |
getDescription()
Get the optional task description. |
TaskDefinition |
getEffectiveDefinition()
Return the associated TaskDefinition, passing through the TaskTemplate if necessary. |
int |
getExecutionCount()
Get the execution count. |
ObjectGroup |
getGroup()
Get the task group object. |
ObjectRef |
getGroupRef()
Get the group reference. |
java.util.List |
getHosts()
|
static PersistentObject.InitialInstance[] |
getInitialInstances()
Define an initial instance named Constants.LAST_MOD so that the repository will track modifications to objects of this type. |
int |
getMaxInstances()
|
java.util.Date |
getNextRepetitionDate()
Get the next date on which this task should be executed. |
Rule |
getNextRepetitionRule()
|
ObjectRef |
getNextRepetitionRuleRef()
|
java.util.ArrayList |
getReferences()
Return the list of references within this object. |
int |
getRepetitionCount()
Get the task repetition count. |
TaskSchedule.RepetitionUnit |
getRepetitionUnit()
Get the task repetition unit. |
WavesetResult |
getResult()
Deprecated. As of IdM 6.0 SP2 / 7.0 |
TaskSchedule.ResultOption |
getResultOption()
Get the result option. |
java.util.Date |
getStartDate()
Get the task start date. |
Subject |
getSubject()
Get the serialized authorization subject. |
java.lang.String |
getTaskDisplayName()
Get the optional task display name. |
java.lang.String |
getTaskName()
Get the desired task name. |
TaskTemplate |
getTemplate()
Get the task template object. |
java.lang.String |
getTrackingId()
Get the optional tracking id. |
Type |
getType()
Return the Type object associated with this class. |
java.lang.Object |
getVariable(java.lang.String name)
Get the value of one runtime variable. |
GenericObject |
getVariables()
Get the runtime variables. |
boolean |
isDaemon()
|
boolean |
isDisabled()
Test the disabled flag. |
boolean |
isSingleton()
Test the singleton flag. |
java.util.List |
listQueryableAttributes()
|
java.util.List |
listSummaryAttributes()
Returns the complete list of defined attributes
that this type of persistent object exposes as summary attributes
(regardless of whether this particular object has a value for each). |
protected void |
parseXml(org.w3c.dom.Element e)
Deserialize the object from XML. |
void |
setDaemon(boolean b)
|
void |
setDailyStartTime(java.util.Date d)
Set the task start date. |
void |
setDefinition(TaskDefinition def)
Set the task definition. |
void |
setDefinition(TaskTemplate tmp)
Set the task template. |
void |
setDefinitionRef(ObjectRef ref)
Set the definition reference. |
void |
setDescription(java.lang.String d)
Set the optional task description. |
void |
setDisabled(boolean d)
Set the disabled flag. |
void |
setExecutionCount(int c)
Set the execution count. |
void |
setGroup(ObjectGroup group)
Set the object group. |
void |
setGroupRef(ObjectRef ref)
Set the group reference. |
void |
setHosts(java.util.List hosts)
Get or set the list of hosts that this task can run on. |
void |
setMaxInstances(int i)
|
void |
setNextRepetitionRule(Rule rule)
|
void |
setNextRepetitionRuleRef(ObjectRef nextRepetitionRule)
|
void |
setRepetitionCount(int c)
Set the task repetition count. |
void |
setRepetitionUnit(TaskSchedule.RepetitionUnit r)
Set the task repetition unit. |
void |
setResult(WavesetResult res)
Deprecated. As of IdM 6.0 SP2 / 7.0 |
void |
setResultOption(TaskSchedule.ResultOption o)
Set the result option. |
void |
setSingleton(boolean b)
Set the singleton flag. |
void |
setSkipMissedTimes(boolean b)
Set whether the schedule should wait until the next scheduled time to run when a scheduled time was missed. |
void |
setStartDate(java.util.Date d)
Set the task start date. |
void |
setSubject(Subject s)
Set the authorization subject. |
void |
setTaskDisplayName(java.lang.String s)
Set the optional task display name. |
void |
setTaskName(java.lang.String s)
Set the desired task name. |
protected void |
setToStartTime(java.util.Date d)
If there is a specified time of day to start scheduling, set the passed-in date to that time. |
void |
setTrackingId(java.lang.String id)
Set an optional tracking ID. |
void |
setVariables(GenericObject vars)
Set the collection of runtime variables. |
void |
toXml(java.lang.StringBuffer b)
Serialize the object to XML within the given buffer. |
void |
visit(Visitor v)
Visitor interface. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static final java.util.List ANY_HOST
Attribute.HOSTNAME
.
This value indicates that any host may run the scheduled task.
public static final java.lang.String ATT_NAME
public static final java.lang.String ATT_DISPLAYNAME
public static final java.lang.String ATT_START
public static final java.lang.String ATT_TIME
public static final java.lang.String ATT_REPC
public static final java.lang.String ATT_REPU
public static final java.lang.String ATT_SINGLETON
public static final java.lang.String ATT_DISABLED
public static final java.lang.String ATT_RESULTOP
public static final java.lang.String ATT_COUNT
public static final java.lang.String ATT_DAEMON
public static final java.lang.String ATT_MAX
public static final java.lang.String ATT_SKIPMISSEDTIMES
Constructor Detail |
public TaskSchedule()
public TaskSchedule(org.w3c.dom.Element e) throws WavesetException
Method Detail |
public static PersistentObject.InitialInstance[] getInitialInstances()
public Type getType()
getType
in class PersistentObject
public java.util.ArrayList getReferences()
getReferences
in class PersistentObject
public void visit(Visitor v) throws WavesetException
visit
in class PersistentObject
WavesetException
public ObjectRef getDefinitionRef()
public void setDefinitionRef(ObjectRef ref)
public TaskDefinition getDefinition() throws WavesetException
WavesetException
public void setTrackingId(java.lang.String id)
public java.lang.String getTrackingId()
public TaskTemplate getTemplate() throws WavesetException
WavesetException
public TaskDefinition getEffectiveDefinition() throws WavesetException
WavesetException
public void setDefinition(TaskDefinition def)
public void setDefinition(TaskTemplate tmp)
public ObjectRef getGroupRef()
public void setGroupRef(ObjectRef ref)
public ObjectGroup getGroup() throws WavesetException
WavesetException
public void setGroup(ObjectGroup group)
public java.lang.String getTaskName()
public void setTaskName(java.lang.String s)
public java.lang.String getTaskDisplayName()
public void setTaskDisplayName(java.lang.String s)
public java.lang.String getDescription()
public void setDescription(java.lang.String d)
public GenericObject getVariables()
public java.lang.Object getVariable(java.lang.String name)
public void setVariables(GenericObject vars)
public java.util.Date getStartDate()
public void setStartDate(java.util.Date d)
public java.util.Date getDailyStartTime()
public void setDailyStartTime(java.util.Date d)
public TaskSchedule.RepetitionUnit getRepetitionUnit()
public void setRepetitionUnit(TaskSchedule.RepetitionUnit r)
public int getRepetitionCount()
public void setRepetitionCount(int c)
public boolean doSkipMissedTimes()
public void setSkipMissedTimes(boolean b)
public Subject getSubject()
public void setSubject(Subject s)
public boolean isSingleton()
public void setSingleton(boolean b)
public boolean isDisabled()
public void setDisabled(boolean d)
public TaskSchedule.ResultOption getResultOption()
public void setResultOption(TaskSchedule.ResultOption o)
public int getExecutionCount()
public void setExecutionCount(int c)
public WavesetResult getResult()
public void setResult(WavesetResult res)
public void setHosts(java.util.List hosts)
public java.util.List getHosts()
public boolean isDaemon()
public void setDaemon(boolean b)
public int getMaxInstances()
public void setMaxInstances(int i)
public java.util.List listSummaryAttributes()
PersistentObject
defined attributes
that this type of persistent object exposes as summary attributes
(regardless of whether this particular object has a value for each).
Any subclass of PersistentObject that overrides this method
should first invoke super.listSummaryAttributes()
to ensure that the subclass includes summary attributes
that are common to all PersistentObjects.
Any subclass that overrides this implementation must also consider the length of the summary string that will be generated from these attributes.
listSummaryAttributes
in class PersistentObject
defined attributes
that this type of PersistentObject exposes as summary attributes
(regardless of whether this object has a value for each).
Any subclass of PersistentObject that overrides this method
should first invoke super.listSummaryAttributes()
to ensure that the subclass includes summary attributes
that are common to all PersistentObjects.- See Also:
Constants.MAX_SUMMARY_STRING_LENGTH
,
PersistentObject.getSummaryString()
public java.util.List listQueryableAttributes()
listQueryableAttributes
in class PersistentObject
defined attributes
that this type of PersistentObject exposes as queryable attributes
(regardless of whether this object has a value for each).
Any subclass of PersistentObject that overrides this method
should first invoke super.listQueryableAttributes()
to ensure that the subclass includes queryable attributes
that are common to all PersistentObjects.protected WSAttribute getAttributeValues(java.lang.String attrName)
getAttributeValues
in class PersistentObject
attrName
- - the name of the attribute for which to return values.
WSAttribute
that represents the value (or values)
that this object contains for the specified attribute.
public java.util.Date addOneRepetition(java.util.Date startDate)
protected void setToStartTime(java.util.Date d)
d
- date to set to scheduled timepublic java.util.Date getNextRepetitionDate()
public ObjectRef getNextRepetitionRuleRef()
public void setNextRepetitionRuleRef(ObjectRef nextRepetitionRule)
public void setNextRepetitionRule(Rule rule)
public Rule getNextRepetitionRule() throws WavesetException
WavesetException
public void toXml(java.lang.StringBuffer b)
toXml
in class PersistentObject
protected final void parseXml(org.w3c.dom.Element e) throws WavesetException
parseXml
in class PersistentObject
WavesetException
PersistentObject.parseSubclassAttributes(org.w3c.dom.Element)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |