Interface CatalogueLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CatalogueLookupSession extends OsidSession

This session provides methods for retrieving Catalogues . The Catalogue represents a collection of CanonicalUnits, Offerings, Particpants , and Results .

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 set or is an error condition
  • Method Details

    • canLookupCatalogues

      boolean canLookupCatalogues()
      Tests if this user can perform Catalogue 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 not offer lookup operations to unauthorized users.
      Returns:
      false if lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeCatalogueView

      void useComparativeCatalogueView()
      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.
    • usePlenaryCatalogueView

      void usePlenaryCatalogueView()
      A complete view of the Catalogue 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.
    • getCatalogue

      Gets the Catalogue specified by its Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Catalogue may have a different Id than requested, such as the case where a duplicate Id was assigned to a Catalogue and retained for compatibility.
      Parameters:
      catalogueId - Id of the Catalogue
      Returns:
      the catalogue
      Throws:
      NotFoundException - catalogueId not found
      NullArgumentException - catalogueId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getCataloguesByIds

      Gets a CatalogueList corresponding to the given IdList . In plenary mode, the returned list contains all of the catalogues 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 Catalogues may be omitted from the list and may present the elements in any order including returning a unique set.
      Parameters:
      catalogueIds - the list of Ids to retrieve
      Returns:
      the returned Catalogue list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - catalogueIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCataloguesByGenusType

      CatalogueList getCataloguesByGenusType(Type catalogueGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a CatalogueList corresponding to the given catalogue genus Type which does not include catalogues of genus types derived from the specified Type .In plenary mode, the returned list contains all known catalogues or an error results. Otherwise, the returned list may contain only those catalogues that are accessible through this session.
      Parameters:
      catalogueGenusType - a catalogue genus type
      Returns:
      the returned Catalogue list
      Throws:
      NullArgumentException - catalogueGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCataloguesByParentGenusType

      CatalogueList getCataloguesByParentGenusType(Type catalogueGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a CatalogueList corresponding to the given catalogue genus Type and include any additional catalogues with genus types derived from the specified Type .In plenary mode, the returned list contains all known catalogues or an error results. Otherwise, the returned list may contain only those catalogues that are accessible through this session.
      Parameters:
      catalogueGenusType - a catalogue genus type
      Returns:
      the returned Catalogue list
      Throws:
      NullArgumentException - catalogueGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCataloguesByRecordType

      CatalogueList getCataloguesByRecordType(Type catalogueRecordType) throws OperationFailedException, PermissionDeniedException
      Gets a CatalogueList containing the given catalogue record Type .In plenary mode, the returned list contains all known catalogues or an error results. Otherwise, the returned list may contain only those catalogues that are accessible through this session.
      Parameters:
      catalogueRecordType - a catalogue record type
      Returns:
      the returned Catalogue list
      Throws:
      NullArgumentException - catalogueRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getCataloguesByProvider

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

      Gets all Catalogues . In plenary mode, the returned list contains all known catalogues or an error results. Otherwise, the returned list may contain only those catalogues that are accessible through this session.
      Returns:
      a list of Catalogues
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.