Interface CompositionEnablerRepositorySession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CompositionEnablerRepositorySession extends OsidSession

This session provides methods to retrieve CompositionEnabler to Composition mappings. A CompositionEnabler may appear in multiple Composition objects. Each composition may have its own authorizations governing who is allowed to look at it.

This lookup session defines several views:

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete result set or is an error condition
  • Method Details

    • canLookupCompositionEnablerRepositorytMappings

      boolean canLookupCompositionEnablerRepositorytMappings()
      Tests if this user can perform lookups of composition enabler/repository mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup 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 looking up mappings is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeCompositionEnablerRepositoryView

      void useComparativeCompositionEnablerRepositoryView()
      The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
      Compliance:
      mandatory - This method is must be implemented.
    • usePlenaryCompositionEnablerRepositoryView

      void usePlenaryCompositionEnablerRepositoryView()
      A complete view of the CompositionEnabler and Repository returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
      Compliance:
      mandatory - This method is must be implemented.
    • getCompositionEnablerIdsByRepository

      IdList getCompositionEnablerIdsByRepository(Id repositoryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of CompositionEnablerIds associated with a Repository .
      Parameters:
      repositoryId - Id of the Repository
      Returns:
      list of related composition enabler Ids
      Throws:
      NotFoundException - repositoryId is not found
      NullArgumentException - repositoryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCompositionEnablersByRepository

      CompositionEnablerList getCompositionEnablersByRepository(Id repositoryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of composition enablers associated with a Repository .
      Parameters:
      repositoryId - Id of the Repository
      Returns:
      list of related composition enablers
      Throws:
      NotFoundException - repositoryId is not found
      NullArgumentException - repositoryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCompositionEnablerIdsByRepositories

      IdList getCompositionEnablerIdsByRepositories(IdList repositoryIds) throws OperationFailedException, PermissionDeniedException
      Gets the list of CompositionEnablerIds corresponding to a list of Repositories .
      Parameters:
      repositoryIds - list of repository Ids
      Returns:
      list of composition enabler Ids
      Throws:
      NullArgumentException - familtIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCompositionEnablersByRepositories

      CompositionEnablerList getCompositionEnablersByRepositories(IdList repositoryIds) throws OperationFailedException, PermissionDeniedException
      Gets the list of composition enablers corresponding to a list of Repositories .
      Parameters:
      repositoryIds - list of repository Ids
      Returns:
      list of composition enablers
      Throws:
      NullArgumentException - repositoryIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRepositoryIdsByCompositionEnabler

      IdList getRepositoryIdsByCompositionEnabler(Id compositionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the Repository Ids mapped to a CompositionEnabler .
      Parameters:
      compositionEnablerId - Id of a CompositionEnabler
      Returns:
      list of repository Ids
      Throws:
      NotFoundException - compositionEnablerId is not found
      NullArgumentException - compositionEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCompositionsByCompositionEnabler

      RepositoryList getCompositionsByCompositionEnabler(Id compositionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the repositories mapped to a CompositionEnabler .
      Parameters:
      compositionEnablerId - Id of a CompositionEnabler
      Returns:
      list of repositories
      Throws:
      NotFoundException - compositionEnablerId is not found
      NullArgumentException - compositionEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.