|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sap.mdm.valuetypes.format.MdmValueFormatter
Utility class supplying methods for formatting MDM values
| Constructor Summary | |
MdmValueFormatter()
|
|
| Method Summary | |
static java.lang.String |
concatenateDisplayValues(java.lang.String[] displayVaues)
Concatenates several display values to a single string where the values are separated by ';'. |
static java.lang.String |
concatenateDisplayValues(java.lang.String[] displayVaues,
java.lang.String delimiter)
Concatenates several display values to a single string where the values are separated by the specified delimeter. |
static java.lang.String[] |
formatAttributeValue(AttributeProperties attr,
MdmValue value,
RegionProperties region,
DimensionsManager dimensionsManager)
Formats attribute value (or multi-values) based on the attribute properties definitions. |
static java.lang.String[] |
formatAttributeValue(AttributeProperties attr,
MdmValue value,
RegionProperties region,
DimensionsManager dimensionsManager,
java.lang.String nullString,
java.lang.String naString)
Formats attribute value (or multi-values) based on the attribute properties definitions. |
static java.lang.String |
formatCurrency(double value,
MdmCurrencyFormatInfo currencyFormat)
Formats the currency value |
static java.lang.String |
formatDateTime(java.util.Date value,
MdmDateTimeFormatInfo dateTimeFormat)
Formats the date/time value |
static java.lang.String[] |
formatFieldValue(FieldProperties field,
MdmValue value,
RegionProperties region,
DimensionsManager dimensionsManager)
Formats the field value (or multi-values) based on the field properties definitions. |
static java.lang.String[] |
formatFieldValue(FieldProperties field,
MdmValue value,
RegionProperties region,
DimensionsManager dimensionsManager,
java.lang.String nullString,
java.lang.String naString)
Formats the field value (or multi-values) based on the field properties definitions. |
static java.lang.String |
formatMeasurement(double value,
MdmMeasurementFormatInfo measurementFormat,
DimensionsManager dimensionsManager)
Formats the measurement value |
static java.lang.String |
formatRealNumber(double number,
MdmNumberFormatInfo numberFormat)
Formats the number value |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MdmValueFormatter()
| Method Detail |
public static java.lang.String[] formatFieldValue(FieldProperties field,
MdmValue value,
RegionProperties region,
DimensionsManager dimensionsManager,
java.lang.String nullString,
java.lang.String naString)
throws MdmValueFormatException
field - the field propertiesvalue - the field valueregion - the region properties. If Null, the first region will be used for multi-regional values
and default locale will be used for formattingdimensionsManager - the DimensionsManager instance.
If Null then only build-in dimensions will be used.nullString - the presentation of Null valuenaString - the presentation of N/A value
MdmValueFormatException
public static java.lang.String[] formatFieldValue(FieldProperties field,
MdmValue value,
RegionProperties region,
DimensionsManager dimensionsManager)
throws MdmValueFormatException
field - the field propertiesvalue - the field valueregion - the region properties. If Null, the first region will be used for multi-regional values
and default locale will be used for formattingdimensionsManager - the DimensionsManager instance.
If Null then only build-in dimensions will be used.
MdmValueFormatException
public static java.lang.String[] formatAttributeValue(AttributeProperties attr,
MdmValue value,
RegionProperties region,
DimensionsManager dimensionsManager,
java.lang.String nullString,
java.lang.String naString)
throws MdmValueFormatException
attr - the attribute propertiesvalue - the attribute valueregion - the region properties. If Null, the first region will be used for multi-regional values
and default locale will be used for formattingdimensionsManager - the DimensionsManager instance.
If Null then only build-in dimensions will be used.nullString - presentation of Null valuenaString - presentation of N/A value
MdmValueFormatException
public static java.lang.String[] formatAttributeValue(AttributeProperties attr,
MdmValue value,
RegionProperties region,
DimensionsManager dimensionsManager)
throws MdmValueFormatException
attr - the attribute propertiesvalue - the attribute valueregion - the region properties. If Null, the first region will be used for multi-regional values
and default locale will be used for formattingdimensionsManager - the DimensionsManager instance.
If Null then only build-in dimensions will be used.
MdmValueFormatException
public static java.lang.String formatRealNumber(double number,
MdmNumberFormatInfo numberFormat)
throws MdmValueFormatException
number - the number valuenumberFormat - the number format definition
MdmValueFormatException
public static java.lang.String formatMeasurement(double value,
MdmMeasurementFormatInfo measurementFormat,
DimensionsManager dimensionsManager)
throws MdmValueFormatException
value - the measurement valuemeasurementFormat - the measurement format definitiondimensionsManager - the DimensionsManager instance.
If Null then only build-in dimensions will be used.
MdmValueFormatException
public static java.lang.String formatCurrency(double value,
MdmCurrencyFormatInfo currencyFormat)
throws MdmValueFormatException
value - the currency valuecurrencyFormat - the currency format definition
MdmValueFormatException
public static java.lang.String formatDateTime(java.util.Date value,
MdmDateTimeFormatInfo dateTimeFormat)
throws MdmValueFormatException
value - the date/time valuedateTimeFormat - the date/time format definition
MdmValueFormatExceptionpublic static java.lang.String concatenateDisplayValues(java.lang.String[] displayVaues)
displayVaues - array of display values that should be concatenated.
public static java.lang.String concatenateDisplayValues(java.lang.String[] displayVaues,
java.lang.String delimiter)
displayVaues - array of display values that should be concatenated.delimiter - the delimeter separated display values
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright 2004-2007 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.