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

This session provides methods to re-assign Items to Warehouse objects An Item may appear in multiple Warehouse objects and removing the last reference to an Item is the equivalent of deleting it. Each Warehouse may have its own authorizations governing who is allowed to operate on it.

Adding a reference of an Item to another Warehouse is not a copy operation (eg: does not change its Id ).

MethodcanAssignItems
Description

Tests if this user can alter item/warehouse mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.

Returnboolean false if mapping is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanAssignItemToWarehouse
Description

Tests if this user can alter item/warehouse mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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.

Parametersosid.id.IdwarehouseIdthe Id of the Warehouse
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT warehouseId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignableWarehouseIds
Description

Gets a list of warehouses including and under the given warehouse node in which any item can be assigned.

Parametersosid.id.IdwarehouseIdthe Id of the Warehouse
Returnosid.id.IdListlist of assignable warehouse Ids
ErrorsNULL_ARGUMENT warehouseId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignableWarehouseIdsForItem
Description

Gets a list of warehouses including and under the given warehouse node in which a specific item can be assigned.

Parametersosid.id.IdwarehouseIdthe Id of the Warehouse
osid.id.IditemIdthe Id of the Item
Returnosid.id.IdListlist of assignable warehouse Ids
ErrorsNULL_ARGUMENT warehouseId or itemId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignItemToWarehouse
Description

Adds an existing Item to a Warehouse.

Parametersosid.id.IditemIdthe Id of the Item
osid.id.IdwarehouseIdthe Id of the Warehouse
ErrorsALREADY_EXISTS itemId is already assigned to warehouseId
NOT_FOUND itemId or warehouseId not found
NULL_ARGUMENT itemId or warehouseId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignItemFromWarehouse
Description

Removes an Item from a Warehouse.

Parametersosid.id.IditemIdthe Id of the Item
osid.id.IdwarehouseIdthe Id of the Warehouse
ErrorsNOT_FOUND itemId or warehouseId not found or itemId not assigned warehouseId
NULL_ARGUMENT itemId or warehouseId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.