Interface CompositionLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CompositionLookupSession extends OsidSession

This session provides methods for retrieving Composition objects. The Composition represents a collection of Assets .

This session defines views that offer differing behaviors when retrieving multiple objects.

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete and ordered result set or is an error condition
  • isolated repository view: All lookup methods in this session operate, retrieve and pertain to compositions defined explicitly in the current repository. Using an isolated view is useful for managing compositions with the CompositionAdminSession .
  • federated repository view: All composition methods in this session operate, retrieve and pertain to all compositions defined in this repository and any other compositions implicitly available in this repository through repository inheritence.
  • active composition view: All composition lookup methods return active compositions.
  • any status composition view: Compositions of any active or inactive status are returned from methods.
  • sequestered composition viiew: All composition methods suppress sequestered compositions.
  • unsequestered composition view: All composition methods return all compositions.

Generally, the comparative view should be used for most applications as it permits operation even if there is data that cannot be accessed. For example, a browsing application may only need to examine the Composition it can access, without breaking execution. However, an administrative application may require a complete set of Composition objects to be returned.

Compositions may have an additional records indicated by their respective record types. The record may not be accessed through a cast of the Composition .

  • Method Details

    • getRepositoryId

      Id getRepositoryId()
      Gets the Repository Id associated with this session.
      Returns:
      the Repository Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getRepository

      Gets the Repository associated with this session.
      Returns:
      the Repository associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canLookupCompositions

      boolean canLookupCompositions()
      Tests if this user can perform Composition lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all 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 lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeCompositionView

      void useComparativeCompositionView()
      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.
    • usePlenaryCompositionView

      void usePlenaryCompositionView()
      A complete view of the Composition 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.
    • useFederatedRepositoryView

      void useFederatedRepositoryView()
      Federates the view for methods in this session. A federated view will include compositions in repositories which are children of this repository in the repository hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedRepositoryView

      void useIsolatedRepositoryView()
      Isolates the view for methods in this session. An isolated view restricts lookups to this repository only.
      Compliance:
      mandatory - This method is must be implemented.
    • useActiveCompositionView

      void useActiveCompositionView()
      Only active compositions are returned by methods in this session.
      Compliance:
      mandatory - This method is must be implemented.
    • useAnyStatusCompositionView

      void useAnyStatusCompositionView()
      All active and inactive compositions are returned by methods in this session.
      Compliance:
      mandatory - This method is must be implemented.
    • useSequesteredCompositionView

      void useSequesteredCompositionView()
      The methods in this session omit sequestered compositions.
      Compliance:
      mandatory - This method is must be implemented.
    • useUnsequesteredCompositionView

      void useUnsequesteredCompositionView()
      The methods in this session return all compositions, including sequestered compositions.
      Compliance:
      mandatory - This method is must be implemented.
    • getComposition

      Gets the Composition specified by its Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Composition may have a different Id than requested, such as the case where a duplicate Id was assigned to a Composition and retained for compatility. In active mode, compositions are returned that are currently active. In any effective mode, active and inactive compositions are returned. In sequestered mode, no sequestered compositions are returned. In unsequestered mode, all compositions are returned.
      Parameters:
      compositionId - Id of the Compositoon
      Returns:
      the composition
      Throws:
      NotFoundException - compositionId not found
      NullArgumentException - compositionId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getCompositionsByIds

      Gets a CompositionList corresponding to the given IdList . In plenary mode, the returned list contains all of the compositions specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Compositions may be omitted from the list and may present the elements in any order including returning a unique set. In active mode, compositions are returned that are currently active. In any effective mode, active and inactive compositions are returned. In sequestered mode, no sequestered compositions are returned. In unsequestered mode, all compositions are returned.
      Parameters:
      compositionIds - the list of Ids to retrieve
      Returns:
      the returned Composition list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - compositionIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCompositionsByGenusType

      CompositionList getCompositionsByGenusType(Type compositionGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a CompositionList corresponding to the given composition genus Type which does not include compositions of types derived from the specified Type . In plenary mode, the returned list contains all known compositions or an error results. Otherwise, the returned list may contain only those compositions that are accessible through this session. In active mode, compositions are returned that are currently active. In any effective mode, active and inactive compositions are returned. In sequestered mode, no sequestered compositions are returned. In unsequestered mode, all compositions are returned.
      Parameters:
      compositionGenusType - a composition genus type
      Returns:
      the returned Composition list
      Throws:
      NullArgumentException - compositionGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCompositionsByParentGenusType

      CompositionList getCompositionsByParentGenusType(Type compositionGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a CompositionList corresponding to the given composition genus Type and include any additional compositions with genus types derived from the specified Type . In plenary mode, the returned list contains all known compositions or an error results. Otherwise, the returned list may contain only those compositions that are accessible through this session. In active mode, compositions are returned that are currently active. In any effective mode, active and inactive compositions are returned. In sequestered mode, no sequestered compositions are returned. In unsequestered mode, all compositions are returned.
      Parameters:
      compositionGenusType - a composition genus type
      Returns:
      the returned Composition list
      Throws:
      NullArgumentException - compositionGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCompositionsByRecordType

      CompositionList getCompositionsByRecordType(Type compositionRecordType) throws OperationFailedException, PermissionDeniedException
      Gets a CompositionList containing the given composition record Type . In plenary mode, the returned list contains all known compositions or an error results. Otherwise, the returned list may contain only those compositions that are accessible through this session. In active mode, compositions are returned that are currently active. In any effective mode, active and inactive compositions are returned. In sequestered mode, no sequestered compositions are returned. In unsequestered mode, all compositions are returned.
      Parameters:
      compositionRecordType - a composition record type
      Returns:
      the returned Composition list
      Throws:
      NullArgumentException - compositionRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCompositionsByProvider

      CompositionList getCompositionsByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Gets a CompositionList from the given provider. In plenary mode, the returned list contains all known compositions or an error results. Otherwise, the returned list may contain only those compositions that are accessible through this session. In sequestered mode, no sequestered compositions are returned. In unsequestered mode, all compositions are returned.
      Parameters:
      resourceId - a resource Id
      Returns:
      the returned Composition list
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCompositions

      Gets all Compositions . In plenary mode, the returned list contains all known compositions or an error results. Otherwise, the returned list may contain only those compositions that are accessible through this session. In active mode, compositions are returned that are currently active. In any effective mode, active and inactive compositions are returned. In sequestered mode, no sequestered compositions are returned. In unsequestered mode, all compositions are returned.
      Returns:
      a list of Compositions
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.