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

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

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

The delete operations delete Awards. To unmap an Award from the current Academy, the AwardAcademyAssignmentSession should be used. These delete operations attempt to remove the Award itself thus removing it from all known Academy catalogs.

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

MethodgetAcademyId
Description

Gets the Academy Id associated with this session.

Returnosid.id.Idthe Academy Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetAcademy
Description

Gets the Academy associated with this session.

Returnosid.recognition.Academythe academy
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateAwards
Description

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

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

Parametersosid.type.Type[]awardRecordTypesarray of award record types
Returnboolean true if Award creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT awardRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetAwardFormForCreate
Description

Gets the award form for creating new awards. A new form should be requested for each create transaction.

Parametersosid.type.Type[]awardRecordTypesarray of award record types
Returnosid.recognition.AwardFormthe award form
ErrorsNULL_ARGUMENT awardRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateAward
Description

Creates a new Award.

Parametersosid.recognition.AwardFormawardFormthe form for this Award
Returnosid.recognition.Awardthe new Award
ErrorsILLEGAL_STATE awardForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT awardForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED awardForm did not originate from getAwardFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateAwards
Description

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

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

Parametersosid.id.IdawardIdthe Id of the Award
Returnosid.recognition.AwardFormthe award form
ErrorsNOT_FOUND awardId is not found
NULL_ARGUMENT awardId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateAward
Description

Updates an existing award.

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

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

Deletes an Award.

Parametersosid.id.IdawardIdthe Id of the Award to remove
ErrorsNOT_FOUND awardId not found
NULL_ARGUMENT awardId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageAwardAliases
Description

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

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

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