OSID Logo
OSID Specifications
ordering package
Version 3.0.0
Release Candidate Preview
Interfaceosid.ordering.ProductLookupSession
Implementsosid.OsidSession
Description

This session provides methods for retrieving Product objects.

This session defines views that offer differing behaviors when retrieving multiple objects.

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete set or is an error condition
  • isolated store view: All order methods in this session operate, retrieve and pertain to products defined explicitly in the current store. Using an isolated view is useful for managing products with the ProductAdminSession.
  • federated store view: All product lookup methods in this session operate, retrieve and pertain to all products defined in this store and any other stores implicitly available in this store through store inheritence.
MethodgetStoreId
Description

Gets the Store Id associated with this session.

Returnosid.id.Idthe Store Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetStore
Description

Gets the Store associated with this session.

Returnosid.ordering.Storethe store
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupProducts
Description

Tests if this user can perform Product 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 not offer lookup operations to unauthorized users.

Returnboolean false if lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeProductView
Description

The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryProductView
Description

A complete view of the Product 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.

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedStoreView
Description

Federates the view for methods in this session. A federated view will include products in stores which are children of this store in the store hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedStoreView
Description

Isolates the view for methods in this session. An isolated view restricts retrievals to this store only.

CompliancemandatoryThis method is must be implemented.
MethodgetProduct
Description

Gets the Product specified by its Id. In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Product may have a different Id than requested, such as the case where a duplicate Id was assigned to a Product and retained for compatibility.

Parametersosid.id.IdproductId Id of the Product
Returnosid.ordering.Productthe product
ErrorsNOT_FOUND productId not found
NULL_ARGUMENT productId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetProductsByIds
Description

Gets a ProductList corresponding to the given IdList. In plenary mode, the returned list contains all of the products 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 Products may be omitted from the list and may present the elements in any order including returning a unique set.

Parametersosid.id.IdListproductIdsthe list of Ids to retrieve
Returnosid.ordering.ProductListthe returned Product list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT productIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetProductsByGenusType
Description

Gets a ProductList corresponding to the given product genus Type which does not include products of genus types derived from the specified Type. In plenary mode, the returned list contains all known products or an error results. Otherwise, the returned list may contain only those products that are accessible through this session.

Parametersosid.type.TypeproductGenusTypea product genus type
Returnosid.ordering.ProductListthe returned Product list
ErrorsNULL_ARGUMENT productGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetProductsByParentGenusType
Description

Gets a ProductList corresponding to the given product genus Type and include any additional products with genus types derived from the specified Type. In plenary mode, the returned list contains all known products or an error results. Otherwise, the returned list may contain only those products that are accessible through this session.

Parametersosid.type.TypeproductGenusTypea product genus type
Returnosid.ordering.ProductListthe returned Product list
ErrorsNULL_ARGUMENT productGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetProductsByRecordType
Description

Gets a ProductList containing the given repository record Type. In plenary mode, the returned list contains all known products or an error results. Otherwise, the returned list may contain only those products that are accessible through this session.

Parametersosid.type.TypeproductRecordTypea product record type
Returnosid.ordering.ProductListthe returned Product list
ErrorsNULL_ARGUMENT productRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetProductsByCode
Description

Gets the Product specified by its product code.

Parametersstringcodea product code
Returnosid.ordering.ProductListthe product
ErrorsNOT_FOUND code not found
NULL_ARGUMENT code is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetProductsByPriceSchedule
Description

Gets a ProductList containing the given price schedule. In plenary mode, the returned list contains all known products or an error results. Otherwise, the returned list may contain only those products that are accessible through this session.

Parametersosid.id.IdpriceScheduleIda price schedule Id
Returnosid.ordering.ProductListthe product list
ErrorsNULL_ARGUMENT priceScheduleId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetProducts
Description

Gets all Products. In plenary mode, the returned list contains all known products or an error results. Otherwise, the returned list may contain only those products that are accessible through this session.

Returnosid.ordering.ProductLista list of Products
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.