public class TCLUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.text.SimpleDateFormat |
sdfDateISO |
static java.text.SimpleDateFormat |
sdfDateTimeISO |
Constructor and Description |
---|
TCLUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
findDisplayValue(WSOptionBean[] options,
java.lang.String objectID)
Find display value for option
|
static java.lang.String |
findDisplayValue(WSPersonBean[] persons,
java.lang.String personID)
Find full name for persons
|
static java.lang.String |
findDisplayValue(WSSortedOptionBean[] sortedOptions,
java.lang.String optionID)
Find display value for sorted option
|
static java.lang.String |
findDisplayValue(WSStateOptionBean[] stateOptions,
java.lang.String stateID)
Find the display value for a state.
|
static java.lang.String |
findDisplayValue(WSTreeNode[] options,
java.lang.String objectID)
Find display value for a tree node
|
static java.lang.String |
formatISODate(java.util.Date date)
Format a date in ISO date format yyyy-MM-dd
|
static java.lang.String |
formatISODateTime(java.util.Date date)
Format a date in ISO date-time format yyyy-MM-dd H:mm:ss.S
|
static java.util.Date |
parseDateIso(java.lang.String date)
Parse a date from ISO date format yyyy-MM-dd
|
static java.util.Date |
parseDateTimeIso(java.lang.String dateTime)
Parse a date from ISO dateTime format yyyy-MM-dd H:mm:ss.S
|
public static java.text.SimpleDateFormat sdfDateTimeISO
public static java.text.SimpleDateFormat sdfDateISO
public static java.lang.String formatISODate(java.util.Date date)
date
- public static java.lang.String formatISODateTime(java.util.Date date)
date
- public static java.util.Date parseDateTimeIso(java.lang.String dateTime) throws java.text.ParseException
dateTime
- java.text.ParseException
- the dateTime pattern is invalidpublic static java.util.Date parseDateIso(java.lang.String date) throws java.text.ParseException
date
- java.text.ParseException
public static java.lang.String findDisplayValue(WSOptionBean[] options, java.lang.String objectID)
options
- the list of optionsobjectID
- the option idpublic static java.lang.String findDisplayValue(WSTreeNode[] options, java.lang.String objectID)
options
- objectID
- the id of the selected nodepublic static java.lang.String findDisplayValue(WSPersonBean[] persons, java.lang.String personID)
persons
- the list of personspersonID
- the persons idpublic static java.lang.String findDisplayValue(WSSortedOptionBean[] sortedOptions, java.lang.String optionID)
sortedOptions
- the list of sorted optionsoptionID
- the selected options idpublic static java.lang.String findDisplayValue(WSStateOptionBean[] stateOptions, java.lang.String stateID)
stateOptions
- the list of statesstateID
- the selected state