Interface ProductSmartStoreSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ProductSmartStoreSession extends OsidSession

This session manages queries and sequencing to create "smart" dynamic catalogs. A ProductQuery can be retrieved from this session and mapped to this Store to create a virtual collection of Products . The products may be sequenced using the ProductSearchOrder from this session.

This Store has a default query that matches any product and a default search order that specifies no sequencing. The queries may be examined using a ProductQueryInspector . The query may be modified by converting the inspector back to a ProductQuery .

  • Method Details

    • getStoreId

      Id getStoreId()
      Gets the Store Id associated with this session.
      Returns:
      the Store Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getStore

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

      boolean canManageSmartStores()
      Tests if this user can manage smart stores. 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 store management is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getProductQuery

      ProductQuery getProductQuery()
      Gets a product query.
      Returns:
      the product query
      Compliance:
      mandatory - This method must be implemented.
    • getProductSearchOrder

      ProductSearchOrder getProductSearchOrder()
      Gets a product search order.
      Returns:
      the product search order
      Compliance:
      mandatory - This method must be implemented.
    • applyProductQuery

      void applyProductQuery(ProductQuery productQuery) throws OperationFailedException, PermissionDeniedException
      Applies a product query to this store.
      Parameters:
      productQuery - the product query
      Throws:
      NullArgumentException - productQuery is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - productQuery not of this service
      Compliance:
      mandatory - This method must be implemented.
    • inspectProductQuery

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

      void applyProductSequencing(ProductSearchOrder productSearchOrder) throws OperationFailedException, PermissionDeniedException
      Applies a product search order to this store.
      Parameters:
      productSearchOrder - the product search order
      Throws:
      NullArgumentException - productSearchOrder is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - productSearchOrder not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getProductQueryFromInspector

      ProductQuery getProductQueryFromInspector(ProductQueryInspector productQueryInspector)
      Gets a product query from an inspector.
      Parameters:
      productQueryInspector - a query inspector
      Returns:
      the product query
      Throws:
      NullArgumentException - productQueryInspector is null
      UnsupportedException - productQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.