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

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

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

The delete operations delete Registrations. To unmap a Registration from the current CourseCatalog, the RegistrationCourseCatalogAssignmentSession should be used. These delete operations attempt to remove the RegistrationForm 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.
MethodcanCreateRegistrations
Description

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

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

Parametersosid.type.Type[]registrationRecordTypesarray of registration record types
Returnboolean true if Registration creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT registrationRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetRegistrationFormForCreate
Description

Gets the registration form for creating new registrations. A new form should be requested for each create transaction.

Parametersosid.id.IdactivityBundleIdthe Id of the activity bundle
osid.id.IdresourceIdthe Id of the student
osid.type.Type[]registrationRecordTypesarray of registration record types
Returnosid.course.registration.RegistrationFormthe registration form
ErrorsNOT_FOUND activityBundleId or resourceId not found
NULL_ARGUMENT activityBundleId, resourceId, or registrationRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateRegistration
Description

Creates a new Registration.

Parametersosid.course.registration.RegistrationFormregistrationFormthe form for this Registration
Returnosid.course.registration.Registrationthe new Registration
ErrorsILLEGAL_STATE registrationForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NOT_FOUND registrationForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED registrationForm did not originate from getRegistrationFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateRegistrations
Description

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

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

Parametersosid.id.IdregistrationIdthe Id of the Registration
Returnosid.course.registration.RegistrationFormthe registration form
ErrorsNOT_FOUND registrationId is not found
NULL_ARGUMENT registrationId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateRegistration
Description

Updates an existing registration.

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

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

Deletes a Registration.

Parametersosid.id.IdregistrationIdthe Id of the Registration to remove
ErrorsNOT_FOUND registrationId not found
NULL_ARGUMENT registrationId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageRegistrationAliases
Description

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

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

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