Interface InstructionEngineAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Instructions to
Engine mappings. An Instruction may appear in multiple
Engine objects and removing the last reference to an
Instruction is the equivalent of deleting it. Each Engine may
have its own authorizations governing who is allowed to operate on it.
Adding a reference of an Instruction to another Engine
is not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignInstructionToEngine(Id instructionId, Id engineId) Adds an existingInstructionto aEngine.booleanTests if this user can alter instruction/engine mappings.booleancanAssignInstructionsToEngine(Id engineId) Tests if this user can alter instruction/engine mappings.getAssignableEngineIds(Id engineId) Gets a list of engines including and under the given engine node in which any instruction can be assigned.getAssignableEngineIdsForInstruction(Id engineId, Id instructionId) Gets a list of engines including and under the given engine node in which a specific instruction can be assigned.voidreassignInstructionToEngine(Id instructionId, Id fromEngineId, Id toEngineId) Moves anInstructionfrom oneEngineto another.voidunassignInstructionFromEngine(Id instructionId, Id engineId) Removes anInstructionfrom aEngine.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
-
canAssignInstructions
boolean canAssignInstructions()Tests if this user can alter instruction/engine 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 instruction is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignInstructionsToEngine
Tests if this user can alter instruction/engine 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:
engineId- theIdof theEngine- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-engineIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableEngineIds
Gets a list of engines including and under the given engine node in which any instruction can be assigned.- Parameters:
engineId- theIdof theEngine- Returns:
- list of assignable engine
Ids - Throws:
NullArgumentException-engineIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableEngineIdsForInstruction
IdList getAssignableEngineIdsForInstruction(Id engineId, Id instructionId) throws OperationFailedException Gets a list of engines including and under the given engine node in which a specific instruction can be assigned.- Parameters:
engineId- theIdof theEngineinstructionId- theIdof theInstruction- Returns:
- list of assignable engine
Ids - Throws:
NullArgumentException-engineIdorinstructionIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignInstructionToEngine
void assignInstructionToEngine(Id instructionId, Id engineId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingInstructionto aEngine.- Parameters:
instructionId- theIdof theInstructionengineId- theIdof theEngine- Throws:
AlreadyExistsException-instructionIdis already assigned toengineIdNotFoundException-instructionIdorengineIdnot foundNullArgumentException-instructionIdorengineIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignInstructionFromEngine
void unassignInstructionFromEngine(Id instructionId, Id engineId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes anInstructionfrom aEngine.- Parameters:
instructionId- theIdof theInstructionengineId- theIdof theEngine- Throws:
NotFoundException-instructionIdorengineIdnot found orinstructionIdnot assigned toengineIdNullArgumentException-instructionIdorengineIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignInstructionToEngine
void reassignInstructionToEngine(Id instructionId, Id fromEngineId, Id toEngineId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves anInstructionfrom oneEngineto another. Mappings to otherEnginesare unaffected.- Parameters:
instructionId- theIdof theInstructionfromEngineId- theIdof the currentEnginetoEngineId- theIdof the destinationEngine- Throws:
AlreadyExistsException-instructionIdalready assigned totoEngineIdNotFoundException-instructionId, fromEngineId, ortoEngineIdnot found orinstructionIdnot mapped tofromEngineIdNullArgumentException-instructionId, fromEngineId, ortoEngineIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-