Interface AgendaEngineAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Agendas to
Engine mappings. An Agenda may appear in multiple Engine
objects and removing the last reference to an Agenda 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 Agenda to another Engine is
not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignAgendaToEngine(Id agendaId, Id engineId) Adds an existingAgendato aEngine.booleanTests if this user can alter agenda/engine mappings.booleancanAssignAgendasToEngine(Id engineId) Tests if this user can alter agenda/engine mappings.getAssignableEngineIds(Id engineId) Gets a list of engines including and under the given engine node in which any agenda can be assigned.getAssignableEngineIdsForAgenda(Id engineId, Id agendaId) Gets a list of engines including and under the given engine node in which a specific agenda can be assigned.voidreassignAgendaToEngine(Id agendaId, Id fromEngineId, Id toEngineId) Moves anAgendafrom oneEngineto another.voidunassignAgendaFromEngine(Id agendaId, Id engineId) Removes anAgendafrom 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
-
canAssignAgendas
boolean canAssignAgendas()Tests if this user can alter agenda/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 check is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignAgendasToEngine
Tests if this user can alter agenda/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 agenda 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.
-
getAssignableEngineIdsForAgenda
Gets a list of engines including and under the given engine node in which a specific agenda can be assigned.- Parameters:
engineId- theIdof theEngineagendaId- theIdof theAgenda- Returns:
- list of assignable engine
Ids - Throws:
NullArgumentException-engineIdoragendaIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignAgendaToEngine
void assignAgendaToEngine(Id agendaId, Id engineId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingAgendato aEngine.- Parameters:
agendaId- theIdof theAgendaengineId- theIdof theEngine- Throws:
AlreadyExistsException-agendaIdis already assigned toengineIdNotFoundException-agendaIdorengineIdnot foundNullArgumentException-agendaIdorengineIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignAgendaFromEngine
void unassignAgendaFromEngine(Id agendaId, Id engineId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes anAgendafrom aEngine.- Parameters:
agendaId- theIdof theAgendaengineId- theIdof theEngine- Throws:
NotFoundException-agendaIdorengineIdnot found oragendaIdnot assigned toengineIdNullArgumentException-agendaIdorengineIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignAgendaToEngine
void reassignAgendaToEngine(Id agendaId, Id fromEngineId, Id toEngineId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves anAgendafrom oneEngineto another. Mappings to otherEnginesare unaffected.- Parameters:
agendaId- theIdof theAgendafromEngineId- theIdof the currentEnginetoEngineId- theIdof the destinationEngine- Throws:
AlreadyExistsException-agendaIdalready assigned totoEngineIdNotFoundException-agendaId, fromEngineId, ortoEngineIdnot found oragendaIdnot mapped tofromEngineIdNullArgumentException-agendaId, fromEngineId, ortoEngineIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-