com.endeca.portal.format
Class TimeFormatter
java.lang.Object
com.endeca.portal.format.Formatter
com.endeca.portal.format.TimeFormatter
- All Implemented Interfaces:
- FormatSettings, TimeFormatSettings, java.io.Serializable
public class TimeFormatter
- extends Formatter
- implements TimeFormatSettings
Formatter for formatting Time type based on locale and format settings.
If the value of a format setting is DEFAULT, the value of the format setting of its parent will be used if it is not DEFAULT.
Otherwise, system default value of that format setting will be used.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DEFAULT_TIME_DISPLAY_FORMAT
public static final TimeFormatSettings.TimeDisplayFormat DEFAULT_TIME_DISPLAY_FORMAT
- Predefined system default time display format
TimeFormatter
public TimeFormatter()
getTimeDisplayFormat
public TimeFormatSettings.TimeDisplayFormat getTimeDisplayFormat()
- Specified by:
getTimeDisplayFormat in interface TimeFormatSettings
setTimeDisplayFormat
public void setTimeDisplayFormat(TimeFormatSettings.TimeDisplayFormat timeDisplayFormat)
getMergedTimeDisplayFormat
public TimeFormatSettings.TimeDisplayFormat getMergedTimeDisplayFormat()
- Specified by:
getMergedTimeDisplayFormat in interface TimeFormatSettings
getCachedJavaFormat
protected java.text.DateFormat getCachedJavaFormat()
clearCachedJavaFormat
protected void clearCachedJavaFormat()
createJavaFormat
protected void createJavaFormat()
localeChanged
protected void localeChanged()
- Description copied from class:
Formatter
- Subclasses can override this method to clear/reset some cached data that is dependent on locale, for example cached Java format.
- Overrides:
localeChanged in class Formatter
parentFormatSettingsChanged
protected void parentFormatSettingsChanged()
- Description copied from class:
Formatter
- Subclasses can override this method to clear/reset some cached data that is dependent on parent format settings,
for example cached Java format.
- Overrides:
parentFormatSettingsChanged in class Formatter
format
public java.lang.String format(java.lang.String rawString)
throws Formatter.FormatParseException
- Specified by:
format in class Formatter
- Throws:
Formatter.FormatParseException
format
public java.lang.String format(java.util.Date rawDate)