public interface MeterLookupSession extends OsidSession
This session defines methods for retrieving meters. A Meter
represents a statistic.
This lookup session defines several views:
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupMeters()
Tests if this user can lookup meters.
|
Meter |
getMeter(Id meterId)
Gets the
Meter specified by its Id. |
MeterList |
getMeters()
Gets all meters.
|
MeterList |
getMetersByGenusType(Type meterGenusType)
Gets a
MeterList corresponding to the given meter genus
Type which does not include meters of types derived
from the specified Type. |
MeterList |
getMetersByIds(IdList meterIds)
Gets a
MeterList corresponding to the given
IdList. |
MeterList |
getMetersByParentGenusType(Type meterGenusType)
Gets a
MeterList corresponding to the given meter genus
Type and include meters of types derived from the
specified Type. |
MeterList |
getMetersByRecordType(Type meterRecordType)
Gets a
MeterList containing the given meter record
Type. |
Utility |
getUtility()
Gets the
Utility associated with this session. |
Id |
getUtilityId()
Gets the
Utility Id associated with this
session. |
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
Meter 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 canLookupMeters()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer reading operations. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeMeterView()
mandatory
- This method is must be implemented. void usePlenaryMeterView()
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.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. Meter getMeter(Id meterId) 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
retrieve Meter
NotFoundException
- no Meter
found with
the given Id
NullArgumentException
- meterId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. MeterList getMetersByIds(IdList meterIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.meterIds
- the list of Ids
to retrieve Meter list
NotFoundException
- an Id was
not foundNullArgumentException
- meterIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. MeterList getMetersByGenusType(Type meterGenusType) throws OperationFailedException, PermissionDeniedException
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.meterGenusType
- a meter genus type Meter
listNullArgumentException
- meterGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. MeterList getMetersByParentGenusType(Type meterGenusType) throws OperationFailedException, PermissionDeniedException
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.meterGenusType
- a meter genus type Meter
listNullArgumentException
- meterGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. MeterList getMetersByRecordType(Type meterRecordType) throws OperationFailedException, PermissionDeniedException
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.meterRecordType
- a meter record type Meter
listNullArgumentException
- meterRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. MeterList getMeters() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.