public interface StateSession extends 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
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupStateMappings()
Tests if this user can perform lookups of state/Id mappings.
|
ProcessList |
getProcessesByReference(Id referenceId)
Gets the processes to which the reference
Id belongs. |
IdList |
getProcessIdsByReference(Id referenceId)
Gets the processes to which the reference
Id belongs. |
IdList |
getReferencesByState(Id stateId)
Gets the list of reference
Ids mapped to a
State. |
State |
getStateByReferenceAndProcess(Id referenceId,
Id processId)
Gets the
State associated with the given reference and
process. |
Id |
getStateIdByReferenceAndProcess(Id referenceId,
Id processId)
Gets the
State Id associated with the
given reference Id and process. |
IdList |
getStateIdsByReference(Id referenceId)
Gets the
State Id associated with the
given reference Id. |
IdList |
getStateIdsByReferencesAndProcess(IdList referenceIds,
Id processId)
Gets the
State Ids associated with the
given reference Id list and process. |
StateList |
getStatesByReference(Id referenceId)
Gets the
State associated with the given Id. |
StateList |
getStatesByReferencesAndProcess(IdList referenceIds,
Id processId)
Gets the
States associated with the given references
and process. |
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.
|
void |
usePlenaryStateView()
A complete view of the
State returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupStateMappings()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer lookup operations to
unauthorized users. false
if looking up mappings is not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeStateView()
mandatory
- This method is must be implemented. void usePlenaryStateView()
State
returns 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.mandatory
- This method is must be implemented. IdList getProcessIdsByReference(Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
belongs.referenceId
- a reference Id
NotFoundException
- referenceId
is not
foundNullArgumentException
- referenceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ProcessList getProcessesByReference(Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
belongs.referenceId
- a reference Id
NotFoundException
- referenceId
is not
foundNullArgumentException
- referenceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getStateIdsByReference(Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
State
Id
associated with the
given reference Id.
referenceId
- a reference Id
NotFoundException
- referenceId
is not
foundNullArgumentException
- referenceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. StateList getStatesByReference(Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
State
associated with the given Id.
referenceId
- a reference Id
NotFoundException
- referenceId
is not
foundNullArgumentException
- referenceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. Id getStateIdByReferenceAndProcess(Id referenceId, Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException
State
Id
associated with the
given reference Id
and process.referenceId
- a reference Id
processId
- Id
of a Process
NotFoundException
- referenceId
is not
found in processNullArgumentException
- referenceId
or
processId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getStateIdsByReferencesAndProcess(IdList referenceIds, Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException
State
Ids
associated with the
given reference Id
list and process. The returned state
Ids
are in the order they are supplied.referenceIds
- a reference Id
processId
- Id
of a Process
NotFoundException
- referenceId
is not
found in processNullArgumentException
- referenceIds
or
processId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. State getStateByReferenceAndProcess(Id referenceId, Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException
State
associated with the given reference and
process.referenceId
- a reference Id
processId
- Id
of a Process
NotFoundException
- a referenceId
is not
found in processNullArgumentException
- referenceId
or
processId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. StateList getStatesByReferencesAndProcess(IdList referenceIds, Id processId) throws NotFoundException, OperationFailedException, PermissionDeniedException
States
associated with the given references
and process. The returned states are in the order they are supplied.referenceIds
- a reference Ids
processId
- Id
of a Process
NotFoundException
- a referenceId
is not
found in processNullArgumentException
- referenceIds
or
processId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getReferencesByState(Id stateId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
mapped to a
State.
stateId
- Id
of a State
Ids
NotFoundException
- stateId
is not foundNullArgumentException
- stateId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.