OSID Logo
OSID Specifications
installation package
Version 3.0.0
Release Candidate Preview
Interfaceosid.installation.PackageSearchSession
Implementsosid.installation.PackageQuerySession
Description

This session provides methods for searching Package objects. The search query is constructed using the PackageQuery. The package record Type also specifies the record for the package query.

getPackagesByQuery() is the basic search method and returns a list of Packages. A more advanced search may be performed with getPackagesBySearch(). It accepts a PackageSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getPackagesBySearch() returns a PackageSearchResults that can be used to access the resulting PackageList or be used to perform a search within the result set through PackageSearch.

This session defines views that offer differing behaviors for searching.

  • federated depot view: searches include packages in depots of which this depot is a ancestor in the depot hierarchy
  • isolated depot view: searches are restricted to packages in this depot
  • normalized version view: multiple versions of the same package are suppressed
  • denormalized version vew: all versions of an installation are returned
  • normalized dependency view: supporting installations upon which other installations depend are suppressed
  • denormalized dependency view: all dependencies are returned

Packages may have a query record indicated by their respective record types. The query record is accessed via the PackageQuery.

MethodgetPackageSearch
Description

Gets a package search.

Returnosid.installation.PackageSearchthe package search
CompliancemandatoryThis method must be implemented.
MethodgetPackageSearchOrder
Description

Gets a package search order. The PackageSearchOrder is supplied to a PackageSearch to specify the ordering of results.

Returnosid.installation.PackageSearchOrderthe package search order
CompliancemandatoryThis method must be implemented.
MethodgetPackagesBySearch
Description

Gets the search results matching the given search query using the given search.

Parametersosid.installation.PackageQuerypackageQuerythe package query
osid.installation.PackageSearchpackageSearchthe package search
Returnosid.installation.PackageSearchResultsthe returned search results
ErrorsNULL_ARGUMENT packageQuery or packageSearch is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED packageSearch or packageQuery is not of this service
CompliancemandatoryThis method must be implemented.
MethodgetPackageQueryFromInspector
Description

Gets a package query from an inspector. The inspector is available from a PackageeSearchResults.

Parametersosid.installation.PackageQueryInspectorpackageQueryInspectora package query inspector
Returnosid.installation.PackageQuerythe package query
ErrorsNULL_ARGUMENT packageQueryInspector is null
UNSUPPORTED packageQueryInspector is not of this service
CompliancemandatoryThis method must be implemented.