Interface AgendaEvaluationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to evaluate Agendas and access
results. Agendas are OsidRules that may require additional
input in the form of an AgendaCondition to be evaluated.
An AgendaCondition is acquired using
getAgendaCondition(). The AgendaConditionRecords in the
AgendaCondition must be supplied for a successful evaluation. Knowledge
of a specific agenda Id is also an agreement to the understanding
of the required AgendaConditionRecords as well as what is expected
as a result. These record Types may be inspected in the
AgendaConditionRecord and CheckResultRecord respectively.
Like all OsidSessions, AgendaEvaluationSessions are
dedicated to single processing threads and a single authenticated user.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can evaluate agendas.evaluateAgendaOnCondition(Id agendaId, Condition agendaCondition) Evaluates an agenda based on an input condition.getAgendaCondition(Id agendaId) Gets anAgendaConditionfor the givenAgenda.Gets theEngineassociated with this session.Gets theEngineIdassociated with this session.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatTypes, getLocales, isAuthenticated, startTransaction, supportsTransactions
-
Method Details
-
getEngineId
Id getEngineId()Gets theEngineIdassociated with this session.- Returns:
- the
Engine Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getEngine
Gets theEngineassociated with this session.- Returns:
- the engine
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canEvaluateAgendas
boolean canEvaluateAgendas()Tests if this user can evaluate agendas. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may not offer lookup operations to unauthorized users.- Returns:
falseif agenda evaluation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getAgendaCondition
AgendaCondition getAgendaCondition(Id agendaId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets anAgendaConditionfor the givenAgenda. The recordTypesin theAgendaConditionare required for a successful evaluation.- Parameters:
agendaId- theIdof anAgenda- Returns:
- an agenda condition
- Throws:
NotFoundException-agendaIdis not foundNullArgumentException-agendaIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure making request- Compliance:
mandatory- This method must be implemented.
-
evaluateAgendaOnCondition
CheckResultList evaluateAgendaOnCondition(Id agendaId, Condition agendaCondition) throws NotFoundException, OperationFailedException, PermissionDeniedException Evaluates an agenda based on an input condition. The status of eachCheckevaluation is returned in aCheckResult.- Parameters:
agendaId- theIdof anAgendaagendaCondition- an agenda condition- Returns:
- a list of results
- Throws:
NotFoundException-agendaIdis not foundNullArgumentException-agendaIdoragendaConditionisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-agendaConditiondid not originate fromgetAgendaCondition()or is missing information required to evaluateagendaId- Compliance:
mandatory- This method must be implemented.
-