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

This session provides methods to re-assign Functions to Vaults. A Function may map to multiple Vaults and removing the last reference to a Function is the equivalent of deleting it. Each Vault may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a Function to another Vault is not a copy operation (eg: does not change its Id ).

MethodcanAssignFunctions
Description

Tests if this user can alter function/vault mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Returnboolean false if mapping is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanAssignFunctionsToVault
Description

Tests if this user can alter function/vault mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Parametersosid.id.IdvaultIdthe Id of the Vault
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT vaultId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignableVaultIds
Description

Gets a list of vault including and under the given vault node in which any function can be assigned.

Parametersosid.id.IdvaultIdthe Id of the Vault
Returnosid.id.IdListlist of assignable vault Ids
ErrorsNULL_ARGUMENT vaultId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignableVaultIdsForFunction
Description

Gets a list of vault including and under the given vault node in which a specific function can be assigned.

Parametersosid.id.IdvaultIdthe Id of the Vault
osid.id.IdfunctionIdthe Id of the Function
Returnosid.id.IdListlist of assignable vault Ids
ErrorsNULL_ARGUMENT vaultId or functionId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignFunctionToVault
Description

Adds an existing Function to a Vault.

Parametersosid.id.IdfunctionIdthe Id of the Function
osid.id.IdvaultIdthe Id of the Vault
ErrorsALREADY_EXISTS functionId is already assigned to vaultId
NOT_FOUND functionId or vaultId not found
NULL_ARGUMENT functionId or vaultId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignFunctionFromVault
Description

Removes a Function from a Vault.

Parametersosid.id.IdfunctionIdthe Id of the Function
osid.id.IdvaultIdthe Id of the Vault
ErrorsNOT_FOUND functionId or vaultId not found or functionId not assigned to vaultId
NULL_ARGUMENT functionId or vaultId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignFunctionToVault
Description

Moves a Function from one Vault to another. Mappings to other Vaults are unaffected.

Parametersosid.id.IdfunctionIdthe Id of the Function
osid.id.IdfromVaultIdthe Id of the current Vault
osid.id.IdtoVaultIdthe Id of the destination Vault
ErrorsNOT_FOUND functionId, fromVaultId, or toVaultId not found or functionId not mapped to fromVaultId
NULL_ARGUMENT functionId, fromVaultId, or toVaultId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.