OSID Logo
OSID Specifications
repository package
Version 3.1.0
Interfaceosid.repository.AssetRepositoryAssignmentSession
Implementsosid.OsidSession
Used Byosid.repository.RepositoryManager
osid.repository.RepositoryProxyManager
Description

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).

MethodcanAssignAssets
Description

Tests if this user can alter asset/repository mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Returnboolean false if mapping is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanAssignAssetsToRepository
Description

Tests if this user can alter asset/repository mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Parametersosid.id.IdrepositoryId the Id of the Repository
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT repositoryId is null
Compliancemandatory This method must be implemented.
MethodgetAssignableRepositoryIds
Description

Gets a list of repositories including and under the given repository node in which any asset can be assigned.

Parametersosid.id.IdrepositoryId the Id of the Repository
Returnosid.id.IdList list of assignable repository Ids
ErrorsNULL_ARGUMENT repositoryId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetAssignableRepositoryIdsForAsset
Description

Gets a list of repositories including and under the given repository node in which a specific asset can be assigned.

Parametersosid.id.IdrepositoryId the Id of the Repository
osid.id.IdassetId the Id of the Asset
Returnosid.id.IdList list of assignable repository Ids
ErrorsNULL_ARGUMENT repositoryId or assetId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodassignAssetToRepository
Description

Adds an existing Asset to a Repository.

Parametersosid.id.IdassetId the Id of the Asset
osid.id.IdrepositoryId the Id of the Repository
ErrorsALREADY_EXISTS assetId already assigned to repositoryId
NOT_FOUND assetId or repositoryId not found
NULL_ARGUMENT assetId or repositoryId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodunassignAssetFromRepository
Description

Removes an Asset from a Repository.

Parametersosid.id.IdassetId the Id of the Asset
osid.id.IdrepositoryId the Id of the Repository
ErrorsNOT_FOUND assetId or repositoryId not found or assetId not assigned to repositoryId
NULL_ARGUMENT assetId or repositoryId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodreassignAssetToRepository
Description

Moves an Asset from one Repository to another. Mappings to other Repositories are unaffected.

Parametersosid.id.IdassetId the Id of the Asset
osid.id.IdfromRepositoryId the Id of the current Repository
osid.id.IdtoRepositoryId the Id of the destination Repository
ErrorsALREADY_EXISTS assetId already assigned to toRepositoryId
NOT_FOUND assetId, fromRepositoryId, or toRepositoryId not found or assetId not mapped to fromRepositoryId
NULL_ARGUMENT assetId, fromRepositoryId, or toRepositoryId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.