public interface ModelWarehouseSession extends OsidSession
This session provides methods to retrieve Model
to
Warehouse
mappings. A Model
may appear in
multiple Warehouse
objects. Each catalog may have its own
authorizations governing who is allowed to look at it.
This lookup session defines several views:
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupModelWarehouseMappings()
Tests if this user can perform lookups of model/warehouse mappings.
|
IdList |
getModelIdsByWarehouse(Id warehouseId)
Gets the list of
Model Ids associated with a
Warehouse. |
IdList |
getModelIdsByWarehouses(IdList warehouseIds)
Gets the list of
Model Ids corresponding to a list of
Warehouse objects. |
ModelList |
getModelsByWarehouse(Id warehouseId)
Gets the list of
Models associated with a
Warehouse. |
ModelList |
getModelsByWarehouses(IdList warehouseIds)
Gets the list of
Models corresponding to a list of
Warehouse objects. |
IdList |
getWarehouseIdsByModel(Id modelId)
Gets the
Warehouse Ids mapped to a
Model. |
WarehouseList |
getWarehousesByModel(Id modelId)
Gets the
Warehouse objects mapped to a Model. |
void |
useComparativeModelWarehouseView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryModelWarehouseView()
A complete view of the
Model and Warehouse
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupModelWarehouseMappings()
PERMISSION_DENIED.
This is intended as
a hint to an application that may opt not to offer lookup operations
to unauthorized users. false
if looking up mappings is not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeModelWarehouseView()
mandatory
- This method is must be implemented. void usePlenaryModelWarehouseView()
Model
and Warehouse
returns is desired. Methods will return what is requested or
result in an error. This view is used when greater precision is
desired at the expense of interoperability.mandatory
- This method is must be implemented. IdList getModelIdsByWarehouse(Id warehouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Model Ids
associated with a
Warehouse.
warehouseId
- Id
of the Warehouse
Ids
NotFoundException
- warehouseId
is not
foundNullArgumentException
- warehouseId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ModelList getModelsByWarehouse(Id warehouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Models
associated with a
Warehouse.
warehouseId
- Id
of the Warehouse
NotFoundException
- warehouseId
is not
foundNullArgumentException
- warehouseId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getModelIdsByWarehouses(IdList warehouseIds) throws OperationFailedException, PermissionDeniedException
Model Ids
corresponding to a list of
Warehouse
objects.warehouseIds
- list of warehouse Ids
Ids
NullArgumentException
- warehouseIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ModelList getModelsByWarehouses(IdList warehouseIds) throws OperationFailedException, PermissionDeniedException
Models
corresponding to a list of
Warehouse
objects.warehouseIds
- list of warehouse Ids
NullArgumentException
- warehouseIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getWarehouseIdsByModel(Id modelId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Warehouse
Ids
mapped to a
Model.
modelId
- Id
of a Model
NotFoundException
- modelId
is not foundNullArgumentException
- modelId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. WarehouseList getWarehousesByModel(Id modelId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Warehouse
objects mapped to a Model.
modelId
- Id
of a Model
NotFoundException
- modelId
is not foundNullArgumentException
- modelId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.