Interface MyOrderSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
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.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can lookup orders.Gets all closed orders for the customer related to this agent.Gets all submitted and not closed orders for the customer related to this agent.Gets all orders for the subscriber related to the current agent.getStore()Gets theStoreassociated with this session.Gets theStoreIdassociated with this session.Gets all orders not yet submitted for the customer related to this agent.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 theOrderreturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
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.
-
canLookupMyOrders
boolean canLookupMyOrders()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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer these operations.- Returns:
falseif order lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeOrderView
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. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryOrderView
void usePlenaryOrderView()A complete view of theOrderreturns 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 is must be implemented.
-
useFederatedStoreView
void useFederatedStoreView()Federates the view for methods in this session. A federated view will include entries in stores which are children of this store in the store hierarchy.- Compliance:
mandatory- This method is 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 is must be implemented.
-
getOrders
Gets all orders for the subscriber related to the current agent. 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. In both cases, the order of the set is not specifed.- Returns:
- a list of orders
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getUnsubmittedOrders
Gets all orders not yet submitted for the customer related to this agent. 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. In both cases, the order of the set is not specifed.- Returns:
- a list of orders
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getOpenOrders
Gets all submitted and not closed orders for the customer related to this agent. 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. In both cases, the order of the set is not specifed.- Returns:
- a list of orders
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getClosedOrders
Gets all closed orders for the customer related to this agent. 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. In both cases, the order of the set is not specifed.- Returns:
- a list of orders
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-