public interface FunctionVaultAssignmentSession extends OsidSession
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
).
Modifier and Type | Method and Description |
---|---|
void |
assignFunctionToVault(Id functionId,
Id vaultId)
Adds an existing
Function to a Vault. |
boolean |
canAssignFunctions()
Tests if this user can alter function/vault mappings.
|
boolean |
canAssignFunctionsToVault(Id vaultId)
Tests if this user can alter function/vault mappings.
|
IdList |
getAssignableVaultIds(Id vaultId)
Gets a list of vault including and under the given vault node in which
any function can be assigned.
|
IdList |
getAssignableVaultIdsForFunction(Id vaultId,
Id functionId)
Gets a list of vault including and under the given vault node in which
a specific function can be assigned.
|
void |
reassignFunctionToVault(Id functionId,
Id fromVaultId,
Id toVaultId)
Moves a
Function from one Vault to
another. |
void |
unassignFunctionFromVault(Id functionId,
Id vaultId)
Removes a
Function from a Vault. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignFunctions()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignFunctionsToVault(Id vaultId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.vaultId
- the Id
of the Vault
false
if mapping is not authorized, true
otherwiseNullArgumentException
- vaultId
is
null
mandatory
- This method must be implemented. IdList getAssignableVaultIds(Id vaultId) throws OperationFailedException
vaultId
- the Id
of the Vault
Ids
NullArgumentException
- vaultId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableVaultIdsForFunction(Id vaultId, Id functionId) throws OperationFailedException
vaultId
- the Id
of the Vault
functionId
- the Id
of the Function
Ids
NullArgumentException
- vaultId
or
functionId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignFunctionToVault(Id functionId, Id vaultId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Function
to a Vault.
functionId
- the Id
of the Function
vaultId
- the Id
of the Vault
AlreadyExistsException
- functionId
is
already assigned to vaultId
NotFoundException
- functionId
or
vaultId
not foundNullArgumentException
- functionId
or
vaultId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignFunctionFromVault(Id functionId, Id vaultId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Function
from a Vault.
functionId
- the Id
of the Function
vaultId
- the Id
of the Vault
NotFoundException
- functionId
or
vaultId
not found or functionId
not
assigned to vaultId
NullArgumentException
- functionId
or
vaultId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignFunctionToVault(Id functionId, Id fromVaultId, Id toVaultId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Function
from one Vault
to
another. Mappings to other Vaults
are unaffected.functionId
- the Id
of the Function
fromVaultId
- the Id
of the current Vault
toVaultId
- the Id
of the destination
Vault
NotFoundException
- functionId, fromVaultId,
or toVaultId
not found or
functionId
not mapped to fromVaultId
NullArgumentException
- functionId, fromVaultId,
or toVaultId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.