com.crystaldecisions.sdk.occa.infostore
Interface ISchedulingInfo


public interface ISchedulingInfo

The ISchedulingInfo interface contains a collection of properties used by the CMS to store scheduling information (for example, schedule start time information, schedule destination information, schedule dependency information). All objects that can be scheduled have the same scheduling properties; however, these objects have their own set of ProcessingInfo Object properties.

In BusinessObjects Enterprise, only Report objects can be scheduled. Note that if the InfoObject cannot be scheduled, the object will return null. Also note that when an object is scheduled, it uses the time zone specified in the set and get TimeZone methods.


Nested Class Summary
static interface ISchedulingInfo.GroupChoice
           This interface contains constants which specify the server group on which to run scheduled reports.
static interface ISchedulingInfo.ScheduleFlags
           This interface defines the instance status flags.
static interface ISchedulingInfo.ScheduleOutcome
           This interface contains constants which indicate the result of a job after it has finished processing.
static interface ISchedulingInfo.ScheduleStatus
           This interface contains constants which specify the current status of the scheduled job.
 
Method Summary
 IDestination getAlertDestination()
           Returns the alert destination.
 java.util.Date getBeginDate()
           Returns the begin date on which the object will be scheduled.
 ICalendarRunDays getCalendarRunDays()
           Returns a collection of calendar days that determine when the schedule will run.
 int getCalendarTemplate()
           Returns the id of the calendar template used for schedule.
 IEvents getDependants()
           Returns the collection of events that are dependant on the object being triggered.
 IEvents getDependencies()
           Returns the collection of dependency events that the object waits for before being triggered.
 IDestination getDestination()
           Returns the scheduled object's output destination information.
 java.util.Date getEndDate()
           Returns the end date on which the object will be scheduled.
 java.lang.String getErrorMessage()
           Returns the error message for a failed job.
 java.lang.String getErrorMessage(java.util.Locale locale)
           Returns a localized error message for a failed job.
 int getFlags()
           Returns the instance status.
 int getIntervalDays()
           Returns the number of days between job processing when using a daily schedule.
 int getIntervalHours()
           Returns the number of hours that are set between job processing when scheduling hourly.
 int getIntervalMinutes()
           Returns the number of minutes that are set between job processing when scheduling hourly.
 int getIntervalMonths()
           Returns the number of months that are set between job processing when scheduling monthly.
 int getIntervalNthDay()
           Returns the day of the month to process the job when scheduling every nth day.
 java.util.Set getMultiPassObjects()
          Returns the set of user/usergroup IDs on the schedule for multipass.
 INotifications getNotifications()
           Returns the schedule notifications.
 int getOutcome()
           Returns the result of a job after it has finished processing.
 int getRetriesAllowed()
           Returns the maximum number of retries allowed.
 int getRetryInterval()
           Returns the number of seconds between retries.
 int getScheduleOnBehalfOf()
           Returns the ID of the user who the report is scheduled on behalf of.
 int getServerGroup()
           Returns the ID of the server group that will be used to process scheduled report objects.
 int getServerGroupChoice()
           Returns how BusinessObjects Enterprise will choose the server group on which to process scheduled reports.
 int getStatus()
           Returns the current status of the scheduled job.
 java.util.TimeZone getTimeZone()
           Returns the time zone that is used to schedule a job.
 int getType()
           Get the frequency type of the schedule (For example: hourly, monthly).
 boolean isRightNow()
           Returns true if the scheduled job is set to run immediately.
 IProperties properties()
           Returns an enumeration of the properties set within this property bag.
 void setBeginDate(java.util.Date dtBeginDate)
           Sets the begin date on which the object will be scheduled.
 void setCalendarTemplate(int templateId)
           Sets the id of the calendar template used for schedule.
 void setEndDate(java.util.Date dtEndDate)
           Sets the end date on which the object will be scheduled.
 void setFlags(int lFlags)
           Sets the instance status.
 void setIntervalDays(int newIntervalDays)
           Sets the number of days between job processing when using a daily schedule.
 void setIntervalHours(int newVal)
           Sets the number of hours that are set between job processing when scheduling hourly.
 void setIntervalMinutes(int newVal)
           Sets the number of minutes that are set between job processing when scheduling hourly.
 void setIntervalMonths(int newVal)
           Returns the number of months that are set between job processing when scheduling monthly.
 void setIntervalNthDay(int newVal)
           Sets the day of the month to process the job when scheduling every nth day.
 void setRetriesAllowed(int newVal)
           Sets the maximum number of retries allowed.
 void setRetryInterval(int newVal)
           Sets the number of seconds between retries.
 void setRightNow(boolean rightNow)
           Sets the scheduled job to run immediately.
 void setScheduleOnBehalfOf(int newScheduleOnBehalfOf)
           Sets the user who the report is scheduled on behalf of.
 void setServerGroup(int newVal)
           Sets the ID of the server group that will be used to process scheduled report objects.
 void setServerGroupChoice(int newVal)
           Specifies how BusinessObjects Enterprise will choose the server group on which to process scheduled reports.
 void setTimeZone(java.util.TimeZone timezone)
           Set the time zone that is used to schedule a job.
 void setType(int type)
           Sets the frequency type of the schedule (For example: hourly, monthly).
 

