public interface ProductLookupSession extends OsidSession
This session provides methods for retrieving Product
objects.
This session defines views that offer differing behaviors when retrieving multiple objects.
ProductAdminSession. | Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupProducts()
Tests if this user can perform
Product lookups. |
Product |
getProduct(Id productId)
Gets the
Product specified by its Id. |
ProductList |
getProducts()
Gets all
Products. |
ProductList |
getProductsByCode(java.lang.String code)
Gets the
Product specified by its product code. |
ProductList |
getProductsByGenusType(Type productGenusType)
Gets a
ProductList corresponding to the given product
genus Type which does not include products of genus
types derived from the specified Type. |
ProductList |
getProductsByIds(IdList productIds)
Gets a
ProductList corresponding to the given
IdList. |
ProductList |
getProductsByParentGenusType(Type productGenusType)
Gets a
ProductList corresponding to the given product
genus Type and include any additional products with
genus types derived from the specified Type. |
ProductList |
getProductsByPriceSchedule(Id priceScheduleId)
Gets a
ProductList containing the given price schedule. |
ProductList |
getProductsByRecordType(Type productRecordType)
Gets a
ProductList containing the given repository
record Type. |
Store |
getStore()
Gets the
Store associated with this session. |
Id |
getStoreId()
Gets the
Store Id associated with this
session. |
void |
useComparativeProductView()
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 |
useFederatedStoreView()
Federates the view for methods in this session.
|
void |
useIsolatedStoreView()
Isolates the view for methods in this session.
|
void |
usePlenaryProductView()
A complete view of the
Product returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getStoreId()
Store Id associated with this
session. Store Id associated with this sessionmandatory - This method must be implemented. Store getStore() throws OperationFailedException, PermissionDeniedException
Store associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canLookupProducts()
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. false if lookup methods are not authorized,
true otherwisemandatory - This method must be implemented. void useComparativeProductView()
mandatory - This method is must be implemented. void usePlenaryProductView()
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.mandatory - This method is must be implemented. void useFederatedStoreView()
mandatory - This method is must be implemented. void useIsolatedStoreView()
mandatory - This method is must be implemented. Product getProduct(Id productId) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.productId - Id of the Product NotFoundException - productId not foundNullArgumentException - productId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method is must be implemented. ProductList getProductsByIds(IdList productIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.productIds - the list of Ids to retrieve Product listNotFoundException - an Id was not foundNullArgumentException - productIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ProductList getProductsByGenusType(Type productGenusType) throws OperationFailedException, PermissionDeniedException
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.productGenusType - a product genus type Product listNullArgumentException - productGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ProductList getProductsByParentGenusType(Type productGenusType) throws OperationFailedException, PermissionDeniedException
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.productGenusType - a product genus type Product listNullArgumentException - productGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ProductList getProductsByRecordType(Type productRecordType) throws OperationFailedException, PermissionDeniedException
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.productRecordType - a product record type Product listNullArgumentException - productRecordType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ProductList getProductsByCode(java.lang.String code) throws NotFoundException, OperationFailedException, PermissionDeniedException
Product specified by its product code.
code - a product codeNotFoundException - code not foundNullArgumentException - code is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method is must be implemented. ProductList getProductsByPriceSchedule(Id priceScheduleId) throws OperationFailedException, PermissionDeniedException
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.priceScheduleId - a price schedule Id NullArgumentException - priceScheduleId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method is must be implemented. ProductList getProducts() throws OperationFailedException, PermissionDeniedException
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. Products OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.