Interface MeterSmartUtilitySession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface MeterSmartUtilitySession extends OsidSession

This session manages queries and sequencing to create "smart" dynamic catalogs. A MeterQuery can be retrieved from this session and mapped to this Utility to create a virtual collection of Meters . The entries may be sequenced using the MeterSearchOrder from this session.

This Utility has a default query that matches any meter and a default search order that specifies no sequencing. The queries may be examined using a MeterQueryInspector . The query may be modified by converting the inspector back to a MeterQuery .

  • Method Details

    • getUtilityId

      Id getUtilityId()
      Gets the Utility Id associated with this session.
      Returns:
      the Utility Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getUtility

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

      boolean canManageSmartUtilities()
      Tests if this user can manage smart utilities. 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 smart operations.
      Returns:
      false if smart utility methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getMeterQuery

      MeterQuery getMeterQuery()
      Gets a meter query.
      Returns:
      the meter query
      Compliance:
      mandatory - This method must be implemented.
    • getMeterSearchOrder

      MeterSearchOrder getMeterSearchOrder()
      Gets a meter search order.
      Returns:
      the meter search order
      Compliance:
      mandatory - This method must be implemented.
    • applyMeterQuery

      void applyMeterQuery(MeterQuery meterQuery) throws OperationFailedException, PermissionDeniedException
      Applies a meter query to this utility.
      Parameters:
      meterQuery - the meter query
      Throws:
      NullArgumentException - meterQuery is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - meterQuery not of this service
      Compliance:
      mandatory - This method must be implemented.
    • inspectMeterQuery

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

      void applyMeterSequencing(MeterSearchOrder meterSearchOrder) throws OperationFailedException, PermissionDeniedException
      Applies a meter search order to this utility.
      Parameters:
      meterSearchOrder - the meter search order
      Throws:
      NullArgumentException - meterSearchOrder is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - meterSearchOrder not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getMeterQueryFromInspector

      MeterQuery getMeterQueryFromInspector(MeterQueryInspector meterQueryInspector)
      Gets a meter query from an inspector.
      Parameters:
      meterQueryInspector - a meter query inspector
      Returns:
      the meter query
      Throws:
      NullArgumentException - meterQueryInspector is null
      UnsupportedException - meterQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.