public interface OrderLookupSession extends OsidSession
This session defines methods for retrieving orders.
This lookup session defines several views:
OrderAdminSession.
The methods useFederatedStoreView()
and
useIsolatedStoreView()
behave as a radio group and one should be
selected before invoking any lookup methods.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupOrders()
Tests if this user can lookup orders.
|
OrderList |
getClosedOrders()
Gets all closed orders.
|
OrderList |
getOpenOrders()
Gets all submitted and not closed orders.
|
Order |
getOrder(Id orderId)
Gets the
Order specified by its Id. |
OrderList |
getOrders()
Gets all orders.
|
OrderList |
getOrdersByCustomer(Id resourceId)
Gets a list of all orders corresponding to a customer
Id. |
OrderList |
getOrdersByCustomerAndDate(Id resourceId,
DateTime from,
DateTime to)
Gets a list of all orders corresponding to a customer
Id
and date range. |
OrderList |
getOrdersByDate(DateTime from,
DateTime to)
Gets a list of all orders corresponding to a date range.
|
OrderList |
getOrdersByGenusType(Type orderGenusType)
Gets an
OrderList corresponding to the given order
genus Type which does not include orders of genus types
derived from the specified Type. |
OrderList |
getOrdersByIds(IdList orderIds)
Gets an
OrderList corresponding to the given
IdList. |
OrderList |
getOrdersByParentGenusType(Type orderGenusType)
Gets an
OrderList corresponding to the given order
genus Type and include any additional orders with genus
types derived from the specified Type. |
OrderList |
getOrdersByRecordType(Type orderRecordType)
Gets an
OrderList containing the given repository
record Type. |
OrderList |
getOrdersForProduct(Id productId)
Gets a list of all orders with an item for a product.
|
OrderList |
getOrdersForProductAndDate(Id productId,
DateTime from,
DateTime to)
Gets a list of all orders with items for a product
Id
and date range. |
Store |
getStore()
Gets the
Store associated with this session. |
Id |
getStoreId()
Gets the
Store Id associated with this
session. |
void |
useComparativeOrderView()
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 |
usePlenaryOrderView()
A complete view of the
Order returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id 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 canLookupOrders()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer these operations. false
if order lookup methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useComparativeOrderView()
mandatory
- This method is must be implemented. void usePlenaryOrderView()
Order
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. Order getOrder(Id orderId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Order
specified by its Id.
In
plenary mode, the exact Id
is found or a
NOT_FOUND
results. Otherwise, the returned Order
may have a different Id
than requested, such as
the case where a duplicate Id
was assigned to an
Order
and retained for compatibility.orderId
- the Id
of the Order
to
retrieve Order
NotFoundException
- no Order
found with
the given Id
NullArgumentException
- orderId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrderList getOrdersByIds(IdList orderIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
OrderList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
entries 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 entries may be omitted from the list and may present the
elements in any order including returning a unique set.orderIds
- the list of Ids
to retrieve Order list
NotFoundException
- an Id
was not foundNullArgumentException
- orderIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrderList getOrdersByGenusType(Type orderGenusType) throws OperationFailedException, PermissionDeniedException
OrderList
corresponding to the given order
genus Type
which does not include orders of genus types
derived from the specified Type.
In plenary mode, the
returned list contains all known orders or an error results.
Otherwise, the returned list may contain only those orders that are
accessible through this session.orderGenusType
- an order genus type Order
listNullArgumentException
- orderGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrderList getOrdersByParentGenusType(Type orderGenusType) throws OperationFailedException, PermissionDeniedException
OrderList
corresponding to the given order
genus Type
and include any additional orders with genus
types derived from the specified Type.
In plenary mode,
the returned list contains all known orders or an error results.
Otherwise, the returned list may contain only those orders that are
accessible through this session.orderGenusType
- an order genus type Order
listNullArgumentException
- orderGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrderList getOrdersByRecordType(Type orderRecordType) throws OperationFailedException, PermissionDeniedException
OrderList
containing the given repository
record Type.
In plenary mode, the returned list
contains all known orders or an error results. Otherwise, the returned
list may contain only those orders that are accessible through this
session.orderRecordType
- an order record type Order
listNullArgumentException
- orderRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrderList getOrdersByCustomer(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id.
In plenary mode, the returned list contains all known orders
or an error results. Otherwise, the returned list may contain only
those entries that are accessible through this session.resourceId
- the Id
of the customer OrderList
NullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrderList getOrdersByDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
from
- from dateto
- to date OrderList
InvalidArgumentException
- to
is less
than from
NullArgumentException
- from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrderList getOrdersByCustomerAndDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
Id
and date range. Entries are returned with submit dates that
fall between the requested dates inclusive. In plenary mode, the
returned list contains all known orders or an error results.
Otherwise, the returned list may contain only those entries that are
accessible through this session.resourceId
- the Id
of the customerfrom
- from dateto
- to date OrderList
InvalidArgumentException
- to
is less
than from
NullArgumentException
- resourceId, from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrderList getOrdersForProduct(Id productId) throws OperationFailedException, PermissionDeniedException
productId
- a product Id
OrderList
InvalidArgumentException
- to
is less
than from
NullArgumentException
- productId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrderList getOrdersForProductAndDate(Id productId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
Id
and date range. Entries are returned with submit dates that fall
between the requested dates inclusive. In plenary mode, the returned
list contains all known orders or an error results. Otherwise, the
returned list may contain only those entries that are accessible
through this session.productId
- a product Id
from
- from dateto
- to date OrderList
InvalidArgumentException
- to
is less
than from
NullArgumentException
- productId, from,
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrderList getOrders() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrderList getOpenOrders() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrderList getClosedOrders() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.