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

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

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

The delete operations delete CredentialEntries. To unmap a CredentialEntry from the current CourseCatalog, the CredentialEntryCourseCatalogAssignmentSession should be used. These delete operations attempt to remove the CredentialEntry 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.
MethodcanCreateCredentialEntries
Description

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

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

Parametersosid.type.Type[]credentialEntryRecordTypesarray of credential entry record types
Returnboolean true if CredentialEntry creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT credentialEntryRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetCredentialEntryFormForCreate
Description

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

Parametersosid.id.IdcredentialIda credential Id
osid.id.IdresourceIda student Id
osid.type.Type[]credentialEntryRecordTypesarray of credential entry record types
Returnosid.course.chronicle.CredentialEntryFormthe credential entry form
ErrorsNOT_FOUND credentialId or resourceId is not found
NULL_ARGUMENT credentialId, resourceId , or credentialEntryRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateCredentialEntry
Description

Creates a new CredentialEntry.

Parametersosid.course.chronicle.CredentialEntryFormcredentialEntryFormthe form for this CredentialEntry
Returnosid.course.chronicle.CredentialEntrythe new CredentialEntry
ErrorsILLEGAL_STATE credentialEntryForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT credentialEntryForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED credentialEntryForm did not originate from getCredentialEntryFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateCredentialEntries
Description

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

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

Parametersosid.id.IdcredentialEntryIdthe Id of the CredentialEntry
Returnosid.course.chronicle.CredentialEntryFormthe credential entry form
ErrorsNOT_FOUND credentialEntryId is not found
NULL_ARGUMENT credentialEntryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateCredentialEntry
Description

Updates an existing credential entry.

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

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

Deletes a CredentialEntry.

Parametersosid.id.IdcredentialEntryIdthe Id of the CredentialEntry to remove
ErrorsNOT_FOUND credentialEntryId not found
NULL_ARGUMENT credentialEntryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageCredentialEntryAliases
Description

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

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

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