OSID Logo
OSID Specifications
process package
Version 3.0.0
Release Candidate Preview
Interfaceosid.process.StateLookupSession
Implementsosid.OsidSession
Description

This session defines methods for retrieving states. A State is an arbitrary entity that may represent a person, place or thing used to identify an object used in various services.

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 process view: All state methods in this session operate, retrieve and pertain to states defined explicitly in the current process. Using an isolated view is useful for managing States with the StateAdminSession.
  • federated process view: All state methods in this session operate, retrieve and pertain to all states defined in this process and any other states implicitly available in this process through process inheritence.

The methods useFederatedProcessView() and useIsolatedProcessView() behave as a radio group and one should be selected before invoking any lookup methods.

States may have an additional records indicated by their respective record types. The record may not be accessed through a cast of the State.

MethodgetProcessId
Description

Gets the Process Id associated with this session.

Returnosid.id.Idthe Process Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetProcess
Description

Gets the Process associated with this session.

Returnosid.process.Processthe Process associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupStates
Description

Tests if this user can perform State lookups. 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 a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations.

Returnboolean false if lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeStateView
Description

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.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryStateView
Description

A complete view of the 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.

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedProcessView
Description

Federates the view for methods in this session. A federated view will include states in processes which are children of this process in the process hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedProcessView
Description

Isolates the view for methods in this session. An isolated view restricts lookups to this process only.

CompliancemandatoryThis method is must be implemented.
MethodgetState
Description

Gets the State specified by its Id. In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned State may have a different Id than requested, such as the case where a duplicate Id was assigned to a State and retained for compatibility.

Parametersosid.id.IdstateIdthe Id of the State to retrieve
Returnosid.process.Statethe returned State
ErrorsNOT_FOUNDno State found with the given Id
NULL_ARGUMENT stateId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetStatesByIds
Description

Gets a StateList corresponding to the given IdList. In plenary mode, the returned list contains all of the states specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible States may be omitted from the list and may present the elements in any order including returning a unique set.

Parametersosid.id.IdListstateIdsthe list of Ids to retrieve
Returnosid.process.StateListthe returned State list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT stateIdLs is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetStatesByGenusType
Description

Gets a StateList corresponding to the given state genus Type which does not include states of types derived from the specified Type. In plenary mode, the returned list contains all known states or an error results. Otherwise, the returned list may contain only those states that are accessible through this session.

Parametersosid.type.TypestateGenusTypea state genus type
Returnosid.process.StateListthe returned State list
ErrorsNULL_ARGUMENT stateGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetStatesByParentGenusType
Description

Gets a StateList corresponding to the given state genus Type and include any additional states with genus types derived from the specified Type. In plenary mode, the returned list contains all known states or an error results. Otherwise, the returned list may contain only those states that are accessible through this session.

Parametersosid.type.TypestateGenusTypea state genus type
Returnosid.process.StateListthe returned State list
ErrorsNULL_ARGUMENT stateGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetStatesByRecordType
Description

Gets a StateList containing the given state record Type. In plenary mode, the returned list contains all known states or an error results. Otherwise, the returned list may contain only those states that are accessible through this session.

Parametersosid.type.TypestateRecordTypea state record type
Returnosid.process.StateListthe returned State list
ErrorsNULL_ARGUMENT stateRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetStates
Description

Gets all States. In plenary mode, the returned list contains all known states or an error results. Otherwise, the returned list may contain only those states that are accessible through this session.

Returnosid.process.StateLista list of States
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetValidNextStates
Description

Gets the next valid states for the given state.

Parametersosid.id.IdstateIda state Id
Returnosid.process.StateListthe valid next States
ErrorsNOT_FOUND stateId is not found
NULL_ARGUMENT stateId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.