public interface AssetRepositorySession extends OsidSession
This session provides methods to retrieve Assets
to
Repository
mappings. An Asset
may appear in
multiple Repository
objects. Each Repository may have its
own authorizations governing who is allowed to look at it.
This lookup session defines two views:
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupAssetRepositoryMappings()
Tests if this user can perform lookups of asset/repository mappings.
|
IdList |
getAssetIdsByRepositories(IdList repositoryIds)
Gets the list of
Asset Ids corresponding to a list of
Repository objects. |
IdList |
getAssetIdsByRepository(Id repositoryId)
Gets the list of
Asset Ids associated
with a Repository. |
AssetList |
getAssetsByRepositories(IdList repositoryIds)
Gets the list of
Assets corresponding to a list of
Repository objects. |
AssetList |
getAssetsByRepository(Id repositoryId)
Gets the list of
Assets associated with a
Repository. |
RepositoryList |
getRepositoriesByAsset(Id assetId)
Gets the list of
Repository objects mapped to an
Asset. |
IdList |
getRepositoryIdsByAsset(Id assetId)
Gets the list of
Repository Ids mapped
to an Asset. |
void |
useComparativeRepositoryView()
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 |
usePlenaryRepositoryView()
A complete view of the
Asset and Repository
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupAssetRepositoryMappings()
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 useComparativeRepositoryView()
mandatory
- This method is must be implemented. void usePlenaryRepositoryView()
Asset
and Repository
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 getAssetIdsByRepository(Id repositoryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Asset
Ids
associated
with a Repository.
repositoryId
- Id
of the Repository
Ids
NotFoundException
- repositoryId
is not
foundNullArgumentException
- repositoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AssetList getAssetsByRepository(Id repositoryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Assets
associated with a
Repository.
repositoryId
- Id
of the Repository
NotFoundException
- repositoryId
is not
foundNullArgumentException
- repositoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getAssetIdsByRepositories(IdList repositoryIds) throws OperationFailedException, PermissionDeniedException
Asset Ids
corresponding to a list of
Repository
objects.repositoryIds
- list of repository Ids
Ids
NullArgumentException
- repositoryIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AssetList getAssetsByRepositories(IdList repositoryIds) throws OperationFailedException, PermissionDeniedException
Assets
corresponding to a list of
Repository
objects.repositoryIds
- list of repository Ids
NullArgumentException
- repositoryIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getRepositoryIdsByAsset(Id assetId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Repository
Ids
mapped
to an Asset.
assetId
- Id
of an Asset
Ids
NotFoundException
- assetId
is not foundNullArgumentException
- assetId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. RepositoryList getRepositoriesByAsset(Id assetId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Repository
objects mapped to an
Asset.
assetId
- Id
of an Asset
NotFoundException
- assetId
is not foundNullArgumentException
- assetId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.