Interface PriceStoreSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to retrieve Price to
Store mappings. A Price 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:
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete result set or is an error condition
Like all OsidSessions, PriceStoreSessions are
dedicated to single processing threads and a single authenticated user.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can perform lookups of price schedule/store mappings.getPriceIdsByStore(Id storeId) Gets the list ofPriceIdsassociated with aStore.getPriceIdsByStores(IdList storeIds) Gets the list ofPrice Idscorresponding to a list ofStoreobjects.getPricesByStore(Id storeId) Gets the list ofPricesassociated with aStore.getPricesByStores(IdList storeIds) Gets the list ofPricescorresponding to a list ofStores.getStoreIdsByPrice(Id priceId) Gets the list ofStoreIdsmapped to aPrice.getStoresByPrice(Id priceId) Gets the list ofStoreobjects mapped to aPrice.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidA complete view of thePriceandStorereturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatTypes, getLocales, isAuthenticated, startTransaction, supportsTransactions
-
Method Details
-
canLookupPriceStoreMappings
boolean canLookupPriceStoreMappings()Tests if this user can perform lookups of price schedule/store mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup methods in this session will result in aPERMISSION_DENIED. This is intendedas a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif looking up mappings is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeStoreView
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. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method must be implemented.
-
usePlenaryStoreView
void usePlenaryStoreView()A complete view of thePriceandStorereturns 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.- Compliance:
mandatory- This method must be implemented.
-
getPriceIdsByStore
IdList getPriceIdsByStore(Id storeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the list ofPriceIdsassociated with aStore.- Parameters:
storeId-Idof aStore.- Returns:
- list of related price
Ids - Throws:
NotFoundException-storeIdis not foundNullArgumentException-storeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPricesByStore
PriceList getPricesByStore(Id storeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the list ofPricesassociated with aStore.- Parameters:
storeId-Idof aStore- Returns:
- list of related prices
- Throws:
NotFoundException-storeIdis not foundNullArgumentException-storeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPriceIdsByStores
IdList getPriceIdsByStores(IdList storeIds) throws OperationFailedException, PermissionDeniedException Gets the list ofPrice Idscorresponding to a list ofStoreobjects.- Parameters:
storeIds- list of storeIds- Returns:
- list of price
Ids - Throws:
NullArgumentException-storeIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPricesByStores
PriceList getPricesByStores(IdList storeIds) throws OperationFailedException, PermissionDeniedException Gets the list ofPricescorresponding to a list ofStores.- Parameters:
storeIds- list of storeIds- Returns:
- list of prices
- Throws:
NullArgumentException-storeIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getStoreIdsByPrice
IdList getStoreIdsByPrice(Id priceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the list ofStoreIdsmapped to aPrice.- Parameters:
priceId-Idof aPrice- Returns:
- list of store
Ids - Throws:
NotFoundException-priceIdis not foundNullArgumentException-priceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getStoresByPrice
StoreList getStoresByPrice(Id priceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the list ofStoreobjects mapped to aPrice.- Parameters:
priceId-Idof aPrice- Returns:
- list of stores
- Throws:
NotFoundException-priceIdis not foundNullArgumentException-priceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-