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

This session provides methods to re-assign CompositionEnabler to Repository mappings. A CompositionEnabler may appear in multiple Repository objects and removing the last reference to a CompositionEnabler is the equivalent of deleting it. Each Composition may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a CompositionEnabler to another Repository is not a copy operation (eg: does not change its Id ).

MethodcanAssignCompositionEnablers
Description

Tests if this user can alter composition enabler/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 lookup operations to unauthorized users.

Returnboolean false if mapping is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanAssignCompositionEnablersToRepository
Description

Tests if this user can alter composition enabler/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 lookup 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 repository enabler can be assigned.

Parametersosid.id.IdrepositoryIdthe Id of the Repository
Returnosid.id.IdListlist of assignable composition Ids
ErrorsNULL_ARGUMENT repositoryId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignableRepositoryIdsForCompositionEnabler
Description

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

Parametersosid.id.IdrepositoryIdthe Id of the Repository
osid.id.IdcompositionEnablerIdthe Id of the CompositionEnabler
Returnosid.id.IdListlist of assignable repository Ids
ErrorsNULL_ARGUMENT repositoryId or compositionEnablerId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignCompositionEnablerToRepository
Description

Adds an existing CompositionEnabler to a Repository.

Parametersosid.id.IdcompositionEnablerIdthe Id of the CompositionEnabler
osid.id.IdrepositoryIdthe Id of the Repository
ErrorsALREADY_EXISTS compositionEnablerId is alraedy assigned to repositoryId
NOT_FOUND compositionEnablerId or repositoryId not found
NULL_ARGUMENT compositionEnablerId or repositoryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignCompositionEnablerFromRepository
Description

Removes a CompositionEnabler from a Repository.

Parametersosid.id.IdcompositionEnablerIdthe Id of the CompositionEnabler
osid.id.IdrepositoryIdthe Id of the Repository
ErrorsNOT_FOUND compositionEnablerId or repositoryId not found or compositionEnablerId not assigned to repositoryId
NULL_ARGUMENT compositionEnablerId or repositoryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignCompositionEnablerToRepository
Description

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

Parametersosid.id.IdcompositionEnablerIdthe Id of the CompositionEnabler
osid.id.IdfromRepositoryIdthe Id of the current Repository
osid.id.IdtoRepositoryIdthe Id of the destination Repository
ErrorsNOT_FOUND compositionEnablerId, fromRepositoryId, or toRepositoryId not found or compositionEnablerId not mapped to fromRepositoryId
NULL_ARGUMENT compositionEnablerId, fromRepositoryId, or toRepositoryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.