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