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

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

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

The delete operations delete CourseEntries. To unmap a CourseEntry from the current CourseCatalog, the CourseEntryCourseCatalogAssignmentSession should be used. These delete operations attempt to remove the CourseEntry 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.
MethodcanCreateCourseEntries
Description

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

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

Parametersosid.type.Type[]courseEntryRecordTypesarray of course entry record types
Returnboolean true if CourseEntry creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT courseEntryRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetCourseEntryFormForCreate
Description

Gets the course entry form for creating new course entries. A new form should be requested for each create transaction.

Parametersosid.id.IdcourseIda course Id
osid.id.IdresourceIda program Id
osid.type.Type[]courseEntryRecordTypesarray of course entry record types
Returnosid.course.chronicle.CourseEntryFormthe course entry form
ErrorsNOT_FOUND courseId or resourceId is not found
NULL_ARGUMENT courseId, resourceId , or courseEntryRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateCourseEntry
Description

Creates a new CourseEntry.

Parametersosid.course.chronicle.CourseEntryFormcourseEntryFormthe form for this CourseEntry
Returnosid.course.chronicle.CourseEntrythe new CourseEntry
ErrorsILLEGAL_STATE courseEntryForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT courseEntryForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED courseEntryForm did not originate from getCourseEntryFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateCourseEntries
Description

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

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

Parametersosid.id.IdcourseEntryIdthe Id of the CourseEntry
Returnosid.course.chronicle.CourseEntryFormthe course entry form
ErrorsNOT_FOUND courseEntryId is not found
NULL_ARGUMENT courseEntryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateCourseEntry
Description

Updates an existing course entry.

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

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

Deletes a CourseEntry.

Parametersosid.id.IdcourseEntryIdthe Id of the CourseEntry to remove
ErrorsNOT_FOUND courseEntryId not found
NULL_ARGUMENT courseEntryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageCourseEntryAliases
Description

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

Adds an Id to a CourseEntry for the purpose of creating compatibility. The primary Id of the CourseEntry 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 entry, it is reassigned to the given course entry Id.

Parametersosid.id.IdcourseEntryIdthe Id of a CourseEntry
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is in use as a primary Id
NOT_FOUND courseEntryId not found
NULL_ARGUMENT courseEntryId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.