public interface DepotLookupSession extends OsidSession
This session provides methods for retrieving Depot
objects. The Depot
represents a collection of
Packages.
This session defines views that offer differing behaviors when retrieving multiple objects.
Generally, the comparative view should be used for most applications
as it permits operation even if there is data that cannot be accessed. For
example, a browsing application may only need to examine the Depots
it can access, without breaking execution. However, an
administrative application may require all Depot
elements
to be available.
Depots may have an additional records indicated by their respective
record types. The record may not be accessed through a cast of the
Depot.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupDepots()
Tests if this user can perform
Depot lookups. |
Depot |
getDepot(Id depotId)
Gets the
Depot specified by its Id. |
DepotList |
getDepots()
Gets all
Depots. |
DepotList |
getDepotsByGenusType(Type depotGenusType)
Gets a
DepotList corresponding to the given depot genus
Type which does not include depots of types derived
from the specified Type. |
DepotList |
getDepotsByIds(IdList depotIds)
Gets a
DepotList corresponding to the given
IdList. |
DepotList |
getDepotsByParentGenusType(Type depotGenusType)
Gets a
DepotList corresponding to the given depot genus
Type and include any additional depots with genus types
derived from the specified Type. |
DepotList |
getDepotsByProvider(Id resourceId)
Gets a
DepotList for the given provider . |
DepotList |
getDepotsByRecordType(Type depotRecordType)
Gets a
DepotList containing the given depot record
Type. |
void |
useComparativeDepotView()
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 |
usePlenaryDepotView()
A complete view of the
Depot returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupDepots()
Depot
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 to
unauthorized users. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeDepotView()
mandatory
- This method is must be implemented. void usePlenaryDepotView()
Depot
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. Depot getDepot(Id depotId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Depot
specified by its Id.
In
plenary mode, the exact Id
is found or a
NOT_FOUND
results. Otherwise, the returned Depot
may have a different Id
than requested, such as
the case where a duplicate Id
was assigned to a
Depot
and retained for compatility.depotId
- Id
of the Depot
NotFoundException
- depotId
not foundNullArgumentException
- depotId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. DepotList getDepotsByIds(IdList depotIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
DepotList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
depots 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 Depot
objects may be omitted from the list
and may present the elements in any order including returning a unique
set.depotIds
- the list of Ids
to retrieve Depot
listNotFoundException
- an Id was
not foundNullArgumentException
- depotIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DepotList getDepotsByGenusType(Type depotGenusType) throws OperationFailedException, PermissionDeniedException
DepotList
corresponding to the given depot genus
Type
which does not include depots of types derived
from the specified Type.
In plenary mode, the returned
list contains all known depots or an error results. Otherwise, the
returned list may contain only those depots that are accessible
through this session.depotGenusType
- a depot genus type Depot
listNullArgumentException
- depotGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DepotList getDepotsByParentGenusType(Type depotGenusType) throws OperationFailedException, PermissionDeniedException
DepotList
corresponding to the given depot genus
Type
and include any additional depots with genus types
derived from the specified Type.
In plenary mode, the
returned list contains all known depots or an error results.
Otherwise, the returned list may contain only those depots that are
accessible through this session.depotGenusType
- a depot genus type Depot
listNullArgumentException
- depotGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DepotList getDepotsByRecordType(Type depotRecordType) throws OperationFailedException, PermissionDeniedException
DepotList
containing the given depot record
Type.
In plenary mode, the returned list contains all
known depots or an error results. Otherwise, the returned list may
contain only those depots that are accessible through this session.depotRecordType
- a depot record type Depot
listNullArgumentException
- depotRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DepotList getDepotsByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException
DepotList
for the given provider .
In plenary mode, the returned list contains all known depots
or an error results. Otherwise, the returned list may contain only
those depots that are accessible through this session.resourceId
- a resource Id
Depot
listNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DepotList getDepots() throws OperationFailedException, PermissionDeniedException
Depots.
In plenary mode, the returned list
contains all known depots or an error results. Otherwise, the returned
list may contain only those depots that are accessible through this
session. DepotList
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.