Interface CompositionEnablerRepositoryAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
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 ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignCompositionEnablerToRepository(Id compositionEnablerId, Id repositoryId) Adds an existingCompositionEnablerto aRepository.booleanTests if this user can alter composition enabler/repository mappings.booleancanAssignCompositionEnablersToRepository(Id repositoryId) Tests if this user can alter composition enabler/repository mappings.getAssignableRepositoryIds(Id repositoryId) Gets a list of repositories including and under the given repository node in which any repository enabler can be assigned.getAssignableRepositoryIdsForCompositionEnabler(Id repositoryId, Id compositionEnablerId) Gets a list of repositories including and under the given repository node in which a specific repository enabler can be assigned.voidreassignCompositionEnablerToRepository(Id compositionEnablerId, Id fromRepositoryId, Id toRepositoryId) Moves aCompositionEnablerfrom oneRepositoryto another.voidunassignCompositionEnablerFromRepository(Id compositionEnablerId, Id repositoryId) Removes aCompositionEnablerfrom aRepository.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignCompositionEnablers
boolean canAssignCompositionEnablers()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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignCompositionEnablersToRepository
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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Parameters:
repositoryId- theIdof theRepository- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-repositoryIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableRepositoryIds
Gets a list of repositories including and under the given repository node in which any repository enabler can be assigned.- Parameters:
repositoryId- theIdof theRepository- Returns:
- list of assignable composition
Ids - Throws:
NullArgumentException-repositoryIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableRepositoryIdsForCompositionEnabler
IdList getAssignableRepositoryIdsForCompositionEnabler(Id repositoryId, Id compositionEnablerId) throws OperationFailedException Gets a list of repositories including and under the given repository node in which a specific repository enabler can be assigned.- Parameters:
repositoryId- theIdof theRepositorycompositionEnablerId- theIdof theCompositionEnabler- Returns:
- list of assignable repository
Ids - Throws:
NullArgumentException-repositoryIdorcompositionEnablerIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignCompositionEnablerToRepository
void assignCompositionEnablerToRepository(Id compositionEnablerId, Id repositoryId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingCompositionEnablerto aRepository.- Parameters:
compositionEnablerId- theIdof theCompositionEnablerrepositoryId- theIdof theRepository- Throws:
AlreadyExistsException-compositionEnablerIdis alraedy assigned torepositoryIdNotFoundException-compositionEnablerIdorrepositoryIdnot foundNullArgumentException-compositionEnablerIdorrepositoryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignCompositionEnablerFromRepository
void unassignCompositionEnablerFromRepository(Id compositionEnablerId, Id repositoryId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aCompositionEnablerfrom aRepository.- Parameters:
compositionEnablerId- theIdof theCompositionEnablerrepositoryId- theIdof theRepository- Throws:
NotFoundException-compositionEnablerIdorrepositoryIdnot found orcompositionEnablerIdnot assigned torepositoryIdNullArgumentException-compositionEnablerIdorrepositoryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignCompositionEnablerToRepository
void reassignCompositionEnablerToRepository(Id compositionEnablerId, Id fromRepositoryId, Id toRepositoryId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aCompositionEnablerfrom oneRepositoryto another. Mappings to otherRepositoriesare unaffected.- Parameters:
compositionEnablerId- theIdof theCompositionEnablerfromRepositoryId- theIdof the currentRepositorytoRepositoryId- theIdof the destinationRepository- Throws:
AlreadyExistsException-compositionEnablerIdalready assigned totoRepositoryIdNotFoundException-compositionEnablerId, fromRepositoryId, ortoRepositoryIdnot found orcompositionEnablerIdnot mapped tofromRepositoryIdNullArgumentException-compositionEnablerId, fromRepositoryId, ortoRepositoryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-