public interface InventoryLookupSession extends OsidSession
This session provides methods for retrieving Inventory
objects. The Inventory
represents a collection of items and
models.
This session defines views that offer differing behaviors when retrieving multiple objects.
Inventories
with the InventoryAdminSession.
Generally, the comparative view should be used for most applications
as it permits operation even if there is data that cannot be accessed. 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 |
canLookupInventories()
Tests if this user can perform
Inventory lookups. |
InventoryList |
getInventories()
Gets all
Inventories. |
InventoryList |
getInventoriesByDate(DateTime from,
DateTime to)
Gets
Inventories between the given date range inclusive
. |
InventoryList |
getInventoriesByDateForStock(Id stockId,
DateTime from,
DateTime to)
Gets
Inventories between the given date range inclusive
for the given stock . |
InventoryList |
getInventoriesByGenusType(Type inventoryGenusType)
Gets an
InventoryList corresponding to the given
inventory genus Type which does not include inventories
of genus types derived from the specified Type. |
InventoryList |
getInventoriesByIds(IdList inventoryIds)
Gets an
InventoryList corresponding to the given
IdList. |
InventoryList |
getInventoriesByParentGenusType(Type inventoryGenusType)
Gets an
InventoryList corresponding to the given
inventory genus Type and include any additional
inventories with genus types derived from the specified Type. |
InventoryList |
getInventoriesByRecordType(Type inventoryRecordType)
Gets an
InventoryList containing the given inventory
record Type. |
InventoryList |
getInventoriesForStock(Id stockId)
Gets all
Inventories for the given Stock. |
Inventory |
getInventory(Id inventoryId)
Gets the
Inventory specified by its Id. |
InventoryList |
getRecentInventories()
Gets the most recent
Inventories. |
InventoryList |
getRecentInventoriesForStock(Id stockId)
Gets the most recent
Inventories for with the given
Stock. |
Warehouse |
getWarehouse()
Gets the
Warehouse associated with this session. |
Id |
getWarehouseId()
Gets the
Warehouse Id associated with
this session. |
void |
useComparativeInventoryView()
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 |
usePlenaryInventoryView()
A complete view of the
Inventory returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id 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 canLookupInventories()
Inventory
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 opt not to offer lookup operations to
unauthorized users. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeInventoryView()
mandatory
- This method is must be implemented. void usePlenaryInventoryView()
Inventory
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. Inventory getInventory(Id inventoryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Inventory
specified by its Id.
In plenary mode, the exact Id
is found or a
NOT_FOUND
results. Otherwise, the returned Inventory
may have a different Id
than requested, such as
the case where a duplicate Id
was assigned to an
Inventory
and retained for compatibility.inventoryId
- Id
of the Inventory
NotFoundException
- inventoryId
not
foundNullArgumentException
- inventoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. InventoryList getInventoriesByIds(IdList inventoryIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
InventoryList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
inventories 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 Inventories
may be omitted from the list
and may present the elements in any order including returning a unique
set.inventoryIds
- the list of Ids
to retrieve Inventory
listNotFoundException
- an Id
was not foundNullArgumentException
- inventoryIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. InventoryList getInventoriesByGenusType(Type inventoryGenusType) throws OperationFailedException, PermissionDeniedException
InventoryList
corresponding to the given
inventory genus Type
which does not include inventories
of genus types derived from the specified Type.
In
plenary mode, the returned list contains all known inventories or an
error results. Otherwise, the returned list may contain only those
inventories that are accessible through this session.inventoryGenusType
- an inventory genus type Inventory
listNullArgumentException
- inventoryGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. InventoryList getInventoriesByParentGenusType(Type inventoryGenusType) throws OperationFailedException, PermissionDeniedException
InventoryList
corresponding to the given
inventory genus Type
and include any additional
inventories with genus types derived from the specified Type.
In plenary mode, the returned list contains all known
inventories or an error results. Otherwise, the returned list may
contain only those inventories that are accessible through this
session.inventoryGenusType
- an inventory genus type Inventory
listNullArgumentException
- inventoryGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. InventoryList getInventoriesByRecordType(Type inventoryRecordType) throws OperationFailedException, PermissionDeniedException
InventoryList
containing the given inventory
record Type.
In plenary mode, the returned list
contains all known inventories or an error results. Otherwise, the
returned list may contain only those inventories that are accessible
through this session.inventoryRecordType
- an inventory record type Inventory
listNullArgumentException
- inventoryRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. InventoryList getRecentInventories() throws OperationFailedException, PermissionDeniedException
Inventories.
In plenary mode, the
returned list contains all known inventories or an error results.
Otherwise, the returned list may contain only those inventories that
are accessible through this session. Inventory
listOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. InventoryList getInventoriesByDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
Inventories
between the given date range inclusive
.
In plenary mode, the returned list contains all known
inventories or an error results. Otherwise, the returned list may
contain only those inventories that are accessible through this
session.from
- starting dateto
- ending date Inventory
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. InventoryList getInventoriesForStock(Id stockId) throws OperationFailedException, PermissionDeniedException
Inventories
for the given Stock.
In plenary mode, the returned list contains all known
inventories or an error results. Otherwise, the returned list may
contain only those inventories that are accessible through this
session.stockId
- a stock Id
Inventory
listNullArgumentException
- stockId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. InventoryList getRecentInventoriesForStock(Id stockId) throws OperationFailedException, PermissionDeniedException
Inventories
for with the given
Stock.
In plenary mode, the returned list contains all
known inventories or an error results. Otherwise, the returned list
may contain only those inventories that are accessible through this
session.stockId
- an inventory Id
Inventory
listNullArgumentException
- stockId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. InventoryList getInventoriesByDateForStock(Id stockId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
Inventories
between the given date range inclusive
for the given stock .
In plenary mode, the returned
list contains all known inventories or an error results. Otherwise,
the returned list may contain only those inventories that are
accessible through this session.stockId
- an inventory Id
from
- starting dateto
- ending date Inventory
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- stockid, from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. InventoryList getInventories() throws OperationFailedException, PermissionDeniedException
Inventories.
In plenary mode, the returned
list contains all known inventories or an error results. Otherwise,
the returned list may contain only those inventories that are
accessible through this session. Inventories
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.