Package com.atlassian.confluence.user
Class ConfluenceUserPreferences
- java.lang.Object
-
- com.atlassian.confluence.user.ConfluenceUserPreferences
-
public class ConfluenceUserPreferences extends Object
Provides strongly-typed accessors for Confluence user preferences. Use the no-args constructor for sensible defaults for anonymous user preferences.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConfluenceUserPreferences.PreferenceException
-
Constructor Summary
Constructors Constructor Description ConfluenceUserPreferences()Deprecated.since 8.8.ConfluenceUserPreferences(com.opensymphony.module.propertyset.PropertySet properties)Deprecated.since 8.8.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Optional<Boolean>getBoolean(String key)DateFormattergetDateFormatter(FormatSettingsManager formatSettingsManager, LocaleManager localeManager)Deprecated.LocalegetLocale()Returns the user's preferred locale, or null if the site default locale should be used.Optional<Long>getLong(String key)Optional<String>getString(String key)TimeZonegetTimeZone()UserPreferencesgetWrappedPreferences()Deprecated.since 8.8 No.booleanisShowDifferencesInNotificationEmails()booleanisWatchingOwnContent()voidremove(String key)voidsetBoolean(String key, boolean value)voidsetLong(String key, long value)voidsetString(String key, String value)voidsetTimeZone(String timeZoneID)
-
-
-
Constructor Detail
-
ConfluenceUserPreferences
@Deprecated public ConfluenceUserPreferences()
Deprecated.No-args constructor is used for anonymous user preferences
-
ConfluenceUserPreferences
@Deprecated public ConfluenceUserPreferences(com.opensymphony.module.propertyset.PropertySet properties)
Deprecated.- Parameters:
properties- the PropertySet containing a user's preferences
-
-
Method Detail
-
setString
public void setString(String key, String value) throws ConfluenceUserPreferences.PreferenceException
- Throws:
ConfluenceUserPreferences.PreferenceException- Since:
- 8.8
-
setLong
public void setLong(String key, long value) throws ConfluenceUserPreferences.PreferenceException
- Throws:
ConfluenceUserPreferences.PreferenceException- Since:
- 8.8
-
setBoolean
public void setBoolean(String key, boolean value) throws ConfluenceUserPreferences.PreferenceException
- Throws:
ConfluenceUserPreferences.PreferenceException- Since:
- 8.8
-
remove
public void remove(String key) throws ConfluenceUserPreferences.PreferenceException
- Throws:
ConfluenceUserPreferences.PreferenceException- Since:
- 8.8
-
getTimeZone
public TimeZone getTimeZone()
-
getDateFormatter
@Deprecated public DateFormatter getDateFormatter(FormatSettingsManager formatSettingsManager, LocaleManager localeManager)
Deprecated.
-
setTimeZone
public void setTimeZone(String timeZoneID) throws com.atlassian.core.AtlassianCoreException
- Throws:
com.atlassian.core.AtlassianCoreException
-
getLocale
public Locale getLocale()
Returns the user's preferred locale, or null if the site default locale should be used.
-
isShowDifferencesInNotificationEmails
public boolean isShowDifferencesInNotificationEmails()
-
isWatchingOwnContent
public boolean isWatchingOwnContent()
-
getWrappedPreferences
@Deprecated public UserPreferences getWrappedPreferences()
Deprecated.since 8.8 No. Just, no.
-
-