Interface OrderItemLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving OrderItem
objects.
This session defines views that offer differing behaviors when retrieving multiple objects.
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete set or is an error condition
- isolated store view: All order methods in this session operate,
retrieve and pertain to order items defined explicitly in the current
store. Using an isolated view is useful for managing order items with
the
OrderItemAdminSession. - federated store view: All order item lookup methods in this session operate, retrieve and pertain to all order items defined in this store and any other stores implicitly available in this store through store inheritence.
Like all OsidSessions, OrderItemLookupSessions are
dedicated to single processing threads and a single authenticated user.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performOrderItemlookups.getOrderItem(Id orderItemId) Gets theOrderItemspecified by itsId.Gets allOrderItems.getOrderItemsByGenusType(Type orderItemGenusType) Gets anOrderItemListcorresponding to the given order item genusTypewhich does not include order items of genus types derived from the specifiedType.In plenary mode, the returned list contains all known order items or an error results.getOrderItemsByIds(IdList orderItemIds) Gets anOrderItemListcorresponding to the givenIdList.getOrderItemsByParentGenusType(Type orderItemGenusType) Gets anOrderItemListcorresponding to the given order item genusTypeand include any additional order items with genus types derived from the specifiedType.In plenary mode, the returned list contains all known order items or an error results.getOrderItemsByRecordType(Type orderItemRecordType) Gets anOrderItemListcontaining the given repository recordType.getOrderItemsForOrder(Id orderId) Gets anOrderItemListfor the given order.getStore()Gets theStoreassociated with this session.Gets theStoreIdassociated with this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theOrderItemreturns 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
-
getStoreId
Id getStoreId()Gets theStoreIdassociated with this session.- Returns:
- the
Store Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getStore
Gets theStoreassociated with this session.- Returns:
- the store
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupOrderItems
boolean canLookupOrderItems()Tests if this user can performOrderItemlookups. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may not offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeOrderItemView
void useComparativeOrderItemView()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.
-
usePlenaryOrderItemView
void usePlenaryOrderItemView()A complete view of theOrderItemreturns 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.
-
useFederatedStoreView
void useFederatedStoreView()Federates the view for methods in this session. A federated view will include order items in stores which are children of this store in the store hierarchy.- Compliance:
mandatory- This method must be implemented.
-
useIsolatedStoreView
void useIsolatedStoreView()Isolates the view for methods in this session. An isolated view restricts retrievals to this store only.- Compliance:
mandatory- This method must be implemented.
-
getOrderItem
OrderItem getOrderItem(Id orderItemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theOrderItemspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedOrderItemmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anOrderItemand retained for compatibility.- Parameters:
orderItemId-Idof theOrderItem- Returns:
- the order item
- Throws:
NotFoundException-orderItemIdnot foundNullArgumentException-orderItemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getOrderItemsByIds
OrderItemList getOrderItemsByIds(IdList orderItemIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets anOrderItemListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the order items specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleOrderItemsmay be omitted from the list and may present the elements in any order including returning a unique set.- Parameters:
orderItemIds- the list ofIdsto retrieve- Returns:
- the returned
OrderItemlist - Throws:
NotFoundException- anIdwas not foundNullArgumentException-orderItemIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getOrderItemsByGenusType
OrderItemList getOrderItemsByGenusType(Type orderItemGenusType) throws OperationFailedException, PermissionDeniedException Gets anOrderItemListcorresponding to the given order item genusTypewhich does not include order items of genus types derived from the specifiedType.In plenary mode, the returned list contains all known order items or an error results. Otherwise, the returned list may contain only those order items that are accessible through this session.- Parameters:
orderItemGenusType- an order item genus type- Returns:
- the returned
OrderItemlist - Throws:
NullArgumentException-orderItemGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getOrderItemsByParentGenusType
OrderItemList getOrderItemsByParentGenusType(Type orderItemGenusType) throws OperationFailedException, PermissionDeniedException Gets anOrderItemListcorresponding to the given order item genusTypeand include any additional order items with genus types derived from the specifiedType.In plenary mode, the returned list contains all known order items or an error results. Otherwise, the returned list may contain only those order items that are accessible through this session.- Parameters:
orderItemGenusType- an order item genus type- Returns:
- the returned
OrderItemlist - Throws:
NullArgumentException-orderItemGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getOrderItemsByRecordType
OrderItemList getOrderItemsByRecordType(Type orderItemRecordType) throws OperationFailedException, PermissionDeniedException Gets anOrderItemListcontaining the given repository recordType. In plenary mode, the returned list contains all known order items or an error results. Otherwise, the returned list may contain only those order items that are accessible through this session.- Parameters:
orderItemRecordType- an order item record type- Returns:
- the returned
OrderItemlist - Throws:
NullArgumentException-orderItemRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getOrderItemsForOrder
OrderItemList getOrderItemsForOrder(Id orderId) throws OperationFailedException, PermissionDeniedException Gets anOrderItemListfor the given order. In plenary mode, the returned list contains all known order items or an error results. Otherwise, the returned list may contain only those order items that are accessible through this session.- Parameters:
orderId- anIdof anOrder- Returns:
- the returned
OrderItemList - Throws:
NullArgumentException-orderIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getOrderItems
Gets allOrderItems. In plenary mode, the returned list contains all known order items or an error results. Otherwise, the returned list may contain only those order items that are accessible through this session.- Returns:
- a list of
OrderItems - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-