public interface ItemWarehouseAssignmentSession extends OsidSession
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
).
Modifier and Type | Method and Description |
---|---|
void |
assignItemToWarehouse(Id itemId,
Id warehouseId)
Adds an existing
Item to a Warehouse. |
boolean |
canAssignItems()
Tests if this user can alter item/warehouse mappings.
|
boolean |
canAssignItemToWarehouse(Id warehouseId)
Tests if this user can alter item/warehouse mappings.
|
IdList |
getAssignableWarehouseIds(Id warehouseId)
Gets a list of warehouses including and under the given warehouse node
in which any item can be assigned.
|
IdList |
getAssignableWarehouseIdsForItem(Id warehouseId,
Id itemId)
Gets a list of warehouses including and under the given warehouse node
in which a specific item can be assigned.
|
void |
unassignItemFromWarehouse(Id itemId,
Id warehouseId)
Removes an
Item from a Warehouse. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignItems()
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 canAssignItemToWarehouse(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 getAssignableWarehouseIdsForItem(Id warehouseId, Id itemId) throws OperationFailedException
warehouseId
- the Id
of the Warehouse
itemId
- the Id
of the Item
Ids
NullArgumentException
- warehouseId
or
itemId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignItemToWarehouse(Id itemId, Id warehouseId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Item
to a Warehouse.
itemId
- the Id
of the Item
warehouseId
- the Id
of the Warehouse
AlreadyExistsException
- itemId
is
already assigned to warehouseId
NotFoundException
- itemId
or
warehouseId
not foundNullArgumentException
- itemId
or
warehouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignItemFromWarehouse(Id itemId, Id warehouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Item
from a Warehouse.
itemId
- the Id
of the Item
warehouseId
- the Id
of the Warehouse
NotFoundException
- itemId
or
warehouseId
not found or itemId
not
assigned warehouseId
NullArgumentException
- itemId
or
warehouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.