Method Detail

getBeginDate

public java.util.Date getBeginDate()

Returns the begin date on which the object will be scheduled.

Returns:
A Date object containing the begin date on which the object will be scheduled.

setBeginDate

public void setBeginDate(java.util.Date dtBeginDate)

Sets the begin date on which the object will be scheduled.

Parameters:
dtBeginDate - A Date object specifying the begin date on which the object will be scheduled.

getDependants

public IEvents getDependants()

Returns the collection of events that are dependant on the object being triggered. This method allows the dependents to be viewed or modified.

Returns:
The IEvents object containing the dependant events to be viewed or modified.

getDependencies

public IEvents getDependencies()

Returns the collection of dependency events that the object waits for before being triggered. This method allows the dependencies to be viewed or modified.

Returns:
The IEvents object containing the dependencies to be viewed or modified.

getEndDate

public java.util.Date getEndDate()

Returns the end date on which the object will be scheduled.

Returns:
A Date object specifying the end date on which the object will be scheduled.

setEndDate

public void setEndDate(java.util.Date dtEndDate)

Sets the end date on which the object will be scheduled.

Parameters:
dtEndDate - A Date object specifying the end date on which the object will be scheduled.

getFlags

public int getFlags()

Returns the instance status.

Returns:
An int of constant type ScheduleFlags specifying the instance status.
See Also:
ISchedulingInfo.ScheduleFlags

setFlags

public void setFlags(int lFlags)

Sets the instance status.

Parameters:
lFlags - An int of constant type ScheduleFlags specifying the instance status.
See Also:
ISchedulingInfo.ScheduleFlags

getIntervalHours

public int getIntervalHours()

Returns the number of hours that are set between job processing when scheduling hourly. This is only relevant when using SCHEDULE_TYPE_HOURLY.

Returns:
An int specifying the number of hours that are set between job processing when scheduling hourly.

setIntervalHours

public void setIntervalHours(int newVal)

Sets the number of hours that are set between job processing when scheduling hourly. This is only relevant when using SCHEDULE_TYPE_HOURLY.

Parameters:
newVal - An int specifying the number of hours that are set between job processing when scheduling hourly.

getIntervalMinutes

public int getIntervalMinutes()

Returns the number of minutes that are set between job processing when scheduling hourly. This is only relevant when using SCHEDULE_TYPE_HOURLY and is used in conjunction with set and getIntervalHours.

Returns:
An int specifying the number of minutes that are set between job processing when scheduling hourly.

setIntervalMinutes

public void setIntervalMinutes(int newVal)

