Package com.redwood.scheduler.api.model
Interface SubmitFrame
-
- All Superinterfaces:
ApplicationObject
,BusinessKeyObject
,NamedRootObject
,NamedRootObjectComp
,PartitionableObject
,PartitionableObjectComp
,Readable
,Root
,SchedulerEntity
,SchedulerEntityComp
,SubmitFrameComp
,UniqueNamedApplicationObject
public interface SubmitFrame extends SubmitFrameComp, UniqueNamedApplicationObject, Readable
A submit frame controls how often a job is resubmitted. Submit frames are made up of submit frame elements, each of which represents an interval.
-
-
Field Summary
Fields Modifier and Type Field Description static Long
BEHAVIOR_MAINTENANCE
Behavior for submit frames attached to maintenance jobs.static String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "SubmitFrame" objects.static String
SEC_PRIV_CREATE
This privilege can be granted at a group level.static String
SEC_PRIV_DELETE
This privilege can be granted at a group level.static String
SEC_PRIV_EDIT
This privilege can be granted at a group level.static String
SEC_PRIV_VIEW
This privilege can be granted at a group level.static String
SEC_RANK_ALL
This rank is made of the following privileges: create , view , edit , deletestatic String
SEC_RANK_CREATE
This rank is made of the following privileges: createstatic String
SEC_RANK_DELETE
This rank is made of the following privileges: create , view , deletestatic String
SEC_RANK_EDIT
This rank is made of the following privileges: create , view , editstatic String
SEC_RANK_NONE
This rank has no privileges assigned to it.static String
SEC_RANK_VIEW
This rank is made of the following privileges: viewstatic QueryObjectType<SubmitFrame>
TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.-
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
ACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SortedSet<DateTimeZone>
calculateAll(DateTimeZone startTime, DateTimeZone endTime, DateTimeZone from, TimeWindow jobTimeWindow, TimeWindow queueTimeWindow, TimeZone defaultTimeZone, Long maxCalculationCount)
Calculate the requested start times of the submit frame in the period AFTERstartTime
and BEFOREendTime
.SortedSet<DateTimeZone>
calculateAll(DateTimeZone startTime, DateTimeZone endTime, DateTimeZone from, TimeWindow jobTimeWindow, TimeZone jobTimeWindowTimeZone, TimeWindow queueTimeWindow, TimeZone queueTimeZone, Long maxCalculationCount)
Calculate the requested start times of the submit frame in the period AFTERstartTime
and BEFOREendTime
.SortedSet<DateTimeZone>
calculateAll(DateTimeZone startTime, DateTimeZone endTime, DateTimeZone from, TimeWindow jobTimeWindow, TimeZone jobTimeWindowTimeZone, Long maxCalculationCount)
Calculate the requested start times of the submit frame in the period AFTERstartTime
and BEFOREendTime
.DateTimeZone
calculateFirst(DateTimeZone now, TimeWindow jobTimeWindow, TimeWindow queueTimeWindow, TimeZone timeZone)
Calculate the requested start time for the first submitted job according to this SubmitFrame.DateTimeZone
calculateFirst(DateTimeZone now, TimeWindow jobTimeWindow, TimeZone jobTimeWindowTimeZone)
Calculate the requested start time for the first submitted job according to this SubmitFrame.DateTimeZone
calculateFirst(DateTimeZone now, TimeWindow jobTimeWindow, TimeZone jobTimeWindowTimeZone, TimeWindow queueTimeWindow, TimeZone queueTimeZone)
Calculate the requested start time for the first submitted job according to this SubmitFrame.DateTimeZone
calculateNext(DateTimeZone now, DateTimeZone from, TimeWindow jobTimeWindow, TimeWindow queueTimeWindow, TimeZone timeZone)
Calculate the next requested start time according to this SubmitFrame.DateTimeZone
calculateNext(DateTimeZone now, DateTimeZone from, TimeWindow jobTimeWindow, TimeZone jobTimeWindowTimeZone)
Calculate the next requested start time according to this SubmitFrame.DateTimeZone
calculateNext(DateTimeZone now, DateTimeZone from, TimeWindow jobTimeWindow, TimeZone jobTimeWindowTimeZone, TimeWindow queueTimeWindow, TimeZone queueTimeZone)
Calculate the next requested start time according to this SubmitFrame.RequiredPermission
checkCreatePrivilege()
Check whether or not the create action can be performed on this object.RequiredPermission
checkDeletePrivilege()
Check whether or not the delete action can be performed on this object.RequiredPermission
checkEditPrivilege()
Check whether or not the edit action can be performed on this object.RequiredPermission
checkViewPrivilege()
Check whether or not the view action can be performed on this object.SubmitFrameElement
createSubmitFrameElement()
Create a newSubmitFrameElement
linked to this object.DateTimeZone
getEndDate()
Get the value for EndDate.RWIterable<SubmitFrameElement>
getSubmitFrameElements()
Get anRWIterable
over an ordered collection ofSubmitFrameElements
.boolean
isSubmitTime()
Get the value for SubmitTime.void
setEndDate(DateTimeZone newEndDate)
Set the value for EndDate.void
setSubmitTime(boolean newSubmitTime)
Set the value for SubmitTime.-
Methods inherited from interface com.redwood.scheduler.api.model.ApplicationObject
getParentApplication, setParentApplication
-
Methods inherited from interface com.redwood.scheduler.api.model.BusinessKeyObject
getBusinessKey
-
Methods inherited from interface com.redwood.scheduler.api.model.NamedRootObject
createObjectReference, getComment, getDescription, getLinkedObjectReferenceByLinkedObject, getLinkedObjectReferenceByName, getLinkedObjectReferences, getName, getSearchName, getSourceObjectReferences, isHidden, setComment, setDescription, setName
-
Methods inherited from interface com.redwood.scheduler.api.model.PartitionableObject
createObjectTag, getEditablePartitions, getObjectTagByObjectTagDefinition, getObjectTags, getPartition, setPartition
-
Methods inherited from interface com.redwood.scheduler.api.model.Root
getCreationTime, getLastModificationTime, getLastModifierSubject
-
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
canPerform, createSubjectObjectPrivilegeGrant, deleteObject, getAuditTrail, getAuditTrailSize, getBehavior, getEffectiveBehavior, getErrorNameEN, getErrorNameKey, getLLPVersion, getLOV, getLOVSupport, getObjectType, getParentSchedulerEntities, getRuntime, getSubjectObjectPrivilegeGrantBySubject, getSubjectObjectPrivilegeGrants, getUniqueId, getUrl, getUrl, isCreated, isDeletable, isDeleted, isModifiable, isModified, isSelectVersioned, processRelatedObjects, processRelatedObjects, processRelatedObjects, refreshObject, resetObject, resetObject, resetValuesToDefault, selectForRead
-
-
-
-
Field Detail
-
OBJECT_TYPE
static final String OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "SubmitFrame" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<SubmitFrame> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.
-
BEHAVIOR_MAINTENANCE
static final Long BEHAVIOR_MAINTENANCE
Behavior for submit frames attached to maintenance jobs. Submit frames with this behavior can be edited, but not deleted.
-
SEC_PRIV_CREATE
static final String SEC_PRIV_CREATE
This privilege can be granted at a group level.- See Also:
- Constant Field Values
-
SEC_PRIV_VIEW
static final String SEC_PRIV_VIEW
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_EDIT
static final String SEC_PRIV_EDIT
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_DELETE
static final String SEC_PRIV_DELETE
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_RANK_NONE
static final String SEC_RANK_NONE
This rank has no privileges assigned to it.- See Also:
- Constant Field Values
-
SEC_RANK_CREATE
static final String SEC_RANK_CREATE
This rank is made of the following privileges: create- See Also:
- Constant Field Values
-
SEC_RANK_VIEW
static final String SEC_RANK_VIEW
This rank is made of the following privileges: view- See Also:
- Constant Field Values
-
SEC_RANK_EDIT
static final String SEC_RANK_EDIT
This rank is made of the following privileges: create , view , edit- See Also:
- Constant Field Values
-
SEC_RANK_DELETE
static final String SEC_RANK_DELETE
This rank is made of the following privileges: create , view , delete- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges: create , view , edit , delete- See Also:
- Constant Field Values
-
-
Method Detail
-
getEndDate
DateTimeZone getEndDate()
Get the value for EndDate. (The submit frame ends at the defined date and time. )- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
isSubmitTime
boolean isSubmitTime()
Get the value for SubmitTime. (Must be set to true if this submit frame is created at submit time.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setEndDate
void setEndDate(DateTimeZone newEndDate)
Set the value for EndDate. (The submit frame ends at the defined date and time. ) This value is optional.- Parameters:
newEndDate
- the new value for EndDate.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setSubmitTime
void setSubmitTime(boolean newSubmitTime)
Set the value for SubmitTime. (Must be set to true if this submit frame is created at submit time.)- Parameters:
newSubmitTime
- the new value for SubmitTime.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
calculateAll
SortedSet<DateTimeZone> calculateAll(DateTimeZone startTime, DateTimeZone endTime, DateTimeZone from, TimeWindow jobTimeWindow, TimeZone jobTimeWindowTimeZone, Long maxCalculationCount) throws com.redwood.scheduler.api.exception.SchedulerAPIException
Calculate the requested start times of the submit frame in the period AFTERstartTime
and BEFOREendTime
.- Parameters:
startTime
- Starting time stampendTime
- Ending time stampfrom
- Calculate starting from date. The result will be in this time zone.jobTimeWindow
- Intersect with SubmitFrameElement TimeWindows.jobTimeWindowTimeZone
- The TimeZone to use if the TimeWindow does not specify a TimeZone.maxCalculationCount
- Limit the calculations to a maximum. Works per submit frame element. The returned list may contain more items.- Returns:
- Sorted list with requested start times between (
startTime
,endTime
) - Throws:
com.redwood.scheduler.api.exception.SchedulerAPIException
- Baseclass for checked exceptions thrown by the API.
-
calculateAll
SortedSet<DateTimeZone> calculateAll(DateTimeZone startTime, DateTimeZone endTime, DateTimeZone from, TimeWindow jobTimeWindow, TimeWindow queueTimeWindow, TimeZone defaultTimeZone, Long maxCalculationCount) throws com.redwood.scheduler.api.exception.SchedulerAPIException
Calculate the requested start times of the submit frame in the period AFTERstartTime
and BEFOREendTime
.- Parameters:
startTime
- Starting time stampendTime
- Ending time stampfrom
- Calculate starting from date. The result will be in this time zone.jobTimeWindow
- Intersect with SubmitFrameElement TimeWindows.queueTimeWindow
- Slide to opening of queueTimeWindow.defaultTimeZone
- The TimeZone to use if the TimeWindow does not specify a TimeZone.maxCalculationCount
- Limit the calculations to a maximum. Works per submit frame element. The returned list may contain more items.- Returns:
- Sorted list with requested start times between (
startTime
,endTime
) - Throws:
com.redwood.scheduler.api.exception.SchedulerAPIException
- Baseclass for checked exceptions thrown by the API.
-
calculateAll
SortedSet<DateTimeZone> calculateAll(DateTimeZone startTime, DateTimeZone endTime, DateTimeZone from, TimeWindow jobTimeWindow, TimeZone jobTimeWindowTimeZone, TimeWindow queueTimeWindow, TimeZone queueTimeZone, Long maxCalculationCount) throws com.redwood.scheduler.api.exception.SchedulerAPIException
Calculate the requested start times of the submit frame in the period AFTERstartTime
and BEFOREendTime
.- Parameters:
startTime
- Starting time stampendTime
- Ending time stampfrom
- Calculate starting from date. The result will be in this time zone.jobTimeWindow
- Intersect with SubmitFrameElement TimeWindows.jobTimeWindowTimeZone
- The TimeWindowTimeZone from the job. This time zone will be used for time window calculations. It will also be used for submit frame calculations if the submit frame does not specify a time zone.queueTimeWindow
- Slide to opening of queueTimeWindow.queueTimeZone
- The TimeZone from the queue. This time zone is used for queue time window calculations.maxCalculationCount
- Limit the calculations to a maximum. Works per submit frame element. The returned list may contain more items.- Returns:
- Sorted list with requested start times between (
startTime
,endTime
) - Throws:
com.redwood.scheduler.api.exception.SchedulerAPIException
- Baseclass for checked exceptions thrown by the API.
-
calculateFirst
DateTimeZone calculateFirst(DateTimeZone now, TimeWindow jobTimeWindow, TimeZone jobTimeWindowTimeZone) throws com.redwood.scheduler.api.exception.SchedulerAPIException
Calculate the requested start time for the first submitted job according to this SubmitFrame. This will return the next anchor start time of a submit element or now if no anchor start time is set.- Parameters:
now
- Current (system) time. The result will be in this time zone.jobTimeWindow
- Intersect with SubmitFrameElement TimeWindows.jobTimeWindowTimeZone
- The TimeZone to use if a TimeWindow does not specify a TimeZone.- Returns:
- Start time or
null
- Throws:
com.redwood.scheduler.api.exception.SchedulerAPIException
- Baseclass for checked exceptions thrown by the API.
-
calculateFirst
DateTimeZone calculateFirst(DateTimeZone now, TimeWindow jobTimeWindow, TimeWindow queueTimeWindow, TimeZone timeZone) throws com.redwood.scheduler.api.exception.SchedulerAPIException
Calculate the requested start time for the first submitted job according to this SubmitFrame. This will return the next anchor start time of a submit element or now if no anchor start time is set.- Parameters:
now
- Current (system) time. The result will be in this time zone.jobTimeWindow
- Intersect with SubmitFrameElement TimeWindows.queueTimeWindow
- Slide to opening of queueTimeWindow.timeZone
- The TimeZone to use if a TimeWindow does not specify a TimeZone.- Returns:
- Start time or
null
- Throws:
com.redwood.scheduler.api.exception.SchedulerAPIException
- Baseclass for checked exceptions thrown by the API.
-
calculateFirst
DateTimeZone calculateFirst(DateTimeZone now, TimeWindow jobTimeWindow, TimeZone jobTimeWindowTimeZone, TimeWindow queueTimeWindow, TimeZone queueTimeZone) throws com.redwood.scheduler.api.exception.SchedulerAPIException
Calculate the requested start time for the first submitted job according to this SubmitFrame. This will return the next anchor start time of a submit element or now if no anchor start time is set.- Parameters:
now
- Current (system) time. The result will be in this time zone.jobTimeWindow
- Intersect with SubmitFrameElement TimeWindows.jobTimeWindowTimeZone
- The TimeWindowTimeZone from the job. This time zone will be used job time window calculations. It will also be used for submit frame calculations if the submit frame does not specify a time zone.queueTimeWindow
- Slide to opening of queueTimeWindow.queueTimeZone
- The TimeZone from the queue. This time zone is used for queue time window calculations.- Returns:
- Start time or
null
- Throws:
com.redwood.scheduler.api.exception.SchedulerAPIException
- Baseclass for checked exceptions thrown by the API.
-
calculateNext
DateTimeZone calculateNext(DateTimeZone now, DateTimeZone from, TimeWindow jobTimeWindow, TimeZone jobTimeWindowTimeZone) throws com.redwood.scheduler.api.exception.SchedulerAPIException
Calculate the next requested start time according to this SubmitFrame.- Parameters:
now
- Current (system) time.from
- Calculate starting from date. The result will be in this time zone.jobTimeWindow
- Intersect with SubmitFrameElement TimeWindows.jobTimeWindowTimeZone
- The TimeWindowTimeZone to use if a TimeWindow does not specify a TimeZone.- Returns:
- Start time or
null
- Throws:
com.redwood.scheduler.api.exception.SchedulerAPIException
- Baseclass for checked exceptions thrown by the API.
-
calculateNext
DateTimeZone calculateNext(DateTimeZone now, DateTimeZone from, TimeWindow jobTimeWindow, TimeWindow queueTimeWindow, TimeZone timeZone) throws com.redwood.scheduler.api.exception.SchedulerAPIException
Calculate the next requested start time according to this SubmitFrame.- Parameters:
now
- Current (system) time.from
- Calculate starting from date. The result will be in this time zone.jobTimeWindow
- Intersect with SubmitFrameElement TimeWindows.queueTimeWindow
- Slide to opening of queueTimeWindow.timeZone
- The TimeZone to use if a TimeWindow does not specify a TimeZone.- Returns:
- Start time or
null
- Throws:
com.redwood.scheduler.api.exception.SchedulerAPIException
- Baseclass for checked exceptions thrown by the API.
-
calculateNext
DateTimeZone calculateNext(DateTimeZone now, DateTimeZone from, TimeWindow jobTimeWindow, TimeZone jobTimeWindowTimeZone, TimeWindow queueTimeWindow, TimeZone queueTimeZone) throws com.redwood.scheduler.api.exception.SchedulerAPIException
Calculate the next requested start time according to this SubmitFrame.- Parameters:
now
- Current (system) time.from
- Calculate starting from date. The result will be in this time zone.jobTimeWindow
- Intersect with SubmitFrameElement TimeWindows.jobTimeWindowTimeZone
- The TimeWindowTimeZone from the job. This time zone will be used job time window calculations. It will also be used for submit frame calculations if the submit frame does not specify a time zone.queueTimeWindow
- Slide to opening of queueTimeWindow.queueTimeZone
- The TimeZone from the queue. This time zone is used for queue time window calculations.- Returns:
- Start time or
null
- Throws:
com.redwood.scheduler.api.exception.SchedulerAPIException
- Baseclass for checked exceptions thrown by the API.
-
getSubmitFrameElements
RWIterable<SubmitFrameElement> getSubmitFrameElements()
Get anRWIterable
over an ordered collection ofSubmitFrameElements
. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull
. The intervals that make up a submit frame- Specified by:
getSubmitFrameElements
in interfaceSubmitFrameComp
- Returns:
- An
RWIterable
over an ordered collection ofSubmitFrameElement
objects .
-
createSubmitFrameElement
SubmitFrameElement createSubmitFrameElement()
Create a newSubmitFrameElement
linked to this object.- Returns:
- a new
SubmitFrameElement
.
-
checkCreatePrivilege
RequiredPermission checkCreatePrivilege()
Check whether or not the create action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkViewPrivilege
RequiredPermission checkViewPrivilege()
Check whether or not the view action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkEditPrivilege
RequiredPermission checkEditPrivilege()
Check whether or not the edit action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkDeletePrivilege
RequiredPermission checkDeletePrivilege()
Check whether or not the delete action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
-