Interface CreditSmartBillingSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CreditSmartBillingSession extends OsidSession

This session manages queries and sequencing to create "smart" dynamic catalogs. A CreditQuery can be retrieved from this session and mapped to this Billing to create a virtual collection of Credits . The credits may be sequenced using the CreditSearchOrder from this session.

This Billing has a default query that matches any credit and a default search order that specifies no sequencing. The queries may be examined using a CreditQueryInspector . The query may be modified by converting the inspector back to a CreditQuery .

  • Method Details

    • getBillingId

      Id getBillingId()
      Gets the Billing Id associated with this session.
      Returns:
      the Billing Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getBilling

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

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

      CreditQuery getCreditQuery()
      Gets a credit query.
      Returns:
      the credit query
      Compliance:
      mandatory - This method must be implemented.
    • getCreditSearchOrder

      CreditSearchOrder getCreditSearchOrder()
      Gets a credit search order.
      Returns:
      the credit search order
      Compliance:
      mandatory - This method must be implemented.
    • applyCreditQuery

      void applyCreditQuery(CreditQuery creditQuery) throws OperationFailedException, PermissionDeniedException
      Applies a credit query to this billing.
      Parameters:
      creditQuery - the credit query
      Throws:
      NullArgumentException - creditQuery is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - creditQuery not of this service
      Compliance:
      mandatory - This method must be implemented.
    • inspectCreditQuery

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

      void applyCreditSequencing(CreditSearchOrder creditSearchOrder) throws OperationFailedException, PermissionDeniedException
      Applies a credit search order to this billing.
      Parameters:
      creditSearchOrder - the credit search order
      Throws:
      NullArgumentException - creditSearchOrder is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - creditSearchOrder not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getCreditQueryFromInspector

      CreditQuery getCreditQueryFromInspector(CreditQueryInspector creditQueryInspector)
      Gets a credit query from an inspector.
      Parameters:
      creditQueryInspector - a query inspector
      Returns:
      the credit query
      Throws:
      NullArgumentException - creditQueryInspector is null
      UnsupportedException - creditQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.