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

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

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

The delete operations delete Vaults. It is safer to remove all mappings to the Vault catalogs before deletion.

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

MethodcanCreateVaults
Description

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

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

Parametersosid.type.Type[]vaultRecordTypesarray of vault record types
Returnboolean true if Vault creation using the specified Types is supported, false otherwise
ErrorsNULL_ARGUMENT vaultRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetVaultFormForCreate
Description

Gets the vault form for creating new vaults. A new form should be requested for each create transaction.

Parametersosid.type.Type[]vaultRecordTypesarray of vault record types
Returnosid.authorization.VaultFormthe vault form
ErrorsNULL_ARGUMENT vaultRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form qith requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateVault
Description

Creates a new Vault.

Parametersosid.authorization.VaultFormvaultFormthe form for this Vault
Returnosid.authorization.Vaultthe new Vault
ErrorsILLEGAL_STATE vaultForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT vaultForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED vaultForm did not originate from getVaultFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateVaults
Description

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

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

Parametersosid.id.IdvaultIdthe Id of the Vault
Returnosid.authorization.VaultFormthe vault form
ErrorsNOT_FOUND vaultId is not found
NULL_ARGUMENT vaultId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateVault
Description

Updates an existing vault.

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

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

Deletes a Vault.

Parametersosid.id.IdvaultIdthe Id of the Vault to remove
ErrorsNOT_FOUND vaultId not found
NULL_ARGUMENT vaultId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageVaultAliases
Description

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

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

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