OSID Logo
OSID Specifications
course package
Version 3.0.0
Release Candidate Preview
Interfaceosid.course.CourseCatalogAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes CourseCatalogs. 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 CourseCatalog, a CourseCatalogForm is requested using getCourseCatalogFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned CourseCatalogForm 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 CourseCatalogForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each CourseCatalogForm corresponds to an attempted transaction.

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

The delete operations delete CourseCatalogs. It is safer to remove all mappings to the CourseCatalog catalogs before deletion.

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

MethodcanCreateCourseCatalogs
Description

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

Returnboolean false if CourseCatalog creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateCourseCatalogWithRecordTypes
Description

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

Parametersosid.type.Type[]courseCatalogRecordTypesarray of course catalog record types
Returnboolean true if CourseCatalog creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT courseCatalogRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetCourseCatalogFormForCreate
Description

Gets the course catalog form for creating new course catalogs. A new form should be requested for each create transaction.

Parametersosid.type.Type[]courseCatalogRecordTypesarray of course catalog record types
Returnosid.course.CourseCatalogFormthe course catalog form
ErrorsNULL_ARGUMENT courseCatalogRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateCourseCatalog
Description

Creates a new CourseCatalog.

Parametersosid.course.CourseCatalogFormcourseCatalogFormthe form for this CourseCatalog
Returnosid.course.CourseCatalogthe new CourseCatalog
ErrorsILLEGAL_STATE courseCatalogForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT courseCatalogForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED courseCatalogForm did not originate from getCourseCatalogFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateCourseCatalogs
Description

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

Returnboolean false if CourseCatalog modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetCourseCatalogFormForUpdate
Description

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

Parametersosid.id.IdcourseCatalogIdthe Id of the CourseCatalog
Returnosid.course.CourseCatalogFormthe course catalog form
ErrorsNOT_FOUND courseCatalogId is not found
NULL_ARGUMENT courseCatalogId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateCourseCatalog
Description

Updates an existing course catalog.

Parametersosid.course.CourseCatalogFormcourseCatalogFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE courseCatalogForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT courseCatalogForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED courseCatalogForm did not originate from getCourseCatalogFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteCourseCatalogs
Description

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

Returnboolean false if CourseCatalog deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteCourseCatalog
Description

Deletes a CourseCatalog.

Parametersosid.id.IdcourseCatalogIdthe Id of the CourseCatalog to remove
ErrorsNOT_FOUND courseCatalogId not found
NULL_ARGUMENT courseCatalogId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageCourseCatalogAliases
Description

Tests if this user can manage Id aliases for CourseCatalogs. 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 CourseCatalog aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasCourseCatalog
Description

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

Parametersosid.id.IdcourseCatalogIdthe Id of a CourseCatalog
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND aliasId is in use as a primary Id
NULL_ARGUMENT courseCatalogId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.