|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter 11g Release 1 (11.1.1.3.0) E15995-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.webcenter.generalsettings.internal.model.GSPreferences
oracle.webcenter.generalsettings.model.DateFormatSetting
public class DateFormatSetting
Shared Preferences for 'Date Style/Format' and 'Time Style/Format' Settings.
Nested Class Summary | |
---|---|
static class |
DateFormatSetting.DateTimeStyle The date and time styles to be used in the application. |
Field Summary | |
---|---|
static DateFormatSetting.DateTimeStyle |
DEFAULT_DATE_STYLE The default date style when no preference exists (DateTypeStyle.SHORT). |
static DateFormatSetting.DateTimeStyle |
DEFAULT_TIME_STYLE The default time style when no preference exists (DateTypeStyle.SHORT). |
static java.lang.String |
PREFERRED_DATE_PATTERN_KEY Internal preference key used to store the date pattern preference. |
static java.lang.String |
PREFERRED_DATE_STYLE_KEY Internal preference key used to store the date style preference. |
static java.lang.String |
PREFERRED_DATETIME_PATTERN_KEY Internal preference key used to store the date-time pattern preference. |
static java.lang.String |
PREFERRED_TIME_PATTERN_KEY Internal preference key used to store the time pattern preference. |
static java.lang.String |
PREFERRED_TIME_STYLE_KEY Internal preference key used to store the time style preference. |
static java.lang.String |
TYPE_BOTH Used in getPreferredPatternByType() to indicate to return the preferred time and date pattern. |
static java.lang.String |
TYPE_DATE Used in getPreferredPatternByType() to indicate to return the preferred date pattern. |
static java.lang.String |
TYPE_TIME Used in getPreferredPatternByType() to indicate to return the preferred time pattern. |
Fields inherited from class oracle.webcenter.generalsettings.internal.model.GSPreferences |
---|
NULL_VALUE |
Constructor Summary | |
---|---|
DateFormatSetting() |
Method Summary | |
---|---|
static java.lang.String |
getDatePattern() Returns the user's preferred date format pattern if it has been set, else, returns null. |
static DateFormatSetting.DateTimeStyle |
getDateStyle() Returns the user's preferred date style or a default value if no preference exists. |
static java.text.DateFormat |
getDateTimeFormatter() Get a DateFormat object with the user's preferred timezone applied, to format a date/time in the user's preferred date and time format. |
static java.lang.String |
getDateTimePattern() If both a date and time pattern preference exist then returns a pattern representing datePattern+timePattern, if either or both are null, returns null. |
static java.lang.String |
getFormattedCurrentDate() Get the current date, with the user's preferred timezone applied, and formatted in the user's preferred date format. |
static java.lang.String |
getFormattedCurrentDateTime() Get the current date and time, with the user's preferred timezone applied, and formatted in the user's preferred date and time format. |
static java.lang.String |
getFormattedCurrentTime() Get the current time, with the user's preferred timezone applied, and formatted in the user's preferred time format. |
static java.lang.String |
getFormattedDate(java.util.Date date) Get the given date, with the user's preferred timezone applied, and formatted in the user's preferred date format. |
static java.lang.String |
getFormattedDateTime(java.util.Calendar dateTime) Get the given date and time, with the user's preferred timezone applied, and formatted in the user's preferred date and time format. |
static java.lang.String |
getFormattedDateTime(java.util.Date dateTime) Get the given date and time, with the user's preferred timezone applied, and formatted in the user's preferred date and time format. |
static java.lang.String |
getFormattedTime(java.util.Date time) Get the given time, with the user's preferred timezone applied, and formatted in the user's preferred time format. |
static java.lang.String |
getPreferredPatternByType(java.lang.String type) Get the preferred pattern based on the given 'type' parameter value. |
static java.lang.String |
getSystemDatePatternPreference() Return the system date format pattern preference or null if no preference exists. |
static DateFormatSetting.DateTimeStyle |
getSystemDateStylePreference() Return the system date style preference or null if no preference exists. |
static java.lang.String |
getSystemTimePatternPreference() Return the system time pattern preference or null if no preference exists. |
static DateFormatSetting.DateTimeStyle |
getSystemTimeStylePreference() Return the system time style preference or null if no preference exists. |
static java.lang.String |
getTimePattern() Get the user's preferred time pattern if it has been set, otherwise return null. |
static DateFormatSetting.DateTimeStyle |
getTimeStyle() Returns the user's preferred time style or a default value if no preference exists. |
static java.text.DateFormat |
getUserDateFormat() Returns a DateFormat based on the user's date style preference, locale and TimeZone. |
static java.lang.String |
getUserDatePatternPreference() Returns the user's date format pattern preference or null if no preference exists. |
static DateFormatSetting.DateTimeStyle |
getUserDateStylePreference() Return the user's date style preference or null if no preference exists for the the user. |
static java.text.DateFormat |
getUserDateTimeFormat() Returns a DateFormat based on the user's date and time style preference, locale and TimeZone. |
static java.lang.String |
getUserDateTimePatternPreference() Gets the user's combined date-time format pattern preference, or null if it is not set. |
static java.text.DateFormat |
getUserTimeFormat() Returns a DateFormat based on the user's time style preference, locale and TimeZone. |
static java.lang.String |
getUserTimePatternPreference() Return the user's time format pattern preference or null if no preference exists for the the user. |
static DateFormatSetting.DateTimeStyle |
getUserTimeStylePreference() Return the user's time style preference or null if no preference exists for the the user. |
static void |
setSystemDatePatternPreference(java.lang.String pattern) Set the default date format pattern for the application. |
static void |
setSystemDateStylePreference(DateFormatSetting.DateTimeStyle dateStyle) Set the default date style for the application. |
static void |
setSystemTimePatternPreference(java.lang.String pattern) Set the default time format pattern for the application. |
static void |
setSystemTimeStylePreference(DateFormatSetting.DateTimeStyle timeStyle) Set the default time style for the application. |
static void |
setUserDatePatternPreference(java.lang.String pattern) Set the preferred date format pattern for the current user. |
static void |
setUserDateStylePreference(DateFormatSetting.DateTimeStyle dateStyle) Set the preferred date style for the current user. |
static void |
setUserDateTimePatternPreference(java.lang.String pattern) Sets the user's combined date-time format pattern preference. |
static void |
setUserTimePatternPreference(java.lang.String pattern) Sets the user's preferred time pattern preference to the given pattern. |
static void |
setUserTimeStylePreference(DateFormatSetting.DateTimeStyle timeStyle) Set the preferred time style preference for the current user. |
Methods inherited from class oracle.webcenter.generalsettings.internal.model.GSPreferences |
---|
getPreferred, getProvider, getSystemPref, getUserPref, setSystemPref, setUserPref |
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 PREFERRED_TIME_STYLE_KEY
public static final java.lang.String PREFERRED_DATE_STYLE_KEY
public static final java.lang.String PREFERRED_TIME_PATTERN_KEY
public static final java.lang.String PREFERRED_DATE_PATTERN_KEY
public static final java.lang.String PREFERRED_DATETIME_PATTERN_KEY
public static final java.lang.String TYPE_DATE
getPreferredPatternByType(String)
, Constant Field Valuespublic static final java.lang.String TYPE_TIME
getPreferredPatternByType(String)
, Constant Field Valuespublic static final java.lang.String TYPE_BOTH
getPreferredPatternByType(String)
, Constant Field Valuespublic static final DateFormatSetting.DateTimeStyle DEFAULT_DATE_STYLE
public static final DateFormatSetting.DateTimeStyle DEFAULT_TIME_STYLE
Constructor Detail |
---|
public DateFormatSetting()
Method Detail |
---|
public static DateFormatSetting.DateTimeStyle getTimeStyle()
public static java.lang.String getTimePattern()
public static DateFormatSetting.DateTimeStyle getUserTimeStylePreference()
public static java.lang.String getUserTimePatternPreference()
public static void setUserTimeStylePreference(DateFormatSetting.DateTimeStyle timeStyle)
timeStyle
- the time style string chosen by the userpublic static void setUserTimePatternPreference(java.lang.String pattern)
pattern
- the time pattern to setpublic static DateFormatSetting.DateTimeStyle getSystemTimeStylePreference()
public static java.lang.String getSystemTimePatternPreference()
public static void setSystemTimeStylePreference(DateFormatSetting.DateTimeStyle timeStyle)
timeStyle
- the system time format preference for the applicationpublic static void setSystemTimePatternPreference(java.lang.String pattern)
pattern
- the system time format pattern preference for the applicationpublic static DateFormatSetting.DateTimeStyle getDateStyle()
public static java.lang.String getDatePattern()
public static DateFormatSetting.DateTimeStyle getUserDateStylePreference()
public static java.lang.String getUserDatePatternPreference()
public static void setUserDateStylePreference(DateFormatSetting.DateTimeStyle dateStyle)
dateStyle
- the time style string chosen by the userpublic static void setUserDatePatternPreference(java.lang.String pattern)
pattern
- the time pattern string chosen by the userpublic static DateFormatSetting.DateTimeStyle getSystemDateStylePreference()
public static java.lang.String getSystemDatePatternPreference()
public static void setSystemDateStylePreference(DateFormatSetting.DateTimeStyle dateStyle)
dateStyle
- the system date style preference for the applicationpublic static void setSystemDatePatternPreference(java.lang.String pattern)
pattern
- the system date format pattern preference for the applicationpublic static java.lang.String getDateTimePattern()
public static void setUserDateTimePatternPreference(java.lang.String pattern)
pattern
- the combined date-time format pattern to setpublic static java.lang.String getUserDateTimePatternPreference()
public static java.text.DateFormat getUserDateFormat()
public static java.text.DateFormat getUserTimeFormat()
public static java.text.DateFormat getUserDateTimeFormat()
public static java.lang.String getFormattedDate(java.util.Date date)
public static java.lang.String getFormattedTime(java.util.Date time)
public static java.lang.String getFormattedCurrentDate()
public static java.lang.String getFormattedCurrentTime()
public static java.text.DateFormat getDateTimeFormatter()
public static java.lang.String getFormattedDateTime(java.util.Date dateTime)
public static java.lang.String getFormattedDateTime(java.util.Calendar dateTime)
public static java.lang.String getFormattedCurrentDateTime()
public static java.lang.String getPreferredPatternByType(java.lang.String type)
type
- one of 'date', 'time', or 'both' (see TYPE_ constants)TYPE_DATE
, TYPE_TIME
, If not found, this API will return null.
|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter 11g Release 1 (11.1.1.3.0) E15995-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |