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

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

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

The delete operations delete Docet. To unmap a Docet from the current CourseCatalog, the DocetCourseCatalogAssignmentSession should be used. These delete operations attempt to remove the Docet itself thus removing it from all known CourseCatalog catalogs.

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

MethodgetCourseCatalogId
Description

Gets the CourseCatalog Id associated with this session.

Returnosid.id.Idthe CourseCatalog Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetCourseCatalog
Description

Gets the CourseCatalog associated with this session.

Returnosid.course.CourseCatalogthe course catalog
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateDocets
Description

Tests if this user can create Docets. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an Docet 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 Docet creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateDocetWithRecordTypes
Description

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

Parametersosid.type.Type[]docetRecordTypesarray of docet record types
Returnboolean true if Docet creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT docetRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetDocetFormForCreate
Description

Gets the docet form for creating new docets. A new form should be requested for each create transaction.

Parametersosid.id.IdmoduleIda module Id
osid.id.IdactivityUnitIdan activity unit Id
osid.type.Type[]docetRecordTypesarray of docet record types
Returnosid.course.syllabus.DocetFormthe docet form
ErrorsNOT_FOUND moduleId or activityUnitId is not found
NULL_ARGUMENT moduleId, acticvtyUnitId, or docetRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateDocet
Description

Creates a new Docet.

Parametersosid.course.syllabus.DocetFormdocetFormthe form for this Docet
Returnosid.course.syllabus.Docetthe new Docet
ErrorsILLEGAL_STATE docetForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT docetForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED docetForm did not originate from getDocetFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateDocets
Description

Tests if this user can update Docets. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an Docet 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 Docet modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetDocetFormForUpdate
Description

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

Parametersosid.id.IddocetIdthe Id of the Docet
Returnosid.course.syllabus.DocetFormthe docet form
ErrorsNOT_FOUND docetId is not found
NULL_ARGUMENT docetId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateDocet
Description

Updates an existing docet.

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

Tests if this user can delete Docets A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an Docet 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 Docet deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteDocet
Description

Deletes an Docet.

Parametersosid.id.IddocetIdthe Id of the Docet to remove
ErrorsNOT_FOUND docetId not found
NULL_ARGUMENT docetId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageDocetAliases
Description

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

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

Parametersosid.id.IddocetIdthe Id of an Docet
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND docetId not found
NULL_ARGUMENT docetId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanSequenceDocets
Description

Tests if this user can order Docets. 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 sequencing operations to an unauthorized user.

Returnboolean false if Docet ordering is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodmoveDocetAhead
Description

Reorders docets in a module by moving the specified docet in front of a reference docet.

Parametersosid.id.IddocetIdthe Id of a Docet
osid.id.IdmoduleIdthe Id of a Module
osid.id.IdreferenceIdthe reference docet Id
ErrorsNOT_FOUND docetId, moduleId, or referenceId not found or, docetId or referenceId not related to moduleId
NULL_ARGUMENT docetId, moduleId, or referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodmoveDocetBehind
Description

Reorders docets in a module by moving the specified docet behind a reference docet.

Parametersosid.id.IddocetIdthe Id of a Docet
osid.id.IdmoduleIdthe Id of a Module
osid.id.IdreferenceIdthe reference docet Id
ErrorsNOT_FOUND docetId, moduleId, or referenceId not found or, docetId or referenceId not related to moduleId
NULL_ARGUMENT docetId, moduleId or referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodorderDocets
Description

Reorders a set of docets in a module.

Parametersosid.id.Id[]docetIdsthe Ids for a set of Docets
osid.id.IdmoduleIdthe Id of a Module
ErrorsNOT_FOUND docetId not found or, a docetId not related to moduleId
NULL_ARGUMENT docetIds or moduleId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.