public interface ModelLookupSession extends OsidSession
This session defines methods for retrieving models.
This lookup session defines several views:
Models
with the ModelAdminSession.
The methods useFederatedWarehouseView()
and
useIsolatedWarehouseView()
behave as a radio group and one should
be selected before invoking any lookup methods.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupModels()
Tests if this user can perform
Model lookups. |
Model |
getModel(Id modelId)
Gets the
Model specified by its Id. |
ModelList |
getModels()
Gets all
Models. |
ModelList |
getModelsByGenusType(Type modelGenusType)
Gets a
ModelList corresponding to the given model genus
Type which does not include models of types derived
from the specified Type. |
ModelList |
getModelsByIds(IdList modelIds)
Gets a
ModelList corresponding to the given
IdList. |
ModelList |
getModelsByManufacturer(Id resourceId)
Gets a
ModelList for the given resource Id. |
ModelList |
getModelsByParentGenusType(Type modelGenusType)
Gets a
ModelList corresponding to the given model genus
Type and include any additional models with genus types
derived from the specified Type. |
ModelList |
getModelsByRecordType(Type modelRecordType)
Gets a
ModelList containing the given model record
Type. |
Warehouse |
getWarehouse()
Gets the
Warehouse associated with this session. |
Id |
getWarehouseId()
Gets the
Warehouse Id associated with
this session. |
void |
useComparativeModelView()
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 |
useFederatedWarehouseView()
Federates the view for methods in this session.
|
void |
useIsolatedWarehouseView()
Isolates the view for methods in this session.
|
void |
usePlenaryModelView()
A complete view of the
Model returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getWarehouseId()
Warehouse
Id
associated with
this session. Warehouse Id
associated with this sessionmandatory
- This method must be implemented. Warehouse getWarehouse() throws OperationFailedException, PermissionDeniedException
Warehouse
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupModels()
Model
lookups. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known all methods in this session will result in
a PERMISSION_DENIED.
This is intended as a hint to an
application that may not offer lookup operations to unauthorized
users. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeModelView()
mandatory
- This method is must be implemented. void usePlenaryModelView()
Model
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. void useFederatedWarehouseView()
mandatory
- This method is must be implemented. void useIsolatedWarehouseView()
mandatory
- This method is must be implemented. Model getModel(Id modelId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Model
specified by its Id.
In
plenary mode, the exact Id
is found or a
NOT_FOUND
results. Otherwise, the returned Model
may have a different Id
than requested, such as
the case where a duplicate Id
was assigned to a
Model
and retained for compatibility.modelId
- the Id
of the Model
to
retrieve Model
NotFoundException
- no Model
found with
the given Id
NullArgumentException
- modelId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ModelList getModelsByIds(IdList modelIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
ModelList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
models specified in the Id
list, in the order of the
list, including duplicates, or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible Models
may be omitted from the list and
may present the elements in any order including returning a unique
set.modelIds
- the list of Ids
to retrieve Model
listNotFoundException
- an Id
was not foundNullArgumentException
- modelIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ModelList getModelsByGenusType(Type modelGenusType) throws OperationFailedException, PermissionDeniedException
ModelList
corresponding to the given model genus
Type
which does not include models of types derived
from the specified Type.
In plenary mode, the returned
list contains all known models or an error results. Otherwise, the
returned list may contain only those models that are accessible
through this session.modelGenusType
- a model genus type Model
listNullArgumentException
- modelGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ModelList getModelsByParentGenusType(Type modelGenusType) throws OperationFailedException, PermissionDeniedException
ModelList
corresponding to the given model genus
Type
and include any additional models with genus types
derived from the specified Type.
In plenary mode, the
returned list contains all known models or an error results.
Otherwise, the returned list may contain only those models that are
accessible through this session.modelGenusType
- a model genus type Model
listNullArgumentException
- modelGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ModelList getModelsByRecordType(Type modelRecordType) throws OperationFailedException, PermissionDeniedException
ModelList
containing the given model record
Type.
In plenary mode, the returned list contains all
known models or an error results. Otherwise, the returned list may
contain only those models that are accessible through this session.modelRecordType
- a model record type Model
listNullArgumentException
- modelRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ModelList getModelsByManufacturer(Id resourceId) throws OperationFailedException, PermissionDeniedException
ModelList
for the given resource Id.
In plenary mode, the returned list contains all known models
or an error results. Otherwise, the returned list may contain only
those models that are accessible through this session.resourceId
- a resource Id
Model
listNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ModelList getModels() throws OperationFailedException, PermissionDeniedException
Models.
In plenary mode, the returned list
contains all known models or an error results. Otherwise, the returned
list may contain only those models that are accessible through this
session. Models
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.