|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.birt.report.model.api.util.ParameterValidationUtil
Validates the parameter value with the given data type and format pattern string. This util class can validate the parameter of the following types:
PARAM_TYPE_DATETIMEPARAM_TYPE_FLOATPARAM_TYPE_DECIMALPARAM_TYPE_BOOLEANPARAM_TYPE_STRING
DesignChoiceConstants| Field Summary | |
static java.lang.String |
DEFAULT_DATETIME_FORMAT
Default date-time format string. |
| Constructor Summary | |
ParameterValidationUtil()
|
|
| Method Summary | |
static java.lang.String |
getDisplayValue(java.lang.Object value)
Gets the display string for the value with default locale and default format, The value must be the valid data type. |
static java.lang.String |
getDisplayValue(java.lang.String dataType,
java.lang.String format,
java.lang.Object value)
Gets the display string for the value with the given data type, format and the default locale defined by the class(Locale.US). |
static java.lang.String |
getDisplayValue(java.lang.String dataType,
java.lang.String format,
java.lang.Object value,
java.util.Locale locale)
Gets the display string for the value with the given data type, format, locale. |
static java.lang.String |
getDisplayValue(java.lang.String dataType,
java.lang.String format,
java.lang.Object value,
com.ibm.icu.util.ULocale locale)
Gets the display string for the value with the given data type, format, locale. |
static java.lang.Object |
validate(java.lang.String dataType,
java.lang.String format,
java.lang.String value)
Validates a input parameter value with the given data type, format choice string and a default locale defined by the class(Locale.US). |
static java.lang.Object |
validate(java.lang.String dataType,
java.lang.String format,
java.lang.String value,
java.util.Locale locale)
Validates a input parameter value with the given data type, format choice string. |
static java.lang.Object |
validate(java.lang.String dataType,
java.lang.String format,
java.lang.String value,
com.ibm.icu.util.ULocale locale)
Validates a input parameter value with the given data type, format choice string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String DEFAULT_DATETIME_FORMAT
| Constructor Detail |
public ParameterValidationUtil()
| Method Detail |
public static java.lang.Object validate(java.lang.String dataType,
java.lang.String format,
java.lang.String value,
java.util.Locale locale)
throws ValidationValueException
| Data Type | Format Type |
| Float/Decimal |
|
| Date time |
|
| String |
|
dataType - the data type of the valueformat - the format choice stringvalue - the input value to validatelocale - the locale information
ValidationValueException - if the input value is not valid with the given data type and
format string
public static java.lang.Object validate(java.lang.String dataType,
java.lang.String format,
java.lang.String value,
com.ibm.icu.util.ULocale locale)
throws ValidationValueException
| Data Type | Format Type |
| Float/Decimal |
|
| Date time |
|
| String |
|
dataType - the data type of the valueformat - the format choice stringvalue - the input value to validatelocale - the locale information
ValidationValueException - if the input value is not valid with the given data type and
format string
public static java.lang.Object validate(java.lang.String dataType,
java.lang.String format,
java.lang.String value)
throws ValidationValueException
| Data Type | Format Type |
| Float/Decimal |
|
| Date time |
|
| String |
|
dataType - the data type of the valueformat - the format choice stringvalue - the input value to validate
ValidationValueException - if the input value is not valid with the given data type and
format string
public static java.lang.String getDisplayValue(java.lang.String dataType,
java.lang.String format,
java.lang.Object value,
java.util.Locale locale)
PARAM_TYPE_DATETIME, then the value
must be java.util.Date.PARAM_TYPE_FLOAT, then the value must
be java.lang.Double.PARAM_TYPE_DECIMAL, then the value must
be java.math.BigDecimal.PARAM_TYPE_BOOLEAN, then the value must
be java.lang.Boolean.PARAM_TYPE_STRING, then the value must
be java.lang.String.
dataType - the data type of the input valueformat - the format pattern to validatevalue - the input value to validatelocale - the locale information
public static java.lang.String getDisplayValue(java.lang.Object value)
PARAM_TYPE_DATETIME, then the value
must be java.util.Date.PARAM_TYPE_FLOAT, then the value must
be java.lang.Double.PARAM_TYPE_DECIMAL, then the value must
be java.math.BigDecimal.PARAM_TYPE_BOOLEAN, then the value must
be java.lang.Boolean.PARAM_TYPE_STRING, then the value must
be java.lang.String.
value - the input value to validate
public static java.lang.String getDisplayValue(java.lang.String dataType,
java.lang.String format,
java.lang.Object value,
com.ibm.icu.util.ULocale locale)
PARAM_TYPE_DATETIME, then the value
must be java.util.Date.PARAM_TYPE_FLOAT, then the value must
be java.lang.Double.PARAM_TYPE_DECIMAL, then the value must
be java.math.BigDecimal.PARAM_TYPE_BOOLEAN, then the value must
be java.lang.Boolean.PARAM_TYPE_STRING, then the value must
be java.lang.String.
dataType - the data type of the input valueformat - the format pattern to validatevalue - the input value to validatelocale - the locale information
public static java.lang.String getDisplayValue(java.lang.String dataType,
java.lang.String format,
java.lang.Object value)
PARAM_TYPE_DATETIME, then the value
must be java.util.Date.PARAM_TYPE_FLOAT, then the value must
be java.lang.Double.PARAM_TYPE_DECIMAL, then the value must
be java.math.BigDecimal.PARAM_TYPE_BOOLEAN, then the value must
be java.lang.Boolean.PARAM_TYPE_STRING, then the value must
be java.lang.String.
dataType - the data type of the input valueformat - the format pattern to validatevalue - the input value to validate
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||