Interface MeterSmartUtilitySession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session manages queries and sequencing to create "smart" dynamic
catalogs. A MeterQuery can be retrieved from this session and
mapped to this Utility to create a virtual collection of
Meters . The entries may be sequenced using the MeterSearchOrder
from this session.
This Utility has a default query that matches any meter and a
default search order that specifies no sequencing. The queries may be
examined using a MeterQueryInspector . The query may be modified
by converting the inspector back to a MeterQuery .
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyMeterQuery(MeterQuery meterQuery) Applies a meter query to this utility.voidapplyMeterSequencing(MeterSearchOrder meterSearchOrder) Applies a meter search order to this utility.booleanTests if this user can manage smart utilities.Gets a meter query.getMeterQueryFromInspector(MeterQueryInspector meterQueryInspector) Gets a meter query from an inspector.Gets a meter search order.Gets theUtilityassociated with this session.Gets theUtilityIdassociated with this session.Gets a meter query inspector for this utility.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getUtilityId
Id getUtilityId()Gets theUtilityIdassociated with this session.- Returns:
- the
Utility Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getUtility
Gets theUtilityassociated with this session.- Returns:
- the
Utilityassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageSmartUtilities
boolean canManageSmartUtilities()Tests if this user can manage smart utilities. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer smart operations.- Returns:
falseif smart utility methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getMeterQuery
MeterQuery getMeterQuery()Gets a meter query.- Returns:
- the meter query
- Compliance:
mandatory- This method must be implemented.
-
getMeterSearchOrder
MeterSearchOrder getMeterSearchOrder()Gets a meter search order.- Returns:
- the meter search order
- Compliance:
mandatory- This method must be implemented.
-
applyMeterQuery
void applyMeterQuery(MeterQuery meterQuery) throws OperationFailedException, PermissionDeniedException Applies a meter query to this utility.- Parameters:
meterQuery- the meter query- Throws:
NullArgumentException-meterQueryisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurredUnsupportedException-meterQuerynot of this service- Compliance:
mandatory- This method must be implemented.
-
inspectMeterQuery
Gets a meter query inspector for this utility.- Returns:
- the meter query inspector
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
applyMeterSequencing
void applyMeterSequencing(MeterSearchOrder meterSearchOrder) throws OperationFailedException, PermissionDeniedException Applies a meter search order to this utility.- Parameters:
meterSearchOrder- the meter search order- Throws:
NullArgumentException-meterSearchOrderisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurredUnsupportedException-meterSearchOrdernot of this service- Compliance:
mandatory- This method must be implemented.
-
getMeterQueryFromInspector
Gets a meter query from an inspector.- Parameters:
meterQueryInspector- a meter query inspector- Returns:
- the meter query
- Throws:
NullArgumentException-meterQueryInspectorisnullUnsupportedException-meterQueryInspectoris not of this service- Compliance:
mandatory- This method must be implemented.
-