public interface PackageLookupSession extends OsidSession
This session provides methods for retrieving Package
s
from remote Depots.
This session defines views that offer differing behaviors when retrieving multiple objects.
PackageAdminSession.
Packages may have an additional records indicated by their respective
record types. The record may not be accessed through a cast of the
Package.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupPackages()
Tests if this user can perform
Package lookups. |
PackageList |
getDependentPackages(Id packageId)
Gets a list of packages depending on the given package.
|
Depot |
getDepot()
Gets the
Depot associated with this session. |
Id |
getDepotId()
Gets the
Depot Id associated with this
session. |
Package |
getPackage(Id packageId)
Gets the
Package specified by its Id. |
PackageList |
getPackages()
Gets all
Packages. |
PackageList |
getPackagesByGenusType(Type packageGenusType)
Gets a
PackageList corresponding to the given package
genus Type which does not include packages of genus
types derived from the specified Type. |
PackageList |
getPackagesByIds(IdList packageIds)
Gets a
PackageList corresponding to the given
IdList. |
PackageList |
getPackagesByParentGenusType(Type packageGenusType)
Gets a
PackageList corresponding to the given package
genus Type and include any additional package with
genus types derived from the specified Type. |
PackageList |
getPackagesByProvider(Id resourceId)
Gets a
PackageList for the given provider. |
PackageList |
getPackagesByRecordType(Type packageRecordType)
Gets a
PackageList containing the given package record
Type. |
PackageList |
getPackageVersions(Id packageId)
Gets a list of packages in the specified package version chain.
|
void |
useComparativePackageView()
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 |
useDenormalizedVersionView()
All versions of the same package are returned.
|
void |
useFederatedDepotView()
Federates the view for methods in this session.
|
void |
useIsolatedDepotView()
Isolates the view for methods in this session.
|
void |
useNormalizedVersionView()
The returns from the lookup methods may omit multiple versions of the
same package.
|
void |
usePlenaryPackageView()
A complete view of the
Package returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getDepotId()
Depot
Id
associated with this
session. Depot Id
associated with this sessionmandatory
- This method must be implemented. Depot getDepot() throws OperationFailedException, PermissionDeniedException
Depot
associated with this session. Depot
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupPackages()
Package
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 useComparativePackageView()
mandatory
- This method is must be implemented. void usePlenaryPackageView()
Package
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 useFederatedDepotView()
mandatory
- This method is must be implemented. void useIsolatedDepotView()
mandatory
- This method is must be implemented. void useNormalizedVersionView()
mandatory
- This method is must be implemented. void useDenormalizedVersionView()
mandatory
- This method is must be implemented. Package getPackage(Id packageId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Package
specified by its Id.
In
plenary mode, the exact Id
is found or a
NOT_FOUND
results. Otherwise, the returned Package
may have a different Id
than requested, such as
the case where a duplicate Id
was assigned to a
Package
and retained for compatibility.packageId
- Id
of the Package
NotFoundException
- packageId
not foundNullArgumentException
- packageId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. PackageList getPackagesByIds(IdList packageIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
PackageList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
packages 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 Packages
may be omitted from the list and
may present the elements in any order including returning a unique
set.packageIds
- the list of Ids
to retrieve Package
listNotFoundException
- an Id
was not foundNullArgumentException
- packageIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PackageList getPackagesByGenusType(Type packageGenusType) throws OperationFailedException, PermissionDeniedException
PackageList
corresponding to the given package
genus Type
which does not include packages of genus
types derived from the specified Type.
In plenary mode,
the returned list contains all known packages or an error results.
Otherwise, the returned list may contain only those packages that are
accessible through this session.packageGenusType
- a package genus type Package
listNullArgumentException
- packageGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PackageList getPackagesByParentGenusType(Type packageGenusType) throws OperationFailedException, PermissionDeniedException
PackageList
corresponding to the given package
genus Type
and include any additional package with
genus types derived from the specified Type.
In plenary
mode, the returned list contains all known packages or an error
results. Otherwise, the returned list may contain only those packages
that are accessible through this session.packageGenusType
- a package genus type Package
listNullArgumentException
- packageGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PackageList getPackagesByRecordType(Type packageRecordType) throws OperationFailedException, PermissionDeniedException
PackageList
containing the given package record
Type.
In plenary mode, the returned list contains all
known packages or an error results. Otherwise, the returned list may
contain only those packages that are accessible through this session.packageRecordType
- a package record type Package
listNullArgumentException
- packageRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PackageList getPackagesByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException
PackageList
for the given provider. In plenary
mode, the returned list contains all known packages or an error
results. Otherwise, the returned list may contain only those packages
that are accessible through this session.resourceId
- a resource Id
Package
listNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PackageList getDependentPackages(Id packageId) throws NotFoundException, OperationFailedException, PermissionDeniedException
packageId
- an Id
of a Package
NotFoundException
- packageId
is not
foundNullArgumentException
- packageId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PackageList getPackageVersions(Id packageId) throws NotFoundException, OperationFailedException, PermissionDeniedException
packageId
- an Id
of a Package
NotFoundException
- packageId
is not
foundNullArgumentException
- packageId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PackageList getPackages() throws OperationFailedException, PermissionDeniedException
Packages.
In plenary mode, the returned list
contains all known packages or an error results. Otherwise, the
returned list may contain only those packages that are accessible
through this session. PackageList
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.