Interface CanonicalUnitLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
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.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can examine this catalogue.getCanonicalUnit(Id canonicalUnitId) Gets theCanonicalUnitspecified by itsId.Gets all canonical units.Gets canonical units by code.getCanonicalUnitsByGenusType(Type canonicalUnitGenusType) Gets aCanonicalUnitListcorresponding to the given canonical unit genusTypewhich does not include canonical units of types derived from the specifiedType.getCanonicalUnitsByIds(IdList canonicalUnitIds) Gets aCanonicalUnitListcorresponding to the givenIdList.getCanonicalUnitsByParentGenusType(Type canonicalUnitGenusType) Gets aCanonicalUnitListcorresponding to the given canonical unit genusTypeand include any additional canonical units with genus types derived from the specifiedType.getCanonicalUnitsByRecordType(Type canonicalUnitRecordType) Gets aCanonicalUnitListcontaining the given canonical unit recordType.Gets theCatalogueassociated with this session.Gets theCatalogueIdassociated with this session.voidOnly active canonical units are returned from methods in this session.voidActive and inactive canonical units are returned from 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 theCanonicalUnitreturns 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
-
getCatalogueId
Id getCatalogueId()Gets theCatalogueIdassociated with this session.- Returns:
- the
Catalogue Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCatalogue
Gets theCatalogueassociated with this session.- Returns:
- the catalogue
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupCanonicalUnits
boolean canLookupCanonicalUnits()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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer these operations.- Returns:
falseif catalogue reading methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeCanonicalUnitView
void useComparativeCanonicalUnitView()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.
-
usePlenaryCanonicalUnitView
void usePlenaryCanonicalUnitView()A complete view of theCanonicalUnitreturns 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.
-
useFederatedCatalogueView
void useFederatedCatalogueView()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.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedCatalogueView
void useIsolatedCatalogueView()Isolates the view for methods in this session. An isolated view restricts retrievals to this catalogue only.- Compliance:
mandatory- This method is must be implemented.
-
useActiveCanonicalUnitView
void useActiveCanonicalUnitView()Only active canonical units are returned from methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyStatusCanonicalUnitView
void useAnyStatusCanonicalUnitView()Active and inactive canonical units are returned from methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getCanonicalUnit
CanonicalUnit getCanonicalUnit(Id canonicalUnitId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theCanonicalUnitspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedCanonicalUnitmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aCanonicalUnitand retained for compatibility. In active mode, canonicals are returned that are currently active. In any status mode, active and inactive canonicals are returned.- Parameters:
canonicalUnitId- theIdof theCanonicalUnitto retrieve- Returns:
- the returned
CanonicalUnit - Throws:
NotFoundException- noCanonicalUnitfound with the givenIdNullArgumentException-canonicalUnitIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCanonicalUnitsByIds
CanonicalUnitList getCanonicalUnitsByIds(IdList canonicalUnitIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aCanonicalUnitListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the canonical units 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, 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.- Parameters:
canonicalUnitIds- the list ofIdsto retrieve- Returns:
- the returned
CanonicalUnit list - Throws:
NotFoundException- anId wasnot foundNullArgumentException-canonicalUnitIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCanonicalUnitsByGenusType
CanonicalUnitList getCanonicalUnitsByGenusType(Type canonicalUnitGenusType) throws OperationFailedException, PermissionDeniedException Gets aCanonicalUnitListcorresponding to the given canonical unit genusTypewhich does not include canonical units of types derived from the specifiedType. 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.- Parameters:
canonicalUnitGenusType- a canonical units genus type- Returns:
- the returned
CanonicalUnit list - Throws:
NullArgumentException-canonicalUnitGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCanonicalUnitsByParentGenusType
CanonicalUnitList getCanonicalUnitsByParentGenusType(Type canonicalUnitGenusType) throws OperationFailedException, PermissionDeniedException Gets aCanonicalUnitListcorresponding to the given canonical unit genusTypeand include any additional canonical units with genus types derived from the specifiedType. 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.- Parameters:
canonicalUnitGenusType- a canonical unit genus type- Returns:
- the returned
CanonicalUnit list - Throws:
NullArgumentException-canonicalUnitGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCanonicalUnitsByRecordType
CanonicalUnitList getCanonicalUnitsByRecordType(Type canonicalUnitRecordType) throws OperationFailedException, PermissionDeniedException Gets aCanonicalUnitListcontaining the given canonical unit recordType. 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.- Parameters:
canonicalUnitRecordType- a canonical unit record type- Returns:
- the returned
CanonicalUnitList - Throws:
NullArgumentException-canonicalUnitRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCanonicalUnitsByCode
CanonicalUnitList getCanonicalUnitsByCode(String code) throws OperationFailedException, PermissionDeniedException 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.- Parameters:
code- a code- Returns:
- a list of canonical units
- Throws:
NullArgumentException-codeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCanonicalUnits
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.- Returns:
- a list of canonical units
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-