Interface CheckEngineAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Checks to
Engine mappings. A Check may appear in multiple Engine
objects and removing the last reference to a Check 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 a Check to another Engine is not
a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignCheckToEngine(Id checkId, Id engineId) Adds an existingCheckto aEngine.booleanTests if this user can alter hold/engine mappings.booleancanAssignChecksToEngine(Id engineId) Tests if this user can alter hold/engine mappings.getAssignableEngineIds(Id engineId) Gets a list of engines including and under the given engine node in which any check can be assigned.getAssignableEngineIdsForCheck(Id engineId, Id checkId) Gets a list of engines including and under the given engine node in which a specific check can be assigned.voidreassignCheckToEngine(Id checkId, Id fromEngineId, Id toEngineId) Moves aCheckfrom oneEngineto another.voidunassignCheckFromEngine(Id checkId, Id engineId) Removes aCheckfrom 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
-
canAssignChecks
boolean canAssignChecks()Tests if this user can alter hold/engine mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known check 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 mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignChecksToEngine
Tests if this user can alter hold/engine mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known check 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 check 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.
-
getAssignableEngineIdsForCheck
Gets a list of engines including and under the given engine node in which a specific check can be assigned.- Parameters:
engineId- theIdof theEnginecheckId- theIdof theCheck- Returns:
- list of assignable engine
Ids - Throws:
NullArgumentException-engineIdorcheckIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignCheckToEngine
void assignCheckToEngine(Id checkId, Id engineId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingCheckto aEngine.- Parameters:
checkId- theIdof theCheckengineId- theIdof theEngine- Throws:
AlreadyExistsException-checkIdis already assigned toengineIdNotFoundException-checkIdorengineIdnot foundNullArgumentException-checkIdorengineIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignCheckFromEngine
void unassignCheckFromEngine(Id checkId, Id engineId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aCheckfrom aEngine.- Parameters:
checkId- theIdof theCheckengineId- theIdof theEngine- Throws:
NotFoundException-checkIdorengineIdnot found orcheckIdnot assigned toengineIdNullArgumentException-checkIdorengineIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignCheckToEngine
void reassignCheckToEngine(Id checkId, Id fromEngineId, Id toEngineId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aCheckfrom oneEngineto another. Mappings to otherEnginesare unaffected.- Parameters:
checkId- theIdof theCheckfromEngineId- theIdof the currentEnginetoEngineId- theIdof the destinationEngine- Throws:
AlreadyExistsException-checkIdalready assigned totoEngineIdNotFoundException-checkId, fromEngineId, ortoEngineIdnot found orcheckIdnot mapped tofromEngineIdNullArgumentException-checkId, fromEngineId, ortoEngineIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-