|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.jcrutil.converter.ConverterUtil
public class ConverterUtil
Utility class for path and date conversions between JCR and Slverpeas Pojo.
Field Summary | |
---|---|
static String |
PATH_SEPARATOR
Token used in path. |
static String |
SPACE_TOKEN
Token used to replace space in names. |
Constructor Summary | |
---|---|
ConverterUtil()
|
Method Summary | |
---|---|
static String |
convertFromJcrPath(String name)
Replace all SPACE_TOKEN to whitespace. |
static String |
convertToJcrPath(String name)
Replace all whitespace to SPACE_TOKEN. |
static String |
encodeJcrPath(String path)
Encodes the JCR path to a Xpath compatible path. |
static String |
escapeIllegalJcrChars(String name)
|
static String |
formatCalendarForXpath(Calendar date)
|
static String |
formatDate(Calendar calend)
Format a Calendar to a String of format yyyy/MM/dd. |
static String |
formatDate(Date date)
Format a Date to a String of format yyyy/MM/dd. |
static String |
formatDateForXpath(Date date)
|
static String |
formatTime(Calendar calend)
Format a Calendar to a String of format HH:mm. |
static String |
formatTime(Date date)
Format a Date to a String of format HH:mm. |
protected static String |
getTimeZone(Date date)
|
protected static String |
getXpathFormattedDate(Date date)
|
protected static String |
getXpathFormattedTime(Date date)
|
static Date |
parseDate(String date)
Parse a String of format yyyy/MM/dd and return the corresponding Date. |
static void |
setTime(Calendar calend,
String time)
Parse a String of format HH:mm and set the corresponding hours and minutes to the specified Calendar. |
static String |
unescapeQuote(String text)
Replace all %39 with the char' |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SPACE_TOKEN
public static final String PATH_SEPARATOR
Constructor Detail |
---|
public ConverterUtil()
Method Detail |
---|
public static final String encodeJcrPath(String path)
path
- the JCR path to be encoded for Xpath.
public static String convertToJcrPath(String name)
name
- the String o be converted.
public static String escapeIllegalJcrChars(String name)
public static String unescapeQuote(String text)
text
-
public static String convertFromJcrPath(String name)
name
- the String o be converted.
public static Date parseDate(String date) throws ParseException
date
- the String to be parsed.
ParseException
public static String formatDate(Date date)
date
- the date to be formatted.
public static String formatDate(Calendar calend)
calend
- the date to be formatted.
public static void setTime(Calendar calend, String time)
time
- the String to be parsed.calend
- the calendar to be updated.public static String formatTime(Date date)
date
- the date to be formatted.
public static String formatTime(Calendar calend)
calend
- the date to be formatted.
public static String formatDateForXpath(Date date)
public static String formatCalendarForXpath(Calendar date)
protected static String getTimeZone(Date date)
protected static String getXpathFormattedTime(Date date)
protected static String getXpathFormattedDate(Date date)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |