public interface InventoryWarehouseAssignmentSession extends OsidSession
This session provides methods to re-assign Inventories
to Warehouse
objects An Inventory
may appear
in multiple Warehouse
objects and removing the last
reference to an Inventory
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 Inventory
to another
Warehouse
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignInventoryToWarehouse(Id inventoryId,
Id warehouseId)
Adds an existing
Inventory to a Warehouse. |
boolean |
canAssignInventories()
Tests if this user can alter inventory/warehouse mappings.
|
boolean |
canAssignInventoriesToWarehouse(Id warehouseId)
Tests if this user can alter inventory/warehouse mappings.
|
IdList |
getAssignableWarehouseIds(Id warehouseId)
Gets a list of warehouses including and under the given warehouse node
in which any inventory can be assigned.
|
IdList |
getAssignableWarehouseIdsForInventory(Id warehouseId,
Id inventoryId)
Gets a list of warehouses including and under the given warehouse node
in which a specific inventory can be assigned.
|
void |
unassignInventoryFromWarehouse(Id inventoryId,
Id warehouseId)
Removes an
Inventory from a Warehouse. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignInventories()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignInventoriesToWarehouse(Id warehouseId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer lookup operations to
unauthorized users.warehouseId
- the Id
of the Warehouse
false
if mapping is not authorized, true
otherwiseNullArgumentException
- warehouseId
is
null
mandatory
- This method must be implemented. IdList getAssignableWarehouseIds(Id warehouseId) throws OperationFailedException
warehouseId
- the Id
of the Warehouse
Ids
NullArgumentException
- warehouseId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableWarehouseIdsForInventory(Id warehouseId, Id inventoryId) throws OperationFailedException
warehouseId
- the Id
of the Warehouse
inventoryId
- the Id
of the Inventory
Ids
NullArgumentException
- warehouseId
or
inventoryId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignInventoryToWarehouse(Id inventoryId, Id warehouseId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Inventory
to a Warehouse.
inventoryId
- the Id
of the Inventory
warehouseId
- the Id
of the Warehouse
AlreadyExistsException
- inventoryId
is
already assigned to warehouseId
NotFoundException
- inventoryId
or
warehouseId
not foundNullArgumentException
- inventoryId
or
warehouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignInventoryFromWarehouse(Id inventoryId, Id warehouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Inventory
from a Warehouse.
inventoryId
- the Id
of the Inventory
warehouseId
- the Id
of the Warehouse
NotFoundException
- inventoryId
or
warehouseId
not found or inventoryId
not assigned to warehouseId
NullArgumentException
- inventoryId
or
warehouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.