public interface StockLookupSession extends OsidSession
This session defines methods for retrieving stocks.
This lookup session defines several views:
Stocks with the StockAdminSession. The methods useFederatedWarehouseView() and
useIsolatedWarehouseView() behave as a radio group and one should
be selected before invoking any lookup methods.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupStocks()
Tests if this user can perform
Stock lookups. |
Stock |
getStock(Id stockId)
Gets the
Stock specified by its Id. |
StockList |
getStocks()
Gets all
Stocks. |
StockList |
getStocksByGenusType(Type stockGenusType)
Gets a
StockList corresponding to the given stock genus
Type which does not include stocks of types derived
from the specified Type. |
StockList |
getStocksByIds(IdList stockIds)
Gets a
StockList corresponding to the given
IdList. |
StockList |
getStocksByParentGenusType(Type stockGenusType)
Gets a
StockList corresponding to the given stock genus
Type and include any additional stocks with genus types
derived from the specified Type. |
StockList |
getStocksByRecordType(Type stockRecordType)
Gets a
StockList containing the given stock record
Type. |
StockList |
getStocksBySKU(java.lang.String sku)
Gets a
StockList containing for the given SKU. |
Warehouse |
getWarehouse()
Gets the
Warehouse associated with this session. |
Id |
getWarehouseId()
Gets the
Warehouse Id associated with
this session. |
void |
useComparativeStockView()
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 |
useFederatedWarehouseView()
Federates the view for methods in this session.
|
void |
useIsolatedWarehouseView()
Isolates the view for methods in this session.
|
void |
usePlenaryStockView()
A complete view of the
Stock returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getWarehouseId()
Warehouse Id associated with
this session. Warehouse Id associated with this sessionmandatory - This method must be implemented. Warehouse getWarehouse() throws OperationFailedException, PermissionDeniedException
Warehouse associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canLookupStocks()
Stock lookups. 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 not offer lookup operations to unauthorized
users. false if lookup methods are not authorized,
true otherwisemandatory - This method must be implemented. void useComparativeStockView()
mandatory - This method is must be implemented. void usePlenaryStockView()
Stock 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 useFederatedWarehouseView()
mandatory - This method is must be implemented. void useIsolatedWarehouseView()
mandatory - This method is must be implemented. Stock getStock(Id stockId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Stock specified by its Id. In
plenary mode, the exact Id is found or a
NOT_FOUND results. Otherwise, the returned Stock
may have a different Id than requested, such as
the case where a duplicate Id was assigned to a
Stock and retained for compatibility.stockId - the Id of the Stock to
retrieve Stock NotFoundException - no Stock found with
the given Id NullArgumentException - stockId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. StockList getStocksByIds(IdList stockIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
StockList corresponding to the given
IdList. In plenary mode, the returned list contains all of the
stocks 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 Stocks may be omitted from the list and
may present the elements in any order including returning a unique
set.stockIds - the list of Ids to retrieve Stock listNotFoundException - an Id was not foundNullArgumentException - stockIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. StockList getStocksByGenusType(Type stockGenusType) throws OperationFailedException, PermissionDeniedException
StockList corresponding to the given stock genus
Type which does not include stocks of types derived
from the specified Type. In plenary mode, the returned
list contains all known stocks or an error results. Otherwise, the
returned list may contain only those stocks that are accessible
through this session.stockGenusType - a stock genus type Stock listNullArgumentException - stockGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. StockList getStocksByParentGenusType(Type stockGenusType) throws OperationFailedException, PermissionDeniedException
StockList corresponding to the given stock genus
Type and include any additional stocks with genus types
derived from the specified Type. In plenary mode, the
returned list contains all known stocks or an error results.
Otherwise, the returned list may contain only those stocks that are
accessible through this session.stockGenusType - a stock genus type Stock listNullArgumentException - stockGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. StockList getStocksByRecordType(Type stockRecordType) throws OperationFailedException, PermissionDeniedException
StockList containing the given stock record
Type. In plenary mode, the returned list contains all
known stocks or an error results. Otherwise, the returned list may
contain only those stocks that are accessible through this session.stockRecordType - a stock record type Stock listNullArgumentException - stockRecordType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. StockList getStocksBySKU(java.lang.String sku) throws OperationFailedException, PermissionDeniedException
StockList containing for the given SKU. In
plenary mode, the returned list contains all known stocks or an error
results. Otherwise, the returned list may contain only those stocks
that are accessible through this session.sku - a stock keeping unit Stock listNullArgumentException - sku is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. StockList getStocks() throws OperationFailedException, PermissionDeniedException
Stocks. In plenary mode, the returned list
contains all known stocks or an error results. Otherwise, the returned
list may contain only those stocks that are accessible through this
session. Stocks OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.