Interface BlockOublietteAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Blocks to
Oubliette mappings. A Block may appear in multiple
Oubliette objects and removing the last reference to a Block is
the equivalent of deleting it. Each Oubliette may have its own
authorizations governing who is allowed to operate on it.
Adding a reference of a Block to another Oubliette is
not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignBlockToOubliette(Id blockId, Id oublietteId) Adds an existingBlockto anOubliette.booleanTests if this user can alter block/oubliette mappings.booleancanAssignBlocksToOubliette(Id oublietteId) Tests if this user can alter block/oubliette mappings.getAssignableOublietteIds(Id oublietteId) Gets a list of oubliettes including and under the given oubliette node in which any block can be assigned.getAssignableOublietteIdsForBlock(Id oublietteId, Id blockId) Gets a list of oubliettes including and under the given oubliette node in which a specific block can be assigned.voidreassignBlockToOubliette(Id blockId, Id fromOublietteId, Id toOublietteId) Moves aBlockfrom oneOublietteto another.voidunassignBlockFromOubliette(Id blockId, Id oublietteId) Removes aBlockfrom anOubliette.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
-
canAssignBlocks
boolean canAssignBlocks()Tests if this user can alter block/oubliette 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 lookup operations to unauthorized users.- Returns:
falseif hold is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignBlocksToOubliette
Tests if this user can alter block/oubliette 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 lookup operations to unauthorized users.- Parameters:
oublietteId- theIdof theOubliette- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-oublietteIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableOublietteIds
Gets a list of oubliettes including and under the given oubliette node in which any block can be assigned.- Parameters:
oublietteId- theIdof theOubliette- Returns:
- list of assignable oubliette
Ids - Throws:
NullArgumentException-oublietteIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableOublietteIdsForBlock
IdList getAssignableOublietteIdsForBlock(Id oublietteId, Id blockId) throws OperationFailedException Gets a list of oubliettes including and under the given oubliette node in which a specific block can be assigned.- Parameters:
oublietteId- theIdof theOublietteblockId- theIdof theBlock- Returns:
- list of assignable oubliette
Ids - Throws:
NullArgumentException-oublietteIdorblockIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignBlockToOubliette
void assignBlockToOubliette(Id blockId, Id oublietteId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingBlockto anOubliette.- Parameters:
blockId- theIdof theBlockoublietteId- theIdof theOubliette- Throws:
AlreadyExistsException-blockIdis already assigned tooublietteIdNotFoundException-blockIdoroublietteIdnot foundNullArgumentException-blockIdoroublietteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignBlockFromOubliette
void unassignBlockFromOubliette(Id blockId, Id oublietteId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aBlockfrom anOubliette.- Parameters:
blockId- theIdof theBlockoublietteId- theIdof theOubliette- Throws:
NotFoundException-blockIdoroublietteIdnot found orblockIdis not assigned tooublietteIdNullArgumentException-blockIdoroublietteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignBlockToOubliette
void reassignBlockToOubliette(Id blockId, Id fromOublietteId, Id toOublietteId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aBlockfrom oneOublietteto another. Mappings to otherOubliettesare unaffected.- Parameters:
blockId- theIdof theBlockfromOublietteId- theIdof the currentOubliettetoOublietteId- theIdof the destinationOubliette- Throws:
AlreadyExistsException-blockIdalready assigned totoOublietteIdNotFoundException-blockId, fromOublietteId, ortoOublietteIdnot found orblockIdnot mapped tofromOublietteIdNullArgumentException-blockId, fromOublietteId, ortoOublietteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-