Interface PackageSmartDepotSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface PackageSmartDepotSession extends OsidSession

This session manages queries and sequencing to create "smart" dynamic catalogs. A PackageQuery can be retrieved from this session and mapped to this Depot to create a virtual collection of Packages . The packages may be sequenced using the PackageSearchOrder from this session.

This Depot has a default query that matches any package and a default search order that specifies no sequencing. The queries may be examined using a PackageQueryInspector . The query may be modified by converting the inspector back to a PackageQuery .

  • Method Details

    • getDepotId

      Id getDepotId()
      Gets the Depot Id associated with this session.
      Returns:
      the Depot Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getDepot

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

      boolean canManageSmartDepot()
      Tests if this user can manage smart depot. A return of true does not guarantee successful authorization. A return of false indicates that it is known 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 operations to unauthorized users.
      Returns:
      false if smart depot management is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getPackageQuery

      PackageQuery getPackageQuery()
      Gets a package query.
      Returns:
      the package query
      Compliance:
      mandatory - This method must be implemented.
    • getPackageSearchOrder

      PackageSearchOrder getPackageSearchOrder()
      Gets a package search order.
      Returns:
      the package search order
      Compliance:
      mandatory - This method must be implemented.
    • applyPackageQuery

      void applyPackageQuery(PackageQuery packageQuery) throws OperationFailedException, PermissionDeniedException
      Applies a package query to this depot.
      Parameters:
      packageQuery - the package query
      Throws:
      NullArgumentException - packageQuery is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - packageQuery not of this service
      Compliance:
      mandatory - This method must be implemented.
    • inspectPackageQuery

      Gets a package query inspector for this depot.
      Returns:
      the package query inspector
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • applyPackageSequencing

      void applyPackageSequencing(PackageSearchOrder packageSearchOrder) throws OperationFailedException, PermissionDeniedException
      Applies a package search order to this depot.
      Parameters:
      packageSearchOrder - the package search order
      Throws:
      NullArgumentException - packageSearchOrder is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - packageSearchOrder not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getPackageQueryFromInspector

      PackageQuery getPackageQueryFromInspector(PackageQueryInspector packageQueryInspector)
      Gets a package query from an inspector.
      Parameters:
      packageQueryInspector - a package query inspector
      Returns:
      the package query
      Throws:
      NullArgumentException - packageQueryInspector is null
      UnsupportedException - packageQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.