Package com.appiancorp.suiteapi.process
Class AbstractSchedule
java.lang.Object
com.appiancorp.suiteapi.process.AbstractSchedule
- All Implemented Interfaces:
XMLable
,Serializable
- Direct Known Subclasses:
Schedule
,ScheduleInstance
A Schedule is used to define a time for an event based either on an absolute
Timestamp or relative to some other event. If the delay is absolute then the
timer expires at an exact time, i.e. 12:52AM on 12/18/2007. A relative delay
occurs at some offset to another event, such as the activation of a node or
process, such as 2 hours and 18 minutes afterwards.
- See Also:
-
Field Summary
Fields inherited from interface com.appiancorp.suiteapi.common.XMLable
DEFAULT_BUFFER_SIZE
-
Constructor Summary
ConstructorDescriptionCreates a new instance of ScheduleAbstractSchedule
(boolean absoluteDelay_) Creates a new instance of Schedule -
Method Summary
Modifier and TypeMethodDescriptionReturns an expression to be evaluated to the Timestamp of the scheduled event.boolean
Deprecated.boolean
Returns the Interval object representing the time delay with respect to the previous eventboolean
Returns true if the event is schedule for a specific time i.e. 12:52AM on 12/18/2007 else its relative to some other event like 5 mins or 2 hrs after the event.void
setAbsoluteDelay
(boolean absoluteDealy_) If true sets the Schedule to a specific time like 12:52AM on 12/18/2007, else to an interval of time relative to some other event.void
setAbsoluteExpression
(String absoluteExpression_) Sets an expression to be evaluated to the Timestamp of the scheduled event.void
setAbsoluteOrRelative
(boolean isAbsoluteOrRelative_) void
setAbsoluteTime
(Timestamp absoluteTime_) Deprecated.use {@link #setAbsoluteExpression(String))}void
setRecurring
(boolean isRecurring_) void
setRelativeInterval
(Interval relativeInterval_) Schedules an event relative to some other event.toXML()
Generates an XML representation of this object (including all child objects).void
toXML
(StringBuilder buffer_) Appends an XML representation of this object (including all child objects) to the given buffer.
-
Constructor Details
-
AbstractSchedule
public AbstractSchedule(boolean absoluteDelay_) Creates a new instance of Schedule- Parameters:
absoluteDealy_
- true if the event is not relative to other event, else false
-
AbstractSchedule
public AbstractSchedule()Creates a new instance of Schedule
-
-
Method Details
-
getAbsoluteExpression
Returns an expression to be evaluated to the Timestamp of the scheduled event.- Returns:
- a string Expression
-
setAbsoluteExpression
Sets an expression to be evaluated to the Timestamp of the scheduled event.- Parameters:
absoluteExpression_
- a string Expression
-
isAbsoluteDelay
public boolean isAbsoluteDelay()Returns true if the event is schedule for a specific time i.e. 12:52AM on 12/18/2007 else its relative to some other event like 5 mins or 2 hrs after the event.- Returns:
- true if the Schedule is not relative to some other event.
-
setAbsoluteDelay
public void setAbsoluteDelay(boolean absoluteDealy_) If true sets the Schedule to a specific time like 12:52AM on 12/18/2007, else to an interval of time relative to some other event.- Parameters:
absoluteDealy_
- true if the event is not relative to other event, else false
-
getAbsoluteTime
Deprecated.Returnsnull
-
setAbsoluteTime
Deprecated.use {@link #setAbsoluteExpression(String))}Sets the time at which the event is scheduled- Parameters:
absoluteTime_
- Timestamp of the exact time of the event.
-
getRelativeInterval
Returns the Interval object representing the time delay with respect to the previous event- Returns:
- Interval object specifying delay in terms of mins, hrs, days, weeks, months and/or years.
-
setRelativeInterval
Schedules an event relative to some other event.- Parameters:
relativeInterval_
- Interval object representing time delay after some other event.
-
toXML
Description copied from interface:XMLable
Generates an XML representation of this object (including all child objects). A typical implementation is to create a newStringBuilder
and calltoXML( StringBuilder )
on it. -
toXML
Description copied from interface:XMLable
Appends an XML representation of this object (including all child objects) to the given buffer. Override for performance. -
getAbsoluteOrRelative
public boolean getAbsoluteOrRelative() -
setAbsoluteOrRelative
public void setAbsoluteOrRelative(boolean isAbsoluteOrRelative_) -
getRecurring
public boolean getRecurring() -
setRecurring
public void setRecurring(boolean isRecurring_)
-
getAbsoluteExpression()