OSID Logo
OSID Specifications
repository package
Version 3.0.0
Release Candidate Preview
Interfaceosid.repository.AssetRepositoryAssignmentSession
Implementsosid.OsidSession
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
CompliancemandatoryThis 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.IdrepositoryIdthe Id of the Repository
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT repositoryId is null
CompliancemandatoryThis 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.IdrepositoryIdthe Id of the Repository
Returnosid.id.IdListlist of assignable repository Ids
ErrorsNULL_ARGUMENT repositoryId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis 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.IdrepositoryIdthe Id of the Repository
osid.id.IdassetIdthe Id of the Asset
Returnosid.id.IdListlist of assignable repository Ids
ErrorsNULL_ARGUMENT repositoryId or assetId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignAssetToRepository
Description

Adds an existing Asset to a Repository.

Parametersosid.id.IdassetIdthe Id of the Asset
osid.id.IdrepositoryIdthe 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_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignAssetFromRepository
Description

Removes an Asset from a Repository.

Parametersosid.id.IdassetIdthe Id of the Asset
osid.id.IdrepositoryIdthe 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_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.