public interface StockWarehouseAssignmentSession extends OsidSession
This session provides methods to re-assign Stocks
to
Warehouse
objects A Stock
may appear in
multiple Warehouse
objects and removing the last reference
to a Stock
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 a Stock
to another
Warehouse
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignStockToWarehouse(Id stockId,
Id warehouseId)
Adds an existing
Stock to a Warehouse. |
boolean |
canAssignStocks()
Tests if this user can alter stock/warehouse mappings.
|
boolean |
canAssignStockToWarehouse(Id warehouseId)
Tests if this user can alter stock/warehouse mappings.
|
IdList |
getAssignableWarehouseIds(Id warehouseId)
Gets a list of warehouses including and under the given warehouse node
in which any stock can be assigned.
|
IdList |
getAssignableWarehouseIdsForStock(Id warehouseId,
Id stockId)
Gets a list of warehouses including and under the given warehouse node
in which a specific stock can be assigned.
|
void |
unassignStockFromWarehouse(Id stockId,
Id warehouseId)
Removes a
Stock from a Warehouse. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignStocks()
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 canAssignStockToWarehouse(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 getAssignableWarehouseIdsForStock(Id warehouseId, Id stockId) throws OperationFailedException
warehouseId
- the Id
of the Warehouse
stockId
- the Id
of the Stock
Ids
NullArgumentException
- warehouseId
or
stockId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignStockToWarehouse(Id stockId, Id warehouseId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Stock
to a Warehouse.
stockId
- the Id
of the Stock
warehouseId
- the Id
of the Warehouse
AlreadyExistsException
- stockId
is
already assigned to warehouseId
NotFoundException
- stockId
or
warehouseId
not foundNullArgumentException
- stockId
or
warehouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignStockFromWarehouse(Id stockId, Id warehouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Stock
from a Warehouse.
stockId
- the Id
of the Stock
warehouseId
- the Id
of the Warehouse
NotFoundException
- stockId
or
warehouseId
not found or stockId
not
assigned to warehouseId
NullArgumentException
- stockId
or
warehouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.