Interface CompositionEnablerRepositoryAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CompositionEnablerRepositoryAssignmentSession extends 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 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 a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignCompositionEnablersToRepository

      boolean canAssignCompositionEnablersToRepository(Id repositoryId)
      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.
      Parameters:
      repositoryId - the Id of the Repository
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - repositoryId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableRepositoryIds

      IdList getAssignableRepositoryIds(Id repositoryId) throws OperationFailedException
      Gets a list of repositories including and under the given repository node in which any repository enabler can be assigned.
      Parameters:
      repositoryId - the Id of the Repository
      Returns:
      list of assignable composition Ids
      Throws:
      NullArgumentException - repositoryId is null
      OperationFailedException - 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 - the Id of the Repository
      compositionEnablerId - the Id of the CompositionEnabler
      Returns:
      list of assignable repository Ids
      Throws:
      NullArgumentException - repositoryId or compositionEnablerId is null
      OperationFailedException - 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 existing CompositionEnabler to a Repository .
      Parameters:
      compositionEnablerId - the Id of the CompositionEnabler
      repositoryId - the Id of the Repository
      Throws:
      AlreadyExistsException - compositionEnablerId is alraedy assigned to repositoryId
      NotFoundException - compositionEnablerId or repositoryId not found
      NullArgumentException - compositionEnablerId or repositoryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignCompositionEnablerFromRepository

      void unassignCompositionEnablerFromRepository(Id compositionEnablerId, Id repositoryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a CompositionEnabler from a Repository .
      Parameters:
      compositionEnablerId - the Id of the CompositionEnabler
      repositoryId - the Id of the Repository
      Throws:
      NotFoundException - compositionEnablerId or repositoryId not found or compositionEnablerId not assigned to repositoryId
      NullArgumentException - compositionEnablerId or repositoryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignCompositionEnablerToRepository

      void reassignCompositionEnablerToRepository(Id compositionEnablerId, Id fromRepositoryId, Id toRepositoryId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a CompositionEnabler from one Repository to another. Mappings to other Repositories are unaffected.
      Parameters:
      compositionEnablerId - the Id of the CompositionEnabler
      fromRepositoryId - the Id of the current Repository
      toRepositoryId - the Id of the destination Repository
      Throws:
      AlreadyExistsException - compositionEnablerId already assigned to toRepositoryId
      NotFoundException - compositionEnablerId, fromRepositoryId , or toRepositoryId not found or compositionEnablerId not mapped to fromRepositoryId
      NullArgumentException - compositionEnablerId, fromRepositoryId , or toRepositoryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.