OSID Logo
OSID Specifications
inventory package
Version 3.0.0
Release Candidate Preview
Interfaceosid.inventory.InventoryLookupSession
Implementsosid.OsidSession
Description

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.

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete set or is an error condition
  • isolated warehouse view: All inventory methods in this session operate, retrieve and pertain to inventories defined explicitly in the current warehouse. Using an isolated view is useful for managing Inventories with the InventoryAdminSession.
  • federated warehouse view: All inventory methods in this session operate, retrieve and pertain to all inventories defined in this warehouse and any other inventories implicitly available in this warehouse through warehouse inheritence.

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.

MethodgetWarehouseId
Description

Gets the Warehouse Id associated with this session.

Returnosid.id.Idthe Warehouse Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetWarehouse
Description

Gets the Warehouse associated with this session.

Returnosid.inventory.Warehousethe warehouse
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupInventories
Description

Tests if this user can perform 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.

Returnboolean false if lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeInventoryView
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.
MethodusePlenaryInventoryView
Description

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

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedWarehouseView
Description

Federates the view for methods in this session. A federated view will include inventories in warehouses which are children of this warehouse in the warehouse hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedWarehouseView
Description

Isolates the view for methods in this session. An isolated view restricts lookups to this warehouse only.

CompliancemandatoryThis method is must be implemented.
MethodgetInventory
Description

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

Parametersosid.id.IdinventoryId Id of the Inventory
Returnosid.inventory.Inventorythe inventory
ErrorsNOT_FOUND inventoryId not found
NULL_ARGUMENT inventoryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetInventoriesByIds
Description

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

Parametersosid.id.IdListinventoryIdsthe list of Ids to retrieve
Returnosid.inventory.InventoryListthe returned Inventory list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT inventoryIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetInventoriesByGenusType
Description

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

Parametersosid.type.TypeinventoryGenusTypean inventory genus type
Returnosid.inventory.InventoryListthe returned Inventory list
ErrorsNULL_ARGUMENT inventoryGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetInventoriesByParentGenusType
Description

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

Parametersosid.type.TypeinventoryGenusTypean inventory genus type
Returnosid.inventory.InventoryListthe returned Inventory list
ErrorsNULL_ARGUMENT inventoryGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetInventoriesByRecordType
Description

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

Parametersosid.type.TypeinventoryRecordTypean inventory record type
Returnosid.inventory.InventoryListthe returned Inventory list
ErrorsNULL_ARGUMENT inventoryRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetRecentInventories
Description

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

Returnosid.inventory.InventoryListthe returned Inventory list
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetInventoriesByDate
Description

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

Parametersosid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.inventory.InventoryListthe returned Inventory list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetInventoriesForStock
Description

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

Parametersosid.id.IdstockIda stock Id
Returnosid.inventory.InventoryListthe returned Inventory list
ErrorsNULL_ARGUMENT stockId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetRecentInventoriesForStock
Description

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

Parametersosid.id.IdstockIdan inventory Id
Returnosid.inventory.InventoryListthe returned Inventory list
ErrorsNULL_ARGUMENT stockId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetInventoriesByDateForStock
Description

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

Parametersosid.id.IdstockIdan inventory Id
osid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.inventory.InventoryListthe returned Inventory list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT stockid, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetInventories
Description

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

Returnosid.inventory.InventoryLista list of Inventories
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.