OSID Logo
OSID Specifications
offering package
Version 3.0.0
Release Candidate Preview
Interfaceosid.offering.CanonicalUnitLookupSession
Implementsosid.OsidSession
Description

This session defines methods for retrieving canonical units.

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 catalogue view: All canonical unit methods in this session operate, retrieve and pertain to canonical units defined explicitly in the current catalogue. Using an isolated view is useful for managing canonical units with the CanonicalUnitAdminSession.
  • federated catalogue view: All canonical unit lookup methods in this session operate, retrieve and pertain to all canonical units defined in this catalogue and any other catalogues implicitly available in this catalogue through catalogue inheritence.
  • active canonical view: All rule lookup methods return active canonicals.
  • any status canonical view: Canonicals of any active or inactive status are returned from methods.

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

MethodgetCatalogueId
Description

Gets the Catalogue Id associated with this session.

Returnosid.id.Idthe Catalogue Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetCatalogue
Description

Gets the Catalogue associated with this session.

Returnosid.offering.Cataloguethe catalogue
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupCanonicalUnits
Description

Tests if this user can examine this catalogue. 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 these operations.

Returnboolean false if catalogue reading methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeCanonicalUnitView
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.
MethodusePlenaryCanonicalUnitView
Description

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

Federates the view for methods in this session. A federated view will include canonical units in catalogues which are children of this catalogue in the catalogue hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedCatalogueView
Description

Isolates the view for methods in this session. An isolated view restricts retrievals to this catalogue only.

CompliancemandatoryThis method is must be implemented.
MethoduseActiveCanonicalUnitView
Description

Only active canonical units are returned from methods in this session.

CompliancemandatoryThis method is must be implemented.
MethoduseAnyStatusCanonicalUnitView
Description

Active and inactive canonical units are returned from methods in this session.

CompliancemandatoryThis method is must be implemented.
MethodgetCanonicalUnit
Description

Gets the CanonicalUnit specified by its Id.

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

In active mode, canonicals are returned that are currently active. In any status mode, active and inactive canonicals are returned.

Parametersosid.id.IdcanonicalUnitIdthe Id of the CanonicalUnit to retrieve
Returnosid.offering.CanonicalUnitthe returned CanonicalUnit
ErrorsNOT_FOUNDno CanonicalUnit found with the given Id
NULL_ARGUMENT canonicalUnitId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCanonicalUnitsByIds
Description

Gets a CanonicalUnitList corresponding to the given IdList.

In plenary mode, the returned list contains all of the canonical units 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 canonical units may be omitted from the list and may present the elements in any order including returning a unique set.

In active mode, canonicals are returned that are currently active. In any status mode, active and inactive canonicals are returned.

Parametersosid.id.IdListcanonicalUnitIdsthe list of Ids to retrieve
Returnosid.offering.CanonicalUnitListthe returned CanonicalUnit list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT canonicalUnitIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCanonicalUnitsByGenusType
Description

Gets a CanonicalUnitList corresponding to the given canonical unit genus Type which does not include canonical units of types derived from the specified Type.

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

In active mode, canonicals are returned that are currently active. In any status mode, active and inactive canonicals are returned.

Parametersosid.type.TypecanonicalUnitGenusTypea canonical units genus type
Returnosid.offering.CanonicalUnitListthe returned CanonicalUnit list
ErrorsNULL_ARGUMENT canonicalUnitGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCanonicalUnitsByParentGenusType
Description

Gets a CanonicalUnitList corresponding to the given canonical unit genus Type and include any additional canonical units with genus types derived from the specified Type.

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

In active mode, canonicals are returned that are currently active. In any status mode, active and inactive canonicals are returned.

Parametersosid.type.TypecanonicalUnitGenusTypea canonical unit genus type
Returnosid.offering.CanonicalUnitListthe returned CanonicalUnit list
ErrorsNULL_ARGUMENT canonicalUnitGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCanonicalUnitsByRecordType
Description

Gets a CanonicalUnitList containing the given canonical unit record Type.

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

In active mode, canonicals are returned that are currently active. In any status mode, active and inactive canonicals are returned.

Parametersosid.type.TypecanonicalUnitRecordTypea canonical unit record type
Returnosid.offering.CanonicalUnitListthe returned CanonicalUnitList
ErrorsNULL_ARGUMENT canonicalUnitRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCanonicalUnitsByCode
Description

Gets canonical units by code.

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

In active mode, canonicals are returned that are currently active. In any status mode, active and inactive canonicals are returned.

Parametersstringcodea code
Returnosid.offering.CanonicalUnitLista list of canonical units
ErrorsNULL_ARGUMENT code is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCanonicalUnits
Description

Gets all canonical units.

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

In active mode, canonicals are returned that are currently active. In any status mode, active and inactive canonicals are returned.

Returnosid.offering.CanonicalUnitLista list of canonical units
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.