OSID Logo
OSID Specifications
authorization package
Version 3.0.0
Release Candidate Preview
Interfaceosid.authorization.QualifierAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Qualifiers. To unmap a Qualifier from the current Vault, the QualifierVaultAssignmentSession should be used. These delete operations attempt to remove the Qualifier itself thus removing it from all known Vault catalogs.

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

MethodgetVaultId
Description

Gets the Vault Id associated with this session.

Returnosid.id.Idthe Vault Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetVault
Description

Gets the Vault associated with this session.

Returnosid.authorization.Vaultthe Vault associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateQualifiers
Description

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

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

Parametersosid.type.Type[]qualifierRecordTypesarray of qualifier record types
Returnboolean true if Qualifier creation using the specified Types is supported, false otherwise
ErrorsNULL_ARGUMENT qualifierRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetQualifierFormForCreate
Description

Gets the qualifier form for creating new qualifiers. A new form should be requested for each create transaction.

Parametersosid.type.Type[]qualifierRecordTypesarray of qualifier record types
Returnosid.authorization.QualifierFormthe qualifier form
ErrorsNULL_ARGUMENT qualifierRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form with requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateQualifier
Description

Creates a new Qualifier.

Parametersosid.authorization.QualifierFormqualifierFormthe form for this Qualifier
Returnosid.authorization.Qualifierthe new Qualifier
ErrorsILLEGAL_STATE qualifierForm already used for a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT qualifierForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED qualifierForm did not originate from getQualifierFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateQualifiers
Description

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

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

Parametersosid.id.IdqualifierIdthe Id of the Qualifier
Returnosid.authorization.QualifierFormthe qualifier form
ErrorsNOT_FOUND qualifierId is not found
NULL_ARGUMENT qualifierId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateQualifier
Description

Updates an existing qualifier.

Parametersosid.authorization.QualifierFormqualifierFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE qualifierForm already used for an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT qualifierForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED qualifierForm did not originate from getQualifierFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteQualifiers
Description

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

Deletes a Qualifier.

Parametersosid.id.IdqualifierIdthe Id of the Qualifier to remove
ErrorsNOT_FOUND qualifierId not found
NULL_ARGUMENT qualifierId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageQualifierAliases
Description

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

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

Parametersosid.id.IdqualifierIdthe Id of a Qualifier
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND qualifierId not found
NULL_ARGUMENT qualifierId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.