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

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

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

The delete operations delete ProgramEntries. To unmap a ProgramEntry from the current CourseCatalog, the ProgramEntryCourseCatalogAssignmentSession should be used. These delete operations attempt to remove the ProgramEntry 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.
MethodcanCreateProgramEntries
Description

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

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

Parametersosid.type.Type[]programEntryRecordTypesarray of program entry record types
Returnboolean true if ProgramEntry creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT programEntryRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetProgramEntryFormForCreate
Description

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

Parametersosid.id.IdprogramIdthe Id of a Program
osid.id.IdresourceIdthe Id of a student
osid.type.Type[]programEntryRecordTypesarray of program entry record types
Returnosid.course.chronicle.ProgramEntryFormthe program entry form
ErrorsNOT_FOUND programId or resourceId is not found
NULL_ARGUMENT programId, resourceId , or programEntryRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateProgramEntry
Description

Creates a new ProgramEntry.

Parametersosid.course.chronicle.ProgramEntryFormprogramEntryFormthe form for this ProgramEntry
Returnosid.course.chronicle.ProgramEntrythe new ProgramEntry
ErrorsILLEGAL_STATE programEntryForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT programEntryForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED programEntryForm did not originate from getProgramEntryFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateProgramEntries
Description

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

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

Parametersosid.id.IdprogramEntryIdthe Id of the ProgramEntry
Returnosid.course.chronicle.ProgramEntryFormthe program entry form
ErrorsNOT_FOUND programEntryId is not found
NULL_ARGUMENT programEntryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateProgramEntry
Description

Updates an existing program entry.

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

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

Tests if this user can delete a specified ProgramEntry. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting the ProgramEntry will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer a delete operation to an unauthorized user for this program entry.

Parametersosid.id.IdprogramEntryIdthe Id of the ProgramEntry
Returnboolean false if deletion of this ProgramEntry is not authorized, true otherwise
ErrorsNULL_ARGUMENT programEntryId is null
CompliancemandatoryThis method must be implemented.
Provider Notes

If the programEntryId is not found, then it is acceptable to return false to indicate the lack of a delete available.

MethoddeleteProgramEntry
Description

Deletes a ProgramEntry.

Parametersosid.id.IdprogramEntryIdthe Id of the ProgramEntry to remove
ErrorsNOT_FOUND programEntryId not found
NULL_ARGUMENT programEntryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageProgramEntryAliases
Description

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

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

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