OSID Logo
OSID Specifications
repository package
Version 3.0.0
Release Candidate Preview
Interfaceosid.repository.CompositionRepositoryAssignmentSession
Implementsosid.OsidSession
Description

This session provides methods to re-assign Compositions to Repository objects. A Composition may be associated with multiple Repository objects. Removing the last reference to a Composition 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 a Composition to another Repository is not a copy operation (eg: does not change its Id ).

MethodcanAssignCompositions
Description

Tests if this user can alter composition/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.
MethodcanAssignCompositionsToRepository
Description

Tests if this user can alter composition/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 composition 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.
MethodgetAssignableRepositoryIdsForComposition
Description

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

Parametersosid.id.IdrepositoryIdthe Id of the Repository
osid.id.IdcompositionIdthe Id of the Composition
Returnosid.id.IdListlist of assignable repository Ids
ErrorsNULL_ARGUMENT repositoryId or compositionId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignCompositionToRepository
Description

Adds an existing Composition to a Repository.

Parametersosid.id.IdcompositionIdthe Id of the Composition
osid.id.IdrepositoryIdthe Id of the Repository
ErrorsALREADY_EXISTS compositionId already assigned to repositoryId
NOT_FOUND compositionId or repositoryId not found
NULL_ARGUMENT compositionId or repositoryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignCompositionFromRepository
Description

Removes Composition from a Repository.

Parametersosid.id.IdcompositionIdthe Id of the Composition
osid.id.IdrepositoryIdthe Id of the Repository
ErrorsNOT_FOUND compositionId or repositoryId not found or compositionId not assigned to repositoryId
NULL_ARGUMENT compositionId or repositoryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.