public interface CatalogSession extends OsidSession
This session provides methods to retrieve Id to
Catalog mappings. An Id may appear in multiple Catalogs.
Each Catalog may have its own authorizations as to
who is allowed to look at it.
This lookup session defines several views:
Catalog and any descendant catalogs in the Catalog
hierarchy
Catalog only Generally, the comparative view should be used for most applications as it permits operation even if there a particular element is inaccessible. For example, a hierarchy output can be plugged into a lookup method to retrieve all objects known to a hierarchy, but it may not be necessary to break execution if a node from the hierarchy no longer exists. However, some administrative applications may need to know whether it had retrieved an entire set of objects and may sacrifice some interoperability for the sake of precision.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupMappings()
Tests if this user can perform lookups of
Id to
Catalog mappings. |
IdList |
getCatalogIdsById(Id id)
Gets the
Catalog Ids mapped to an Id. |
CatalogList |
getCatalogsById(Id id)
Gets the
Catalogs mapped to an Id. |
IdList |
getIdsByCatalog(Id catalogId)
Gets the list of
Ids map to a Catalog. |
IdList |
getIdsByCatalogs(IdList catalogIds)
Gets the list of
Ids map to a lst of Catalogs. |
void |
useComparativeCatalogView()
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 |
useFederatedCatalogView()
Federates the view for methods in this session.
|
void |
useIsolatedCatalogView()
Isolates the view for methods in this session.
|
void |
usePlenaryCatalogView()
A complete view of the
Id and Catalog
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canLookupMappings()
Id to
Catalog 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 a
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 useComparativeCatalogView()
mandatory - This method is must be implemented. void usePlenaryCatalogView()
Id and Catalog
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. void useFederatedCatalogView()
mandatory - This method is must be implemented. void useIsolatedCatalogView()
mandatory - This method is must be implemented. IdList getIdsByCatalog(Id catalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids map to a Catalog. catalogId - a catalog Id Ids mapped to the given
catalogId NotFoundException - catalogId is not
foundNullArgumentException - catalogId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. IdList getIdsByCatalogs(IdList catalogIds) throws OperationFailedException, PermissionDeniedException
Ids map to a lst of Catalogs.
catalogIds - an Id Id NullArgumentException - catalogIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. IdList getCatalogIdsById(Id id) throws OperationFailedException, PermissionDeniedException
Catalog Ids mapped to an Id. id - an Id Ids containing the given
Id NullArgumentException - id is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CatalogList getCatalogsById(Id id) throws OperationFailedException, PermissionDeniedException
Catalogs mapped to an Id. id - an Id Id NullArgumentException - id is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.