public interface CanonicalUnitLookupSession extends OsidSession
This session defines methods for retrieving canonical units.
This lookup session defines several views:
CanonicalUnitAdminSession.
The methods useFederatedCatalogueView()
and
useIsolatedCatalogueView()
behave as a radio group and one should
be selected before invoking any lookup methods.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupCanonicalUnits()
Tests if this user can examine this catalogue.
|
CanonicalUnit |
getCanonicalUnit(Id canonicalUnitId)
Gets the
CanonicalUnit specified by its Id. |
CanonicalUnitList |
getCanonicalUnits()
Gets all canonical units.
|
CanonicalUnitList |
getCanonicalUnitsByCode(java.lang.String code)
Gets canonical units by code.
|
CanonicalUnitList |
getCanonicalUnitsByGenusType(Type canonicalUnitGenusType)
Gets a
CanonicalUnitList corresponding to the given
canonical unit genus Type which does not include
canonical units of types derived from the specified Type. |
CanonicalUnitList |
getCanonicalUnitsByIds(IdList canonicalUnitIds)
Gets a
CanonicalUnitList corresponding to the given
IdList. |
CanonicalUnitList |
getCanonicalUnitsByParentGenusType(Type canonicalUnitGenusType)
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. |
CanonicalUnitList |
getCanonicalUnitsByRecordType(Type canonicalUnitRecordType)
Gets a
CanonicalUnitList containing the given canonical
unit record Type. |
Catalogue |
getCatalogue()
Gets the
Catalogue associated with this session. |
Id |
getCatalogueId()
Gets the
Catalogue Id associated with
this session. |
void |
useActiveCanonicalUnitView()
Only active canonical units are returned from methods in this session.
|
void |
useAnyStatusCanonicalUnitView()
Active and inactive canonical units are returned from methods in this
session.
|
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.
|
void |
useFederatedCatalogueView()
Federates the view for methods in this session.
|
void |
useIsolatedCatalogueView()
Isolates the view for methods in this session.
|
void |
usePlenaryCanonicalUnitView()
A complete view of the
CanonicalUnit returns is
desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getCatalogueId()
Catalogue
Id
associated with
this session. Catalogue Id
associated with this sessionmandatory
- This method must be implemented. Catalogue getCatalogue() throws OperationFailedException, PermissionDeniedException
Catalogue
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupCanonicalUnits()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer these operations. false
if catalogue reading methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useComparativeCanonicalUnitView()
mandatory
- This method is must be implemented. void usePlenaryCanonicalUnitView()
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.mandatory
- This method is must be implemented. void useFederatedCatalogueView()
mandatory
- This method is must be implemented. void useIsolatedCatalogueView()
mandatory
- This method is must be implemented. void useActiveCanonicalUnitView()
mandatory
- This method is must be implemented. void useAnyStatusCanonicalUnitView()
mandatory
- This method is must be implemented. CanonicalUnit getCanonicalUnit(Id canonicalUnitId) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.canonicalUnitId
- the Id
of the
CanonicalUnit
to retrieve CanonicalUnit
NotFoundException
- no CanonicalUnit
found with the given Id
NullArgumentException
- canonicalUnitId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CanonicalUnitList getCanonicalUnitsByIds(IdList canonicalUnitIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.canonicalUnitIds
- the list of Ids
to retrieve CanonicalUnit list
NotFoundException
- an Id was
not foundNullArgumentException
- canonicalUnitIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CanonicalUnitList getCanonicalUnitsByGenusType(Type canonicalUnitGenusType) throws OperationFailedException, PermissionDeniedException
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.canonicalUnitGenusType
- a canonical units genus type CanonicalUnit list
NullArgumentException
- canonicalUnitGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CanonicalUnitList getCanonicalUnitsByParentGenusType(Type canonicalUnitGenusType) throws OperationFailedException, PermissionDeniedException
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.canonicalUnitGenusType
- a canonical unit genus type CanonicalUnit list
NullArgumentException
- canonicalUnitGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CanonicalUnitList getCanonicalUnitsByRecordType(Type canonicalUnitRecordType) throws OperationFailedException, PermissionDeniedException
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.canonicalUnitRecordType
- a canonical unit record type CanonicalUnitList
NullArgumentException
- canonicalUnitRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CanonicalUnitList getCanonicalUnitsByCode(java.lang.String code) throws OperationFailedException, PermissionDeniedException
code
- a codeNullArgumentException
- code
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CanonicalUnitList getCanonicalUnits() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.