OSID Logo
OSID Specifications
repository package
Version 3.1.0
Interfaceosid.repository.CompositionRepositoryAssignmentSession
Implementsosid.OsidSession
Used Byosid.repository.RepositoryManager
osid.repository.RepositoryProxyManager
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
Compliancemandatory This 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.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 composition 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.
MethodgetAssignableRepositoryIdsForComposition
Description

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

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

Adds an existing Composition to a Repository.

Parametersosid.id.IdcompositionId the Id of the Composition
osid.id.IdrepositoryId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodunassignCompositionFromRepository
Description

Removes Composition from a Repository.

Parametersosid.id.IdcompositionId the Id of the Composition
osid.id.IdrepositoryId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodreassignCompositionToRepository
Description

Moves a Composition from one Repository to another. Mappings to other Repositories are unaffected.

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