Sets the number of minutes that are set between job processing when scheduling hourly. This is only relevant when using SCHEDULE_TYPE_HOURLY and is used in conjunction with set and getIntervalHours.

Parameters:
newVal - An int specifying the number of minutes that are set between job processing when scheduling hourly.

getIntervalMonths

public int getIntervalMonths()

Returns the number of months that are set between job processing when scheduling monthly. This is only relevant when using SCHEDULE_TYPE_MONTHLY.

Returns:
An int specifying the number of months that are set between job processing when scheduling monthly.

setIntervalMonths

public void setIntervalMonths(int newVal)

Returns the number of months that are set between job processing when scheduling monthly. This is only relevant when using SCHEDULE_TYPE_MONTHLY.

Parameters:
newVal - An int specifying the number of months that are set between job processing when scheduling monthly.

getIntervalNthDay

public int getIntervalNthDay()

Returns the day of the month to process the job when scheduling every nth day. This is only relevant when using SCHEDULE_TYPE_NTHDAY.

Returns:
An int specifying the day of the month to process the job when scheduling every nth day.

setIntervalNthDay

public void setIntervalNthDay(int newVal)

Sets the day of the month to process the job when scheduling every nth day. This is only relevant when using SCHEDULE_TYPE_NTHDAY.

Parameters:
newVal - An int specifying the day of the month to process the job when scheduling every nth day.

getRetriesAllowed

public int getRetriesAllowed()

Returns the maximum number of retries allowed.

Returns:
An int specifying the maximum number of retries allowed.

setRetriesAllowed

public void setRetriesAllowed(int newVal)

Sets the maximum number of retries allowed.

Parameters:
newVal - An int specifying the maximum number of retries allowed.

getRetryInterval

public int getRetryInterval()

Returns the number of seconds between retries.

Returns:
An int specifying the number of seconds between retries.

setRetryInterval

public void setRetryInterval(int newVal)

Sets the number of seconds between retries.

Parameters:
newVal - An int specifying the number of seconds between retries.

isRightNow

public boolean isRightNow()

Returns true if the scheduled job is set to run immediately.

Returns:
true if the scheduled job is set to run immediately, false otherwise.

setRightNow

public void setRightNow(boolean rightNow)

Sets the scheduled job to run immediately.

Parameters:
rightNow - true if the scheduled job is to be run immediately, false otherwise.

getServerGroupChoice

public int getServerGroupChoice()

Returns how BusinessObjects Enterprise will choose the server group on which to process scheduled reports.

Returns:
An int corresponding to a constant of GroupChoice.
See Also:
ISchedulingInfo.GroupChoice

setServerGroupChoice

public void setServerGroupChoice(int newVal)

Specifies how BusinessObjects Enterprise will choose the server group on which to process scheduled reports.

Parameters:
newVal - An int of type GroupChoice.
See Also:
ISchedulingInfo.GroupChoice

getServerGroup

public int getServerGroup()

Returns the ID of the server group that will be used to process scheduled report objects.

Returns:
An int specifying the server group.

setServerGroup

public void setServerGroup(int newVal)

Sets the ID of the server group that will be used to process scheduled report objects.

Parameters:
newVal - An int specifying the server group.

getType

public int getType()

Get the frequency type of the schedule (For example: hourly, monthly).

Returns:
An int specifying the schedule type. This value will be of type CeScheduleType.
See Also:
CeScheduleType

setType

public void setType(int type)

Sets the frequency type of the schedule (For example: hourly, monthly).

Parameters:
type - An int specifying the schedule type. This value must be of type CeScheduleType.
See Also:
CeScheduleType

getIntervalDays

public int getIntervalDays()

Returns the number of days between job processing when using a daily schedule.

Returns:
An int specifying the number of days between job processing.

setIntervalDays

public void setIntervalDays(int newIntervalDays)

Sets the number of days between job processing when using a daily schedule.

Parameters:
newIntervalDays - An int specifying the number of days between job processing.

getCalendarRunDays

public ICalendarRunDays getCalendarRunDays()

Returns a collection of calendar days that determine when the schedule will run. This is only relevant when using Calendar type scheduling.

Returns:
ICalendarRunDays An ICalendarRunDays object specifying a calendar template that specifies when the schedule will run.

getDestination

public IDestination getDestination()

Returns the scheduled object's output destination information.

Returns:
An IDestination interface that specifies the output destination.

getOutcome

public int getOutcome()

Returns the result of a job after it has finished processing.

Returns:
An int of constant type ScheduleOutcome.
See Also:
ISchedulingInfo.ScheduleOutcome

getStatus

public int getStatus()
              throws SDKException

Returns the current status of the scheduled job.

Returns:
An int of constant type ScheduleStatus.
Throws:
SDKException - the exception is thrown most likely due to the InfoObject is not an instance or property SI_SCHEDULE_STATUS is not included in the query string used to retrieve this InfoObject.

getErrorMessage

public java.lang.String getErrorMessage()

Returns the error message for a failed job. It may include plugin-specific information.

Returns:
A String containing the error message for the failed job.

getErrorMessage

public java.lang.String getErrorMessage(java.util.Locale locale)

Returns a localized error message for a failed job. It may include plugin-specific information.

Parameters:
locale - The Locale object to be used in determining the error message's display properties.
Returns:
String A localized String containing the error message for the failed job.

getTimeZone

public java.util.TimeZone getTimeZone()

Returns the time zone that is used to schedule a job.

Returns:
A TimeZone object specifying the time zone used to schedule the job.

setTimeZone

public void setTimeZone(java.util.TimeZone timezone)

Set the time zone that is used to schedule a job.

Parameters:
timezone - A TimeZone object specifying the time zone used to schedule the job.

getScheduleOnBehalfOf

public int getScheduleOnBehalfOf()

Returns the ID of the user who the report is scheduled on behalf of.

Returns:
An int corresponding to the ID of the user who the report is scheduled on behalf of.

setScheduleOnBehalfOf

public void setScheduleOnBehalfOf(int newScheduleOnBehalfOf)
                           throws SDKException

Sets the user who the report is scheduled on behalf of.

Parameters:
newScheduleOnBehalfOf - The ID of the user to schedule the report on behalf of.
Throws:
SDKException - This is thrown if there is an error processing this request.

properties

public IProperties properties()

Returns an enumeration of the properties set within this property bag.

Returns:
An IProperties object containing and enumeration of the properties set within this property bag.

getAlertDestination

public IDestination getAlertDestination()

Returns the alert destination. The destination of the alert notification email can be customized in the same way that the SMTP destination is. First, retrieve the IInfoObject object for the SMTP destination, set the destination's scheduling options, and then copy these options to the report's IDestination object using the setFromPlugin method. You can also schedule the alert notification email using the Report Job Server's default destination options.

Note: To schedule a report to SMTP, you must enable the destination through the Crystal Management Console's Job Server properties.

Returns:
An IDestination object containing report alert destination.

getCalendarTemplate

public int getCalendarTemplate()

Returns the id of the calendar template used for schedule. There has to be a Calendar object associated with this template id.

Returns:
An int specifying the calendar template id

setCalendarTemplate

public void setCalendarTemplate(int templateId)

Sets the id of the calendar template used for schedule. There has to be a CrystalEnterprise.Calendar object associated with this template id.

Parameters:
templateId - An int specifying the calendar template id

getNotifications

public INotifications getNotifications()
                                throws SDKException

Returns the schedule notifications.

Returns:
A INotifications object containing schedule notification information.
Throws:
SDKException - This is thrown if the process is unsuccessful.

getMultiPassObjects

public java.util.Set getMultiPassObjects()
                                  throws SDKException
Returns the set of user/usergroup IDs on the schedule for multipass.

Returns:
A Set that contains a collection of user/usergroup IDs.
Throws:
SDKException - This is thrown if the process is unsuccessful.