Interface StateSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to retrieve State to reference
Id mappings. A reference Id may map to only one
State while a State may map to multiple reference Ids .
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
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can perform lookups of state/Id mappings.getProcessesByReference(Id referenceId) Gets the processes to which the referenceIdbelongs.getProcessIdsByReference(Id referenceId) Gets the processes to which the referenceIdbelongs.getReferencesByState(Id stateId) Gets the list of referenceIdsmapped to aState.getStateByReferenceAndProcess(Id referenceId, Id processId) Gets theStateassociated with the given reference and process.getStateIdByReferenceAndProcess(Id referenceId, Id processId) Gets theStateIdassociated with the given referenceIdand process.getStateIdsByReference(Id referenceId) Gets theStateIdassociated with the given referenceId.getStateIdsByReferencesAndProcess(IdList referenceIds, Id processId) Gets theStateIdsassociated with the given referenceIdlist and process.getStatesByReference(Id referenceId) Gets theStateassociated with the givenId.getStatesByReferencesAndProcess(IdList referenceIds, Id processId) Gets theStatesassociated with the given references and process.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidA complete view of theStatereturns 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
-
canLookupStateMappings
boolean canLookupStateMappings()Tests if this user can perform lookups of state/Id mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup 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 looking up mappings is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeStateView
void useComparativeStateView()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.
-
usePlenaryStateView
void usePlenaryStateView()A complete view of theStatereturns 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.
-
getProcessIdsByReference
IdList getProcessIdsByReference(Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the processes to which the referenceIdbelongs.- Parameters:
referenceId- a referenceId- Returns:
- the processes to which the agent belongs
- Throws:
NotFoundException-referenceIdis not foundNullArgumentException-referenceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProcessesByReference
ProcessList getProcessesByReference(Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the processes to which the referenceIdbelongs.- Parameters:
referenceId- a referenceId- Returns:
- the processes to which the agent belongs
- Throws:
NotFoundException-referenceIdis not foundNullArgumentException-referenceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getStateIdsByReference
IdList getStateIdsByReference(Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theStateIdassociated with the given referenceId.- Parameters:
referenceId- a referenceId- Returns:
- associated states
- Throws:
NotFoundException-referenceIdis not foundNullArgumentException-referenceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getStatesByReference
StateList getStatesByReference(Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theStateassociated with the givenId.- Parameters:
referenceId- a referenceId- Returns:
- associated states
- Throws:
NotFoundException-referenceIdis not foundNullArgumentException-referenceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getStateIdByReferenceAndProcess
Id getStateIdByReferenceAndProcess(Id referenceId, Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theStateIdassociated with the given referenceIdand process.- Parameters:
referenceId- a referenceIdprocessId-Idof aProcess- Returns:
- associated state
- Throws:
NotFoundException-referenceIdis not found in processNullArgumentException-referenceIdorprocessIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getStateIdsByReferencesAndProcess
IdList getStateIdsByReferencesAndProcess(IdList referenceIds, Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theStateIdsassociated with the given referenceIdlist and process. The returned stateIdsare in the order they are supplied.- Parameters:
referenceIds- a referenceIdprocessId-Idof aProcess- Returns:
- associated states
- Throws:
NotFoundException-referenceIdis not found in processNullArgumentException-referenceIdsorprocessIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getStateByReferenceAndProcess
State getStateByReferenceAndProcess(Id referenceId, Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theStateassociated with the given reference and process.- Parameters:
referenceId- a referenceIdprocessId-Idof aProcess- Returns:
- associated state
- Throws:
NotFoundException- areferenceIdis not found in processNullArgumentException-referenceIdorprocessIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getStatesByReferencesAndProcess
StateList getStatesByReferencesAndProcess(IdList referenceIds, Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theStatesassociated with the given references and process. The returned states are in the order they are supplied.- Parameters:
referenceIds- a referenceIdsprocessId-Idof aProcess- Returns:
- associated state
- Throws:
NotFoundException- areferenceIdis not found in processNullArgumentException-referenceIdsorprocessIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getReferencesByState
IdList getReferencesByState(Id stateId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the list of referenceIdsmapped to aState.- Parameters:
stateId-Idof aState- Returns:
- list of reference
Ids - Throws:
NotFoundException-stateIdis not foundNullArgumentException-stateIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-