OSID Logo
OSID Specifications
metering package
Version 3.0.0
Release Candidate Preview
Interfaceosid.metering.StatisticLookupSession
Implementsosid.OsidSession
Description

This session is used to retrieve statistics from a meter.

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
  • bounded metered view: limits the statistics to the lifetime of the metered object
  • unbounded metered view: readings factored into statistics outside the lifetime of the metered object are zero
MethodgetUtilityId
Description

Gets the Utility Id associated with this session.

Returnosid.id.Idthe Utility Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetUtility
Description

Gets the Utility associated with this session.

Returnosid.metering.Utilitythe utility
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanGetMeterStatistics
Description

Tests if this user can retrieve meter statistics. 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 metering operations.

Returnboolean false if metering methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeMeterView
Description

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.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryMeterView
Description

A complete view of the 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.

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedUtilityView
Description

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.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedUtilityView
Description

Isolates the view for methods in this session. An isolated view restricts retrievals to this utility only.

CompliancemandatoryThis method is must be implemented.
MethoduseBoundedMeteredView
Description

If the supplied dates are beyond the lifetime of the metered object, bound the statistics to the dates of the lifetime.

CompliancemandatoryThis method is must be implemented.
MethoduseUnboundedMeteredView
Description

If the supplied dates are beyond the lifetime of the metered object, the readings that do not exist are zero.

CompliancemandatoryThis method is must be implemented.
MethodgetAvailableDateRange
Description

Gets the date range of the available statistics for a metered object.

Parametersosid.id.IdmeterIdthe Id of the Meter
osid.id.IdmeteredObjectIdthe Id of the metered object
Returnosid.calendaring.DateTimeIntervalthe date range of the available statistics
ErrorsNOT_FOUNDno Meter or metered object found with the given Id or no data available
NULL_ARGUMENT meterId or meteredObjectId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetStatistic
Description

Gets a statistic for the Meter and metered object for all available data.

Parametersosid.id.IdmeterIdthe Id of the Meter
osid.id.IdmeteredObjectIdthe Id of the metered object
Returnosid.metering.Statisticthe meter stat
ErrorsNOT_FOUNDno Meter or metered object found with the given Id
NULL_ARGUMENT meterId or meteredObjectId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetStatisticByDate
Description

Gets a statistic within a period of time of the Meter and metered object specified by its Id.

Parametersosid.id.IdmeterIdthe Id of the Meter
osid.id.IdmeteredObjectIdthe Id of the metered object
osid.calendaring.DateTimefromthe start time
osid.calendaring.DateTimetothe end time
Returnosid.metering.Statisticthe meter stat
ErrorsINVALID_ARGUMENT to is less than from
NOT_FOUNDno Meter or metered object found with the given Id or no data available within the given date range
NULL_ARGUMENT meterId, meteredObjectId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetStatistics
Description

Gets the statistics for the given metered object IdList for all available data. In plenary mode, the returned list contains all of the readings 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 statistics may be omitted from the list and may present the elements in any order including returning a unique set.

Parametersosid.id.IdmeterIdthe Id of the Meter
osid.id.IdListmeteredObjectIdsthe Id of the metered object
Returnosid.metering.StatisticListthe returned Statistic list
ErrorsNOT_FOUND meterId or an Id was not found
NULL_ARGUMENT meterId or meteredObjects is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetStatisticsByDate
Description

Gets the statistics within a period of time corresponding to the given metered object IdList. In plenary mode, the returned list contains all of the statistics 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 statistics or statistics not contained within the given date range may be omitted from the list and may present the elements in any order including returning a unique set.

Parametersosid.id.IdmeterIdthe Id of the Meter
osid.id.IdListmeteredObjectIdsthe Id of the metered object
osid.calendaring.DateTimefromthe start time
osid.calendaring.DateTimetothe end time
Returnosid.metering.StatisticListthe returned Statistic list
ErrorsINVALID_ARGUMENT to is less than from
NOT_FOUND meterId or an Id was not found or no data available within the given date range
NULL_ARGUMENT meterId, meteredObjects, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetStatisticsAtInterval
Description

Gets the statistics for a metered object within a period of time at consecutive specified intervals. In plenary mode, the returned list contains all of the statistics requested or an error results data in the supplied date range is not found or inaccessible. Otherwise, inaccessible statistics or statistics not contained within the given date range may be omitted from the list and may present the elements in any order including returning a unique set.

Parametersosid.id.IdmeterIdthe Id of the Meter
osid.id.IdmeteredObjectIdthe Id of the metered object
osid.calendaring.DateTimefromthe start time
osid.calendaring.DateTimetothe end time
osid.calendaring.DateTimeResolutionintervalthe interval
Returnosid.metering.StatisticListthe returned Statistic list
ErrorsINVALID_ARGUMENT to is less than from
NOT_FOUND meterId or an Id was not found or no data available within the given date range
NULL_ARGUMENT meterId, meteredObjectId, from, to or interval is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.