OSID Logo
OSID Specifications
calendaring package
Version 3.1.0
Interfaceosid.calendaring.ScheduleAdminSession
Implementsosid.OsidSession
Implemented Byosid.calendaring.batch.ScheduleBatchAdminSession
Used Byosid.calendaring.CalendaringManager
osid.calendaring.CalendaringProxyManager
Description

This session creates, updates, and deletes Schedules. The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create a Schedule, a ScheduleForm is requested using getScheduleFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned ScheduleForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the ScheduleForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each ScheduleForm corresponds to an attempted transaction.

For updates, ScheduleForms are requested to the Schedule Id that is to be updated using getScheduleFormForUpdate(). Similarly, the ScheduleForm has metadata about the data that can be updated and it can perform validation before submitting the update. The ScheduleForm can only be used once for a successful update and cannot be reused.

The delete operations delete Schedules. To unmap a Schedule from the current Calendar, the ScheduleSCalendarAssignmentSession should be used. These delete operations attempt to remove the Schedule itself thus removing it from all known Calendar catalogs.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodgetCalendarId
Description

Gets the Calendar Id associated with this session.

Returnosid.id.Id the Calendar Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetCalendar
Description

Gets the Calendar associated with this session.

Returnosid.calendaring.Calendar the Calendar associated with this session
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanCreateSchedules
Description

Tests if this user can create Schedules. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Schedule will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if Schedule creation is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanCreateScheduleWithRecordTypes
Description

Tests if this user can create a single Schedule using the desired record types. While CalendaringManager.getScheduleRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Schedule. Providing an empty array tests if a Schedule can be created with no records.

Parametersosid.type.Type[]scheduleRecordTypes array of schedule record types
Returnboolean true if Schedule creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT scheduleRecordTypes is null
Compliancemandatory This method must be implemented.
MethodgetScheduleFormForCreate
Description

Gets the schedule form for creating new schedules. A new form should be requested for each create transaction.

Parametersosid.type.Type[]scheduleRecordTypes array of schedule record types
Returnosid.calendaring.ScheduleForm the schedule form
ErrorsNULL_ARGUMENT scheduleRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to get form for requested record types
Compliancemandatory This method must be implemented.
MethodcreateSchedule
Description

Creates a new Schedule.

Parametersosid.calendaring.ScheduleFormscheduleForm the form for this Schedule
Returnosid.calendaring.Schedule the new Schedule
ErrorsILLEGAL_STATE scheduleForm already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT scheduleForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED scheduleForm did not originate from getScheduleFormForCreate()
Compliancemandatory This method must be implemented.
MethodcanUpdateSchedules
Description

Tests if this user can update Schedules. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Schedule will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if schedule modification is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodgetScheduleFormForUpdate
Description

Gets the schedule form for updating an existing schedules. A new schedule form should be requested for each update transaction.

Parametersosid.id.IdscheduleId the Id of the Schedule
Returnosid.calendaring.ScheduleForm the schedule form
ErrorsNOT_FOUND scheduleId is not found
NULL_ARGUMENT scheduleId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateSchedule
Description

Updates an existing schedule.

Parametersosid.calendaring.ScheduleFormscheduleForm the form containing the elements to be updated
ErrorsILLEGAL_STATE scheduleForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT scheduleForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED scheduleForm did not originate from getScheduleFormForUpdate()
Compliancemandatory This method must be implemented.
MethodcanDeleteSchedules
Description

Tests if this user can delete Schedules. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Schedule will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if Schedule deletion is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethoddeleteSchedule
Description

Deletes the Schedule identified by the given Id.

Parametersosid.id.IdscheduleId the Id of the Schedule to delete
ErrorsNOT_FOUND a Schedule was not found identified by the given Id
NULL_ARGUMENT scheduleId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanManageScheduleAliases
Description

Tests if this user can manage Id aliases for Schedules. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if Schedule aliasing is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodaliasSchedule
Description

Adds an Id to a Schedule for the purpose of creating compatibility. The primary Id of the Schedule is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another schedule, it is reassigned to the given schedule Id.

Parametersosid.id.IdscheduleId the Id of a Schedule
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND scheduleId not found
NULL_ARGUMENT scheduleId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.