OSID Logo
OSID Specifications
recognition package
Version 3.0.0
Release Candidate Preview
Interfaceosid.recognition.AcademyAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Academies.

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

MethodcanCreateAcademies
Description

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

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

Parametersosid.type.Type[]academyRecordTypesarray of academy types
Returnboolean true if Academy creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT academyRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetAcademyFormForCreate
Description

Gets the academy form for creating new academies. A new form should be requested for each create transaction.

Parametersosid.type.Type[]academyRecordTypesarray of academy types
Returnosid.recognition.AcademyFormthe academy form
ErrorsNULL_ARGUMENT academyRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateAcademy
Description

Creates a new Academy.

Parametersosid.recognition.AcademyFormacademyFormthe form for this Academy
Returnosid.recognition.Academythe new Academy
ErrorsILLEGAL_STATE academyForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT academyForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED academyForm did not originate from getAcademyFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateAcademies
Description

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

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

Parametersosid.id.IdacademyIdthe Id of the Academy
Returnosid.recognition.AcademyFormthe academy form
ErrorsNOT_FOUND academyId is not found
NULL_ARGUMENT academyId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateAcademy
Description

Updates an existing academy.

Parametersosid.recognition.AcademyFormacademyFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE academyForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT academyForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED academyForm did not originate from getAcademyFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteAcademies
Description

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

Deletes an Academy.

Parametersosid.id.IdacademyIdthe Id of the Academy to remove
ErrorsNOT_FOUND academyId not found
NULL_ARGUMENT academyId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageAcademyAliases
Description

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

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

Parametersosid.id.IdacademyIdthe Id of an Academy
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND academyId not found
NULL_ARGUMENT academyId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.