Interface InstructionLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for retrieving instructions.
This lookup session defines several views:
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete result set or is an error condition
- isolated engine view: All instruction methods in this session
operate, retrieve and pertain to instructions defined explicitly in
the current engine. Using an isolated view is useful for managing
Instructionswith theInstructionAdminSession. - federated engine view: All instruction lookup methods in this session operate, retrieve and pertain to all instructions defined in this engine and any other instructions implicitly available in this engine through engine inheritence.
- active instruction view: All instruction lookup methods return active instructions.
- any status instruction view: instructions of any active or inactive status are returned from methods.
The methods useFederatedEngineView() and
useIsolatedEngineView() behave as a radio group and one should be
selected before invoking any lookup methods.
Instructions may have an additional records indicated by their
respective record types. The record may not be accessed through a cast of
the Instructions .
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performInstructionlookups.Gets theEngineassociated with this session.Gets theEngineIdassociated with this session.getInstruction(Id instructionId) Gets theInstructionspecified by itsId.Gets all instructions.getInstructionsByGenusType(Type instructionGenusType) Gets anInstructionListcorresponding to the given instruction genusTypewhich does not include instructions of types derived from the specifiedType.getInstructionsByIds(IdList instructionIds) Gets anInstructionListcorresponding to the givenIdList.getInstructionsByParentGenusType(Type instructionGenusType) Gets anInstructionListcorresponding to the given instruction genusTypeand include any additional instructions with genus types derived from the specifiedType.getInstructionsByRecordType(Type instructionRecordType) Gets anInstructionListcontaining the given instruction recordType.getInstructionsForAgenda(Id agendaId) Gets anInstructionListfor the given agenda.getInstructionsForAgendaAndCheck(Id agendaId, Id checkId) Gets anInstructionListfor the given agenda and check.getInstructionsForAgendaAndCheckOnDate(Id agendaId, Id checkId, DateTime from, DateTime to) Gets anInstructionListfor the given agenda and check and effective for the entire given date range inclusive but not confined to the date range.getInstructionsForAgendaOnDate(Id agendaId, DateTime from, DateTime to) Gets anInstructionListfor the given agenda and effective for the entire given date range inclusive but not confined to the date range.getInstructionsForCheck(Id checkId) Gets anInstructionListfor the given check.getInstructionsForCheckOnDate(Id checkId, DateTime from, DateTime to) Gets anInstructionListfor the given check and effective for the entire given date range inclusive but not confined to the date range.getInstructionsOnDate(DateTime from, DateTime to) Gets anInstructionListeffective for the entire given date range inclusive but not confined to the date range.voidOnly active instructions are returned by methods in this session.voidAll active and inactive instructions of are returned by methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theInstructionreturns is desired.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
-
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.
-
canLookupInstructions
boolean canLookupInstructions()Tests if this user can performInstructionlookups. 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 lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeInstructionView
void useComparativeInstructionView()The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryInstructionView
void usePlenaryInstructionView()A complete view of theInstructionreturns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedEngineView
void useFederatedEngineView()Federates the view for methods in this session. A federated view will include instructions in engines which are children of this engine in the engine hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedEngineView
void useIsolatedEngineView()Isolates the view for methods in this session. An isolated view restricts retrievals to this engine only.- Compliance:
mandatory- This method is must be implemented.
-
useActiveInstructionView
void useActiveInstructionView()Only active instructions are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyStatusInstructionView
void useAnyStatusInstructionView()All active and inactive instructions of are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getInstruction
Instruction getInstruction(Id instructionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theInstructionspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedInstructionmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anInstructionand retained for compatibility. In active mode, instructions are returned that are currently active. In any status mode, active and inactive instructions are returned.- Parameters:
instructionId- theIdof theInstructionto retrieve- Returns:
- the returned
Instruction - Throws:
NotFoundException- noInstructionfound with the givenIdNullArgumentException-instructionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getInstructionsByIds
InstructionList getInstructionsByIds(IdList instructionIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets anInstructionListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the instructions specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleInstructionsmay be omitted from the list and may present the elements in any order including returning a unique set. In active mode, instructions are returned that are currently active. In any status mode, active and inactive instructions are returned.- Parameters:
instructionIds- the list ofIdsto retrieve- Returns:
- the returned
Instructionlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-instructionIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getInstructionsByGenusType
InstructionList getInstructionsByGenusType(Type instructionGenusType) throws OperationFailedException, PermissionDeniedException Gets anInstructionListcorresponding to the given instruction genusTypewhich does not include instructions of types derived from the specifiedType. In plenary mode, the returned list contains all known instructions or an error results. Otherwise, the returned list may contain only those instructions that are accessible through this session. In active mode, instructions are returned that are currently active. In any status mode, active and inactive instructions are returned.- Parameters:
instructionGenusType- an instruction genus type- Returns:
- the returned
Instructionlist - Throws:
NullArgumentException-instructionGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getInstructionsByParentGenusType
InstructionList getInstructionsByParentGenusType(Type instructionGenusType) throws OperationFailedException, PermissionDeniedException Gets anInstructionListcorresponding to the given instruction genusTypeand include any additional instructions with genus types derived from the specifiedType. In plenary mode, the returned list contains all known instructions or an error results. Otherwise, the returned list may contain only those instructions that are accessible through this session. In active mode, instructions are returned that are currently active. In any status mode, active and inactive instructions are returned.- Parameters:
instructionGenusType- an instruction genus type- Returns:
- the returned
Instructionlist - Throws:
NullArgumentException-instructionGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getInstructionsByRecordType
InstructionList getInstructionsByRecordType(Type instructionRecordType) throws OperationFailedException, PermissionDeniedException Gets anInstructionListcontaining the given instruction recordType. In plenary mode, the returned list contains all known instructions or an error results. Otherwise, the returned list may contain only those instructions that are accessible through this session. In active mode, instructions are returned that are currently active. In any status mode, active and inactive instructions are returned.- Parameters:
instructionRecordType- an instruction record type- Returns:
- the returned
Instructionlist - Throws:
NullArgumentException-instructionRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getInstructionsOnDate
InstructionList getInstructionsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anInstructionListeffective for the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known instructions or an error results. Otherwise, the returned list may contain only those instructions that are accessible through this session. In active mode, instructions are returned that are currently active. In any status mode, active and inactive instructions are returned.- Parameters:
from- a start dateto- an end date- Returns:
- the returned
Instructionlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getInstructionsForAgenda
InstructionList getInstructionsForAgenda(Id agendaId) throws OperationFailedException, PermissionDeniedException Gets anInstructionListfor the given agenda. In plenary mode, the returned list contains all known instructions or an error results. Otherwise, the returned list may contain only those instructions that are accessible through this session. In active mode, instructions are returned that are currently active. In any status mode, active and inactive instructions are returned.- Parameters:
agendaId- an agendaId- Returns:
- the returned
Instructionlist - Throws:
NullArgumentException-agendaIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getInstructionsForAgendaOnDate
InstructionList getInstructionsForAgendaOnDate(Id agendaId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anInstructionListfor the given agenda and effective for the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known instructions or an error results. Otherwise, the returned list may contain only those instructions that are accessible through this session. In active mode, instructions are returned that are currently active. In any status mode, active and inactive instructions are returned.- Parameters:
agendaId- an agendaIdfrom- a start dateto- an end date- Returns:
- the returned
Instructionlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-agendaId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getInstructionsForCheck
InstructionList getInstructionsForCheck(Id checkId) throws OperationFailedException, PermissionDeniedException Gets anInstructionListfor the given check. In plenary mode, the returned list contains all known instructions or an error results. Otherwise, the returned list may contain only those instructions that are accessible through this session. In active mode, instructions are returned that are currently active. In any status mode, active and inactive instructions are returned.- Parameters:
checkId- a checkId- Returns:
- the returned
Instructionlist - Throws:
NullArgumentException-checkIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getInstructionsForCheckOnDate
InstructionList getInstructionsForCheckOnDate(Id checkId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anInstructionListfor the given check and effective for the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known instructions or an error results. Otherwise, the returned list may contain only those instructions that are accessible through this session. In active mode, instructions are returned that are currently active. In any status mode, active and inactive instructions are returned.- Parameters:
checkId- a checkIdfrom- a start dateto- an end date- Returns:
- the returned
Instructionlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-checkId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getInstructionsForAgendaAndCheck
InstructionList getInstructionsForAgendaAndCheck(Id agendaId, Id checkId) throws OperationFailedException, PermissionDeniedException Gets anInstructionListfor the given agenda and check. In plenary mode, the returned list contains all known instructions or an error results. Otherwise, the returned list may contain only those instructions that are accessible through this session. In active mode, instructions are returned that are currently active. In any status mode, active and inactive instructions are returned.- Parameters:
agendaId- an agendaIdcheckId- a checkId- Returns:
- the returned
Instructionlist - Throws:
NullArgumentException-agendaIdorcheckIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getInstructionsForAgendaAndCheckOnDate
InstructionList getInstructionsForAgendaAndCheckOnDate(Id agendaId, Id checkId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anInstructionListfor the given agenda and check and effective for the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known instructions or an error results. Otherwise, the returned list may contain only those instructions that are accessible through this session. In active mode, instructions are returned that are currently active. In any status mode, active and inactive instructions are returned.- Parameters:
agendaId- an agendaIdcheckId- a checkIdfrom- a start dateto- an end date- Returns:
- the returned
Instructionlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-agendaId, checkId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getInstructions
Gets all instructions. In plenary mode, the returned list contains all of the instructions, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleInstructionsmay be omitted from the list and may present the elements in any order including returning a unique set. In active mode, instructions are returned that are currently active. In any status mode, active and inactive instructions are returned.- Returns:
- the returned
Instructionlist - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-