public interface UnitConversionSession extends OsidSession
This session defines methods to convert units across measurement systems.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConvertUnits()
Tests if this user can perform unit conversions.
|
java.math.BigDecimal |
convertUnit(java.math.BigDecimal sourceUnit,
Type sourceUnitType,
Type targetUnitType)
Convert a unit of measurement.
|
java.math.BigDecimal[] |
convertUnits(java.math.BigDecimal[] sourceUnits,
Type sourceUnitType,
Type targetUnitType)
Convert units of measurement.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canConvertUnits()
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer lookup operations. false if conversion methods are not authorized,
true otherwisemandatory - This method must be implemented. java.math.BigDecimal convertUnit(java.math.BigDecimal sourceUnit,
Type sourceUnitType,
Type targetUnitType)
throws OperationFailedException,
PermissionDeniedException
sourceUnit - the measure to convertsourceUnitType - the type of measure specifiedtargetUnitType - the type of converted measureNullArgumentException - null argument
providedOperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException -
LocaleManager.supportsUnitTypesForConversion(measureType,
conversionType) is falsemandatory - This method must be implemented. java.math.BigDecimal[] convertUnits(java.math.BigDecimal[] sourceUnits,
Type sourceUnitType,
Type targetUnitType)
throws OperationFailedException,
PermissionDeniedException
sourceUnits - the measures to convertsourceUnitType - the type of measure specifiedtargetUnitType - the type of converted measureNullArgumentException - null argument
providedOperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException -
LocaleManager.supportsUnitTypesForConversion(measureType,
conversionType) is falsemandatory - This method must be implemented.