public interface MeterReadingSession extends OsidSession
This session is used to read meters.
This reading session defines several views:
Modifier and Type | Method and Description |
---|---|
boolean |
canReadMeters()
Tests if this user can read meters.
|
Utility |
getUtility()
Gets the
Utility associated with this session. |
Id |
getUtilityId()
Gets the
Utility Id associated with this
session. |
Reading |
readMeter(Id meterId,
Id meteredObjectId)
Gets the reading of the
Meter specified by its
Id. |
ReadingList |
readMeters(Id meterId,
IdList meteredObjectIds)
Gets a
ReadingList corresponding to the given
meterdId and metered object list 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. |
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.
|
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 canReadMeters()
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. Reading readMeter(Id meterId, Id meteredObjectId) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.meterId
- the Id
of the Meter
to
retrievemeteredObjectId
- the Id
of the Metered
to retrieveNotFoundException
- no Meter
found with
the given Id
NullArgumentException
- meterId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ReadingList readMeters(Id meterId, IdList meteredObjectIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
ReadingList
corresponding to the given
meterdId
and metered object list 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 readings 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
to
retrievemeteredObjectIds
- the Ids
of the metered objects
to retrieve Reading
listNotFoundException
- meterId
or an
Id was
not foundNullArgumentException
- meterI
d or
meteredObjectIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.