public interface AssetRepositoryAssignmentSession extends OsidSession
This session provides methods to re-assign Assets to
Repositories. An Asset may map to multiple
Repository objects and removing the last reference to an
Asset is the equivalent of deleting it. Each
Repository may have its own authorizations governing who is
allowed to operate on it.
Moving or adding a reference of an Asset to another
Repository is not a copy operation (eg: does not change its
Id ).
| Modifier and Type | Method and Description |
|---|---|
void |
assignAssetToRepository(Id assetId,
Id repositoryId)
Adds an existing
Asset to a Repository. |
boolean |
canAssignAssets()
Tests if this user can alter asset/repository mappings.
|
boolean |
canAssignAssetsToRepository(Id repositoryId)
Tests if this user can alter asset/repository mappings.
|
IdList |
getAssignableRepositoryIds(Id repositoryId)
Gets a list of repositories including and under the given repository
node in which any asset can be assigned.
|
IdList |
getAssignableRepositoryIdsForAsset(Id repositoryId,
Id assetId)
Gets a list of repositories including and under the given repository
node in which a specific asset can be assigned.
|
void |
unassignAssetFromRepository(Id assetId,
Id repositoryId)
Removes an
Asset from a Repository. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignAssets()
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 canAssignAssetsToRepository(Id repositoryId)
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.repositoryId - the Id of the Repository
false if mapping is not authorized, true
otherwiseNullArgumentException - repositoryId is
null mandatory - This method must be implemented. IdList getAssignableRepositoryIds(Id repositoryId) throws OperationFailedException
repositoryId - the Id of the Repository
Ids NullArgumentException - repositoryId is
null OperationFailedException - unable to complete requestmandatory - This method must be implemented. IdList getAssignableRepositoryIdsForAsset(Id repositoryId, Id assetId) throws OperationFailedException
repositoryId - the Id of the Repository
assetId - the Id of the Asset Ids NullArgumentException - repositoryId or
assetId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignAssetToRepository(Id assetId, Id repositoryId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Asset to a Repository. assetId - the Id of the Asset repositoryId - the Id of the Repository
AlreadyExistsException - assetId already
assigned to repositoryId NotFoundException - assetId or
repositoryId not foundNullArgumentException - assetId or
repositoryId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignAssetFromRepository(Id assetId, Id repositoryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Asset from a Repository. assetId - the Id of the Asset repositoryId - the Id of the Repository
NotFoundException - assetId or
repositoryId not found or assetId not
assigned to repositoryId NullArgumentException - assetId or
repositoryId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.