Interface AuthorizationVaultAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Authorizations to
Vault . An Authorization may map to multiple Vault
objects and removing the last reference to a Authorization is the
equivalent of deleting it. Each Vault may have its own
authorizations governing who is allowed to operate on it.
Moving or adding a reference of a Authorization to another
Vault is not a copy operation (eg: does not change its Id
).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignAuthorizationToVault(Id authorizationId, Id vaultId) Adds an existingAuthorizationto aVault.booleanTests if this user can alter authorization/vault mappings.booleancanAssignAuthorizationsToVault(Id vaultId) Tests if this user can alter authorization/vault mappings.getAssignableVaultIds(Id vaultId) Gets a list of vault including and under the given vault node in which any authorization can be assigned.getAssignableVaultIdsForAuthorization(Id vaultId, Id authorizationId) Gets a list of vault including and under the given vault node in which a specific authorization can be assigned.voidreassignAuthorizationToVault(Id authorizationId, Id fromVaultId, Id toVaultId) Moves anAuthorizationfrom oneVaultto another.voidunassignAuthorizationFromVault(Id authorizationId, Id vaultId) Removes anAuthorizationfrom aVault.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignAuthorizations
boolean canAssignAuthorizations()Tests if this user can alter authorization/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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignAuthorizationsToVault
Tests if this user can alter authorization/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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Parameters:
vaultId- theIdof theVault- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-vaultIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableVaultIds
Gets a list of vault including and under the given vault node in which any authorization can be assigned.- Parameters:
vaultId- theIdof theVault- Returns:
- list of assignable vault
Ids - Throws:
NullArgumentException-vaultIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableVaultIdsForAuthorization
IdList getAssignableVaultIdsForAuthorization(Id vaultId, Id authorizationId) throws OperationFailedException Gets a list of vault including and under the given vault node in which a specific authorization can be assigned.- Parameters:
vaultId- theIdof theVaultauthorizationId- theIdof theAuthorization- Returns:
- list of assignable vault
Ids - Throws:
NullArgumentException-vaultIdorauthorizationIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignAuthorizationToVault
void assignAuthorizationToVault(Id authorizationId, Id vaultId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingAuthorizationto aVault.- Parameters:
authorizationId- theIdof theAuthorizationvaultId- theIdof theVault- Throws:
AlreadyExistsException-authorizationIdis already assigned tovaultIdNotFoundException-authorizationIdorvaultIdnot foundNullArgumentException-authorizationIdorvaultIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignAuthorizationFromVault
void unassignAuthorizationFromVault(Id authorizationId, Id vaultId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes anAuthorizationfrom aVault.- Parameters:
authorizationId- theIdof theAuthorizationvaultId- theIdof theVault- Throws:
NotFoundException-authorizationIdorvaultIdnot found orauthorizationIdnot assigned tovaultIdNullArgumentException-authorizationIdorvaultIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignAuthorizationToVault
void reassignAuthorizationToVault(Id authorizationId, Id fromVaultId, Id toVaultId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves anAuthorizationfrom oneVaultto another. Mappings to otherVaultsare unaffected.- Parameters:
authorizationId- theIdof theAuthorizationfromVaultId- theIdof the currentVaulttoVaultId- theIdof the destinationVault- Throws:
AlreadyExistsException-authorizationIdalready assigned totoVaultIdNotFoundException-authorizationId, fromVaultId, ortoVaultIdnot found orauthorizationIdnot mapped tofromVaultIdNullArgumentException-authorizationId, fromVaultId, ortoVaultIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-