|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.8.0) E15995-07 |
||||||||
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 Provides the date and time styles in an application. |
Field Summary | |
---|---|
static DateFormatSetting.DateTimeStyle |
DEFAULT_DATE_STYLE The default date style when no preference is set (DateTypeStyle.SHORT). |
static DateFormatSetting.DateTimeStyle |
DEFAULT_TIME_STYLE The default time style when no preference is set (DateTypeStyle.SHORT). |
static java.lang.String |
PREFERRED_DATE_PATTERN_KEY Internal preference key to store the date pattern preference. |
static java.lang.String |
PREFERRED_DATE_STYLE_KEY Internal preference key to store the date style preference. |
static java.lang.String |
PREFERRED_DATETIME_PATTERN_KEY Internal preference key to store the date-time pattern preference. |
static java.lang.String |
PREFERRED_TIME_PATTERN_KEY Internal preference key to store the time pattern preference. |
static java.lang.String |
PREFERRED_TIME_STYLE_KEY Internal preference key to store the time style preference. |
static java.lang.String |
TYPE_BOTH Used with getPreferredPatternByType() to return the preferred time and date pattern. |
static java.lang.String |
TYPE_DATE Used with getPreferredPatternByType() to return the preferred date pattern. |
static java.lang.String |
TYPE_TIME Used with getPreferredPatternByType() 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() Gets the current user's preferred date pattern. |
static java.lang.String |
getDatePattern(java.lang.String username) Gets the given user's preferred date pattern. |
static DateFormatSetting.DateTimeStyle |
getDateStyle() Returns the current user's preferred date style. |
static DateFormatSetting.DateTimeStyle |
getDateStyle(java.lang.String username) Returns the given user's preferred date style. |
static java.text.DateFormat |
getDateTimeFormatter() Gets a DateFormat object with the current user's preferred timezone, date and time format applied. |
static java.text.DateFormat |
getDateTimeFormatter(java.lang.String username) Gets a DateFormat object with the given user's preferred timezone, date and time format applied. |
static java.lang.String |
getDateTimePattern() If a date and time pattern preference is set for the current user then returns a pattern representing datePattern+timePattern. |
static java.lang.String |
getDateTimePattern(java.lang.String username) If a date and time pattern preference is set for the given user then returns a pattern representing datePattern+timePattern. |
static java.lang.String |
getFormattedCurrentDate() Gets the current date in the current user's preferred timezone and date format. |
static java.lang.String |
getFormattedCurrentDate(java.lang.String username) Gets the current date in the given user's preferred timezone and date format. |
static java.lang.String |
getFormattedCurrentDateTime() Gets the current date and time in the current user's preferred timezone, date and time format. |
static java.lang.String |
getFormattedCurrentDateTime(java.lang.String username) Gets the current date and time in the given user's preferred timezone, date and time format. |
static java.lang.String |
getFormattedCurrentTime() Gets the current time in the user's preferred timezone and time format. |
static java.lang.String |
getFormattedCurrentTime(java.lang.String username) Gets the current time in the user's preferred timezone and time format. |
static java.lang.String |
getFormattedDate(java.util.Date date) Gets the given date in the current user's preferred timezone and date format. |
static java.lang.String |
getFormattedDate(java.lang.String username, java.util.Date date) Gets the given date in the given user's preferred timezone and date format. |
static java.lang.String |
getFormattedDateTime(java.util.Calendar dateTime) Gets the given date and time in the current user's preferred timezone, date and time format. |
static java.lang.String |
getFormattedDateTime(java.util.Date dateTime) Gets the given date and time in the current user's preferred timezone, date and time format. |
static java.lang.String |
getFormattedDateTime(java.lang.String username, java.util.Calendar dateTime) Gets the given date and time in the given user's preferred timezone, date and time format. |
static java.lang.String |
getFormattedDateTime(java.lang.String username, java.util.Date dateTime) Gets the given date and time in the given user's preferred timezone, date and time format. |
static java.lang.String |
getFormattedTime(java.util.Date time) Gets the given time in the current user's preferred timezone and time format. |
static java.lang.String |
getFormattedTime(java.lang.String username, java.util.Date time) Gets the given time in the given user's preferred timezone and time format. |
static java.lang.String |
getPreferredPatternByType(java.lang.String type) Gets the preferred pattern for the current user based on the type parameter value. |
static java.lang.String |
getPreferredPatternByType(java.lang.String username, java.lang.String type) Get the preferred pattern for the given user based on the given type parameter value. |
static java.lang.String |
getSystemDatePatternPreference() Returns the system date format pattern preference for the application. |
static DateFormatSetting.DateTimeStyle |
getSystemDateStylePreference() Returns the system date style preference for the application. |
static java.lang.String |
getSystemTimePatternPreference() Returns the system time pattern preference for the application. |
static DateFormatSetting.DateTimeStyle |
getSystemTimeStylePreference() Returns the system time style preference for the application. |
static java.lang.String |
getTimePattern() Gets the current user's preferred time pattern. |
static java.lang.String |
getTimePattern(java.lang.String username) Gets the given user's preferred time pattern. |
static DateFormatSetting.DateTimeStyle |
getTimeStyle() Returns the current user's preferred time style. |
static DateFormatSetting.DateTimeStyle |
getTimeStyle(java.lang.String username) Returns the given user's preferred time style. |
static java.text.DateFormat |
getUserDateFormat() Returns a DateFormat based on the current user's date style preference, locale and time zone. |
static java.text.DateFormat |
getUserDateFormat(java.lang.String username) Returns a DateFormat based on the given user's date style preference, locale and time zone. |
static java.lang.String |
getUserDatePatternPreference() Returns the current user's date pattern preference. |
static java.lang.String |
getUserDatePatternPreference(java.lang.String username) Returns the current user's date pattern preference. |
static DateFormatSetting.DateTimeStyle |
getUserDateStylePreference() Returns the given user's date style preference. |
static DateFormatSetting.DateTimeStyle |
getUserDateStylePreference(java.lang.String username) Returns the given user's date style preference. |
static java.text.DateFormat |
getUserDateTimeFormat() Returns a DateFormat based on the current user's date and time style preference, locale and time zone. |
static java.text.DateFormat |
getUserDateTimeFormat(java.lang.String username) Returns a DateFormat based on the given user's date and time style preference, locale and TimeZone. |
static java.lang.String |
getUserDateTimePatternPreference() Gets the current user's combined date and time format pattern preferences. |
static java.lang.String |
getUserDateTimePatternPreference(java.lang.String username) Gets the given user's combined date and time format pattern preferences. |
static java.text.DateFormat |
getUserTimeFormat() Returns a DateFormat based on the current user's time style preference, locale and time zone. |
static java.text.DateFormat |
getUserTimeFormat(java.lang.String username) Returns a DateFormat based on the given user's time style preference, locale and time zone. |
static java.lang.String |
getUserTimePatternPreference() Returns the current user's time pattern preference. |
static java.lang.String |
getUserTimePatternPreference(java.lang.String username) Returns the given user's time pattern preference. |
static DateFormatSetting.DateTimeStyle |
getUserTimeStylePreference() Returns the current user's time style preference. |
static DateFormatSetting.DateTimeStyle |
getUserTimeStylePreference(java.lang.String username) Returns the given user's time style preference. |
static void |
setSystemDatePatternPreference(java.lang.String pattern) Sets the default date format pattern for the application. |
static void |
setSystemDateStylePreference(DateFormatSetting.DateTimeStyle dateStyle) Sets the default date style for the application. |
static void |
setSystemTimePatternPreference(java.lang.String pattern) Sets the default time format pattern for the application. |
static void |
setSystemTimeStylePreference(DateFormatSetting.DateTimeStyle timeStyle) Sets the default time style for the application. |
static void |
setUserDatePatternPreference(java.lang.String pattern) Sets the preferred date pattern for the current user. |
static void |
setUserDatePatternPreference(java.lang.String username, java.lang.String pattern) Sets the preferred date pattern for the given user. |
static void |
setUserDateStylePreference(DateFormatSetting.DateTimeStyle dateStyle) Sets the preferred date style for the username. |
static void |
setUserDateStylePreference(java.lang.String username, DateFormatSetting.DateTimeStyle dateStyle) Sets the preferred date style for the username. |
static void |
setUserDateTimePatternPreference(java.lang.String pattern) Sets the user's combined date and time format pattern preference. |
static void |
setUserDateTimePatternPreference(java.lang.String username, java.lang.String pattern) Sets the user's combined date and time format pattern preference. |
static void |
setUserTimePatternPreference(java.lang.String pattern) Sets the time pattern preference for the current user. |
static void |
setUserTimePatternPreference(java.lang.String username, java.lang.String pattern) Sets the time style preference for the current user. |
static void |
setUserTimeStylePreference(DateFormatSetting.DateTimeStyle timeStyle) Sets the time style preference for the current user. |
static void |
setUserTimeStylePreference(java.lang.String username, DateFormatSetting.DateTimeStyle timeStyle) Sets the time style preference for the given user. |
Methods inherited from class oracle.webcenter.generalsettings.internal.model.GSPreferences |
---|
getPreferred, getPreferred, getProvider, getSystemPref, getUserPref, getUserPref, log, 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()
DateTimeStyle
enum for the Time component. This enum provides the 'short', 'medium', 'long', 'full' setting. The value returned by the getValue()
method of DateTimeStyle
can be used directly in the timeStyle
attribute of af:convertDateTime
or f:convertDateTime
tags. This value, along with an appropriate value for the locale attribute, will format/parse your date output/input in accordance with the current locale.public static DateFormatSetting.DateTimeStyle getTimeStyle(java.lang.String username)
DateTimeStyle
enum for the Time component. This enum provides the 'short', 'medium', 'long', 'full' setting. The value returned by the getValue()
method of DateTimeStyle
can be used directly in the timeStyle
attribute of af:convertDateTime
or f:convertDateTime
tags. This value, along with an appropriate value for the locale attribute, will format/parse your date output/input in accordance with the current locale.username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static java.lang.String getTimePattern()
getTimeStyle()
should be used in preference to this API.public static java.lang.String getTimePattern(java.lang.String username)
getTimeStyle()
should be used in preference to this API.username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static DateFormatSetting.DateTimeStyle getUserTimeStylePreference()
getTimeStyle()
API should be used.public static DateFormatSetting.DateTimeStyle getUserTimeStylePreference(java.lang.String username)
getTimeStyle()
API must be used.username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static java.lang.String getUserTimePatternPreference()
getTimePattern()
API must be used.public static java.lang.String getUserTimePatternPreference(java.lang.String username)
getTimePattern()
API must be used.username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static void setUserTimeStylePreference(DateFormatSetting.DateTimeStyle timeStyle)
timeStyle
- the time style string chosen by the userpublic static void setUserTimeStylePreference(java.lang.String username, DateFormatSetting.DateTimeStyle timeStyle)
username
- the username to set the preference for. If null, sets the preference for the current authenticated usertimeStyle
- the time style string chosen by the userpublic static void setUserTimePatternPreference(java.lang.String pattern)
pattern
- the time pattern to setpublic static void setUserTimePatternPreference(java.lang.String username, java.lang.String pattern)
username
- the username to set the preference for. If null, sets the preference for the current authenticated userpattern
- 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()
DateTimeStyle
enum for the Date component. This enum provides the 'short', 'medium', 'long', 'full' setting. The value returned by the getValue()
method of DateTimeStyle
can be used directly in the dateStyle
attribute of af:convertDateTime
or f:convertDateTime
tags. This value, along with an appropriate value for the locale attribute, will format/parse your date output/input in accordance with the current locale.public static DateFormatSetting.DateTimeStyle getDateStyle(java.lang.String username)
DateTimeStyle
enum for the Date component. This enum provides the 'short', 'medium', 'long', 'full' setting. The value returned by the getValue()
method of DateTimeStyle
can be used directly in the dateStyle
attribute of af:convertDateTime
or f:convertDateTime
tags. This value, along with an appropriate value for the locale attribute, will format/parse your date output/input in accordance with the current locale.username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static java.lang.String getDatePattern()
getDateStyle()
should be used in preference to this API.public static java.lang.String getDatePattern(java.lang.String username)
getDateStyle()
should be used in preference to this API.username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static DateFormatSetting.DateTimeStyle getUserDateStylePreference()
getDateStyle()
API must be used.public static DateFormatSetting.DateTimeStyle getUserDateStylePreference(java.lang.String username)
getDateStyle()
API must be used.username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static java.lang.String getUserDatePatternPreference()
getDatePattern()
API must be used.public static java.lang.String getUserDatePatternPreference(java.lang.String username)
getDatePattern()
API must be used.username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static void setUserDateStylePreference(DateFormatSetting.DateTimeStyle dateStyle)
dateStyle
- the date style string chosen by the userpublic static void setUserDateStylePreference(java.lang.String username, DateFormatSetting.DateTimeStyle dateStyle)
username
- the username to set the preference for. If null, sets the preference for the current authenticated userdateStyle
- the date style string chosen by the userpublic static void setUserDatePatternPreference(java.lang.String pattern)
pattern
- the date pattern string chosen by the userpublic static void setUserDatePatternPreference(java.lang.String username, java.lang.String pattern)
username
- the username to set the preference for. If null, sets the preference for the current authenticated userpattern
- the date 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 java.lang.String getDateTimePattern(java.lang.String username)
username
- the username to obtain the preferences for. If null, obtains the preferences for the current authenticated userpublic static void setUserDateTimePatternPreference(java.lang.String pattern)
pattern
- the combined date and time format pattern to setpublic static void setUserDateTimePatternPreference(java.lang.String username, java.lang.String pattern)
username
- the username to set the preference for. If null, sets the preference for the current authenticated userpattern
- the combined date-time format pattern to setpublic static java.lang.String getUserDateTimePatternPreference()
public static java.lang.String getUserDateTimePatternPreference(java.lang.String username)
username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static java.text.DateFormat getUserDateFormat()
public static java.text.DateFormat getUserDateFormat(java.lang.String username)
username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static java.text.DateFormat getUserTimeFormat()
public static java.text.DateFormat getUserTimeFormat(java.lang.String username)
username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static java.text.DateFormat getUserDateTimeFormat()
public static java.text.DateFormat getUserDateTimeFormat(java.lang.String username)
username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static java.lang.String getFormattedDate(java.util.Date date)
public static java.lang.String getFormattedDate(java.lang.String username, java.util.Date date)
username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static java.lang.String getFormattedTime(java.util.Date time)
public static java.lang.String getFormattedTime(java.lang.String username, java.util.Date time)
username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static java.lang.String getFormattedCurrentDate()
public static java.lang.String getFormattedCurrentDate(java.lang.String username)
username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static java.lang.String getFormattedCurrentTime()
public static java.lang.String getFormattedCurrentTime(java.lang.String username)
username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static java.text.DateFormat getDateTimeFormatter()
public static java.text.DateFormat getDateTimeFormatter(java.lang.String username)
username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static java.lang.String getFormattedDateTime(java.util.Date dateTime)
public static java.lang.String getFormattedDateTime(java.lang.String username, java.util.Date dateTime)
username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static java.lang.String getFormattedDateTime(java.util.Calendar dateTime)
public static java.lang.String getFormattedDateTime(java.lang.String username, java.util.Calendar dateTime)
username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static java.lang.String getFormattedCurrentDateTime()
public static java.lang.String getFormattedCurrentDateTime(java.lang.String username)
username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated userpublic static java.lang.String getPreferredPatternByType(java.lang.String type)
type
parameter value. Valid values for this parameter are: date, time
, and both
.type
- Either date, time
, or both
TYPE_DATE
, TYPE_TIME
, TYPE_BOTH
public static java.lang.String getPreferredPatternByType(java.lang.String username, java.lang.String type)
type
parameter value. Valid values for this parameter are: date, time
, and both
.username
- the username to obtain the preference for. If null, obtains the preference for the current authenticated usertype
- Either date, time
, or both
TYPE_DATE
, TYPE_TIME
, TYPE_BOTH
|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.8.0) E15995-07 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |