public interface ProductStoreSession extends OsidSession
This session provides methods to retrieve Product
to
Store
mappings. A Product
may appear in
multiple Stores.
Each Store
may have its own
authorizations governing who is allowed to look at it.
This lookup session defines several views:
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupProductStoreMappings()
Tests if this user can perform lookups of product/store mappings.
|
IdList |
getProductIdsByStore(Id storeId)
Gets the list of Product Ids associated with a
Store. |
IdList |
getProductIdsByStores(IdList storeIds)
Gets the list of
Product Ids corresponding to a list of
Store objects. |
ProductList |
getProductsByStore(Id storeId)
Gets the list of
Products associated with a
Store. |
ProductList |
getProductsByStores(IdList storeIds)
Gets the list of
Products corresponding to a list of
Stores. |
IdList |
getStoreIdsByProduct(Id productId)
Gets the list of
Store Ids mapped to a
Product. |
StoreList |
getStoresByProduct(Id productId)
Gets the list of
Store objects mapped to a
Product. |
void |
useComparativeStoreView()
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 |
usePlenaryStoreView()
A complete view of the
Product and Store
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupProductStoreMappings()
PERMISSION_DENIED.
This is intendedas
a hint to an application that may opt not to offer lookup operations
to unauthorized users. false
if looking up mappings is not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeStoreView()
mandatory
- This method is must be implemented. void usePlenaryStoreView()
Product
and Store
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. IdList getProductIdsByStore(Id storeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Store.
storeId
- Id
of a Store.
Ids
NotFoundException
- storeId
is not foundNullArgumentException
- storeId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ProductList getProductsByStore(Id storeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Products
associated with a
Store.
storeId
- Id
of a Store
NotFoundException
- storeId
is not foundNullArgumentException
- storeId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getProductIdsByStores(IdList storeIds) throws OperationFailedException, PermissionDeniedException
Product Ids
corresponding to a list of
Store
objects.storeIds
- list of store Ids
Ids
NullArgumentException
- storeIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ProductList getProductsByStores(IdList storeIds) throws OperationFailedException, PermissionDeniedException
Products
corresponding to a list of
Stores.
storeIds
- list of store Ids
NullArgumentException
- storeIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getStoreIdsByProduct(Id productId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Store
Ids
mapped to a
Product.
productId
- Id
of a Product
Ids
NotFoundException
- productId
is not
foundNullArgumentException
- productId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. StoreList getStoresByProduct(Id productId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Store
objects mapped to a
Product.
productId
- Id
of a Product
NotFoundException
- productId
is not
foundNullArgumentException
- productId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.