OSID Logo
OSID Specifications
ordering package
Version 3.0.0
Release Candidate Preview
Interfaceosid.ordering.OrderLookupSession
Implementsosid.OsidSession
Description

This session defines methods for retrieving orders.

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
  • isolated store view: All order methods in this session operate, retrieve and pertain to orders defined explicitly in the current store. Using an isolated view is useful for managing orders with the OrderAdminSession.
  • federated store view: All order lookup methods in this session operate, retrieve and pertain to all orders defined in this store and any other stores implicitly available in this store through store inheritence.

The methods useFederatedStoreView() and useIsolatedStoreView() behave as a radio group and one should be selected before invoking any lookup methods.

MethodgetStoreId
Description

Gets the Store Id associated with this session.

Returnosid.id.Idthe Store Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetStore
Description

Gets the Store associated with this session.

Returnosid.ordering.Storethe store
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupOrders
Description

Tests if this user can lookup orders. 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 opt not to offer these operations.

Returnboolean false if order lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeOrderView
Description

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.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryOrderView
Description

A complete view of the 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.

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedStoreView
Description

Federates the view for methods in this session. A federated view will include orders in stores which are children of this store in the store hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedStoreView
Description

Isolates the view for methods in this session. An isolated view restricts retrievals to this store only.

CompliancemandatoryThis method is must be implemented.
MethodgetOrder
Description

Gets the 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.

Parametersosid.id.IdorderIdthe Id of the Order to retrieve
Returnosid.ordering.Orderthe returned Order
ErrorsNOT_FOUNDno Order found with the given Id
NULL_ARGUMENT orderId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetOrdersByIds
Description

Gets an 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.

Parametersosid.id.IdListorderIdsthe list of Ids to retrieve
Returnosid.ordering.OrderListthe returned Order list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT orderIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetOrdersByGenusType
Description

Gets an 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.

Parametersosid.type.TypeorderGenusTypean order genus type
Returnosid.ordering.OrderListthe returned Order list
ErrorsNULL_ARGUMENT orderGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetOrdersByParentGenusType
Description

Gets an 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.

Parametersosid.type.TypeorderGenusTypean order genus type
Returnosid.ordering.OrderListthe returned Order list
ErrorsNULL_ARGUMENT orderGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetOrdersByRecordType
Description

Gets an 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.

Parametersosid.type.TypeorderRecordTypean order record type
Returnosid.ordering.OrderListthe returned Order list
ErrorsNULL_ARGUMENT orderRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetOrdersByCustomer
Description

Gets a list of all orders corresponding to a customer 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.

Parametersosid.id.IdresourceIdthe Id of the customer
Returnosid.ordering.OrderListthe returned OrderList
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetOrdersByDate
Description

Gets a list of all orders corresponding to a date range. Entries are returned with a submitted date that falsl 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.

Parametersosid.calendaring.DateTimefromfrom date
osid.calendaring.DateTimetoto date
Returnosid.ordering.OrderListthe returned OrderList
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetOrdersByCustomerAndDate
Description

Gets a list of all orders corresponding to a customer 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.

Parametersosid.id.IdresourceIdthe Id of the customer
osid.calendaring.DateTimefromfrom date
osid.calendaring.DateTimetoto date
Returnosid.ordering.OrderListthe returned OrderList
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT resourceId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetOrdersForProduct
Description

Gets a list of all orders with an item for a product. 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.

Parametersosid.id.IdproductIda product Id
Returnosid.ordering.OrderListthe returned OrderList
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT productId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetOrdersForProductAndDate
Description

Gets a list of all orders with items for a product 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.

Parametersosid.id.IdproductIda product Id
osid.calendaring.DateTimefromfrom date
osid.calendaring.DateTimetoto date
Returnosid.ordering.OrderListthe returned OrderList
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT productId, from, or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetOrders
Description

Gets all orders. In plenary mode, the returned list contains all known entries or an error results. Otherwise, the returned list may contain only those entries that are accessible through this session.

Returnosid.ordering.OrderLista list of orders
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetOpenOrders
Description

Gets all submitted and not closed orders. In plenary mode, the returned list contains all known entries or an error results. Otherwise, the returned list may contain only those entries that are accessible through this session.

Returnosid.ordering.OrderLista list of orders
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetClosedOrders
Description

Gets all closed orders. In plenary mode, the returned list contains all known entries or an error results. Otherwise, the returned list may contain only those entries that are accessible through this session.

Returnosid.ordering.OrderLista list of orders
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.