public interface DataPropertyFormatter
Modifier and Type | Method and Description |
---|---|
String |
formatName(DataProperty dp,
Locale l) |
String |
formatName(String propertyId,
Locale l) |
String |
formatValue(DataProperty property,
Object value,
Locale l) |
String |
formatValue(String propertyId,
Object value,
Locale l)
Formats a value for a given property.
|
Class |
getPropertyClass(DataProperty property) |
String[] |
getSupportedPropertyIds()
Get the set of property ids this formatter is addressed to.
|
Object |
parsePropertyValue(Class type,
String value)
Parses a given string and returns a instance representing the java object value.
|
Object |
parsePropertyValue(DataProperty property,
String value)
Parses a given string and returns a instance representing the java object value.
|
String[] getSupportedPropertyIds()
Class getPropertyClass(DataProperty property)
String formatName(DataProperty dp, Locale l)
String formatValue(DataProperty property, Object value, Locale l)
String formatValue(String propertyId, Object value, Locale l)
The default formatting technique applied is quite simple. The value instance class (Integer, Long, Boolean, Date, ...) is used to format the value as string. The following list it shows which formatting mechanism is applied for a given value class:
nullValueFormat
is returned.
DateFormatter
class is used.
toString
method is used.
Object parsePropertyValue(DataProperty property, String value) throws Exception
Exception
Copyright © 2012-2014 JBoss by Red Hat. All Rights Reserved.