Interface MeterLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface MeterLookupSession extends OsidSession

This session defines methods for retrieving meters. A Meter represents a statistic.

This lookup session defines several views:

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete result set or is an error condition
  • federated utility view: includes meters in utilities which are children of this utility in the utility hierarchy
  • isolated utility view: restricts lookups to this utility only
  • 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
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canLookupMeters

      boolean canLookupMeters()
      Tests if this user can lookup meters. 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 reading operations.
      Returns:
      false if lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeMeterView

      void useComparativeMeterView()
      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.
    • usePlenaryMeterView

      void usePlenaryMeterView()
      A complete view of the Meter 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.
    • useFederatedUtilityView

      void useFederatedUtilityView()
      Federates the view for methods in this session. A federated view will include meters in utilities which are children of this utility in the utility hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedUtilityView

      void useIsolatedUtilityView()
      Isolates the view for methods in this session. An isolated view restricts retrievals to this utility only.
      Compliance:
      mandatory - This method is must be implemented.
    • getMeter

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

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

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

      MeterList getMetersByParentGenusType(Type meterGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a MeterList corresponding to the given meter genus Type and include meters of types derived from the specified Type . In plenary mode, the returned list contains all known meters or an error results. Otherwise, the returned list may contain only those meters that are accessible through this session.
      Parameters:
      meterGenusType - a meter genus type
      Returns:
      the returned Meter list
      Throws:
      NullArgumentException - meterGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getMetersByRecordType

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

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