public interface StatisticLookupSession extends OsidSession
This session is used to retrieve statistics from a meter.
This lookup session defines several views:
Modifier and Type | Method and Description |
---|---|
boolean |
canGetMeterStatistics()
Tests if this user can retrieve meter statistics.
|
DateTimeInterval |
getAvailableDateRange(Id meterId,
Id meteredObjectId)
Gets the date range of the available statistics for a metered object.
|
Statistic |
getStatistic(Id meterId,
Id meteredObjectId)
Gets a statistic for the
Meter and metered object for
all available data. |
Statistic |
getStatisticByDate(Id meterId,
Id meteredObjectId,
DateTime from,
DateTime to)
Gets a statistic within a period of time of the
Meter
and metered object specified by its Id. |
StatisticList |
getStatistics(Id meterId,
IdList meteredObjectIds)
Gets the statistics for the given metered object
IdList
for all available data. |
StatisticList |
getStatisticsAtInterval(Id meterId,
Id meteredObjectId,
DateTime from,
DateTime to,
DateTimeResolution interval)
Gets the statistics for a metered object within a period of time at
consecutive specified intervals.
|
StatisticList |
getStatisticsByDate(Id meterId,
IdList meteredObjectIds,
DateTime from,
DateTime to)
Gets the statistics within a period of time corresponding to the given
metered object
IdList. |
Utility |
getUtility()
Gets the
Utility associated with this session. |
Id |
getUtilityId()
Gets the
Utility Id associated with this
session. |
void |
useBoundedMeteredView()
If the supplied dates are beyond the lifetime of the metered object,
bound the statistics to the dates of the lifetime.
|
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.
|
void |
useFederatedUtilityView()
Federates the view for methods in this session.
|
void |
useIsolatedUtilityView()
Isolates the view for methods in this session.
|
void |
usePlenaryMeterView()
A complete view of the returns is desired.
|
void |
useUnboundedMeteredView()
If the supplied dates are beyond the lifetime of the metered object,
the readings that do not exist are zero.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getUtilityId()
Utility
Id
associated with this
session. Utility Id
associated with this sessionmandatory
- This method must be implemented. Utility getUtility() throws OperationFailedException, PermissionDeniedException
Utility
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canGetMeterStatistics()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer metering operations. false
if metering methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeMeterView()
mandatory
- This method is must be implemented. void usePlenaryMeterView()
mandatory
- This method is must be implemented. void useFederatedUtilityView()
mandatory
- This method is must be implemented. void useIsolatedUtilityView()
mandatory
- This method is must be implemented. void useBoundedMeteredView()
mandatory
- This method is must be implemented. void useUnboundedMeteredView()
mandatory
- This method is must be implemented. DateTimeInterval getAvailableDateRange(Id meterId, Id meteredObjectId) throws NotFoundException, OperationFailedException, PermissionDeniedException
meterId
- the Id
of the Meter
meteredObjectId
- the Id
of the metered objectNotFoundException
- no Meter
or metered
object found with the given Id
or no data
availableNullArgumentException
- meterId
or
meteredObjectId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. Statistic getStatistic(Id meterId, Id meteredObjectId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Meter
and metered object for
all available data.meterId
- the Id
of the Meter
meteredObjectId
- the Id
of the metered objectNotFoundException
- no Meter
or metered
object found with the given Id
NullArgumentException
- meterId
or
meteredObjectId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. Statistic getStatisticByDate(Id meterId, Id meteredObjectId, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException
Meter
and metered object specified by its Id.
meterId
- the Id
of the Meter
meteredObjectId
- the Id
of the metered objectfrom
- the start timeto
- the end timeInvalidArgumentException
- to
is less
than from
NotFoundException
- no Meter
or metered
object found with the given Id
or no data
available within the given date rangeNullArgumentException
- meterId,
meteredObjectId, from
or to
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. StatisticList getStatistics(Id meterId, IdList meteredObjectIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.meterId
- the Id
of the Meter
meteredObjectIds
- the Id
of the metered object Statistic
listNotFoundException
- meterId
or an
Id was
not foundNullArgumentException
- meterId
or
meteredObjects
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. StatisticList getStatisticsByDate(Id meterId, IdList meteredObjectIds, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.meterId
- the Id
of the Meter
meteredObjectIds
- the Id
of the metered objectfrom
- the start timeto
- the end time Statistic
listInvalidArgumentException
- to
is less
than from
NotFoundException
- meterId
or an
Id was
not found or no data available within the given
date rangeNullArgumentException
- meterId, meteredObjects,
from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. StatisticList getStatisticsAtInterval(Id meterId, Id meteredObjectId, DateTime from, DateTime to, DateTimeResolution interval) throws NotFoundException, OperationFailedException, PermissionDeniedException
meterId
- the Id
of the Meter
meteredObjectId
- the Id
of the metered objectfrom
- the start timeto
- the end timeinterval
- the interval Statistic
listInvalidArgumentException
- to
is less
than from
NotFoundException
- meterId
or an
Id was
not found or no data available within the given
date rangeNullArgumentException
- meterId,
meteredObjectId, from, to
or interval
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.