public interface OrderStoreSession extends OsidSession
This session provides methods to retrieve Order
to
Store
mappings. An Order
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 |
canLookupOrderStoreMappings()
Tests if this user can perform lookups of order/store mappings.
|
IdList |
getOrderIdsByStore(Id storeId)
Gets the list of order Ids associated with a
Store. |
IdList |
getOrderIdsByStores(IdList storeIds)
Gets the list of
Order Ids corresponding to a list of
Store objects. |
OrderList |
getOrdersByStore(Id storeId)
Gets the list of
Orders associated with a Store. |
OrderList |
getOrdersByStores(IdList storeIds)
Gets the list of
Orders corresponding to a list of
Stores. |
IdList |
getStoreIdsByOrder(Id orderId)
Gets the list of
Store Ids mapped to an
Order. |
StoreList |
getStoresByOrder(Id orderId)
Gets the list of
Store objects mapped to an
Order. |
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
Order and Store
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupOrderStoreMappings()
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()
Order
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 getOrderIdsByStore(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. OrderList getOrdersByStore(Id storeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Orders
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 getOrderIdsByStores(IdList storeIds) throws OperationFailedException, PermissionDeniedException
Order 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. OrderList getOrdersByStores(IdList storeIds) throws OperationFailedException, PermissionDeniedException
Orders
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 getStoreIdsByOrder(Id orderId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Store
Ids
mapped to an
Order.
orderId
- Id
of an Order
Ids
NotFoundException
- orderId
is not foundNullArgumentException
- orderId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. StoreList getStoresByOrder(Id orderId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Store
objects mapped to an
Order.
orderId
- Id
of an Order
Ids
NotFoundException
- orderId
is not foundNullArgumentException
- orderId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.