Interface SubmitFrame

    • 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 AFTER startTime and BEFORE endTime.
        Parameters:
        startTime - Starting time stamp
        endTime - Ending time stamp
        from - 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 AFTER startTime and BEFORE endTime.
        Parameters:
        startTime - Starting time stamp
        endTime - Ending time stamp
        from - 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 AFTER startTime and BEFORE endTime.
        Parameters:
        startTime - Starting time stamp
        endTime - Ending time stamp
        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 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.
      • 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.