com.atlassian.jira.user.preferences
Interface ExtendedPreferences

All Superinterfaces:
com.atlassian.core.user.preferences.Preferences
All Known Implementing Classes:
JiraUserPreferences

public interface ExtendedPreferences
extends com.atlassian.core.user.preferences.Preferences

Adding the abilities to store, retrieve text from property set and to check if preference is stored at all

Since:
v6.0

Method Summary
 boolean containsValue(String key)
          Checks if key exists (defaults doesn't count)
 boolean equals(Object other)
          Preferences objects are equal iff they are preferences for the same user.
 String getText(String key)
           
 String getUserKey()
          Returns the user's key, or null if the preferences are for an anonymous user.
 int hashCode()
          Returns a hash code based on the user's key, or 0 if the preferences are for an anonymous user.
 void setText(String key, String value)
           
 
Methods inherited from interface com.atlassian.core.user.preferences.Preferences
getBoolean, getLong, getString, remove, setBoolean, setLong, setString
 

Method Detail

getText

String getText(String key)

setText

void setText(String key,
             String value)
             throws com.atlassian.core.AtlassianCoreException
Throws:
com.atlassian.core.AtlassianCoreException

containsValue

boolean containsValue(String key)
Checks if key exists (defaults doesn't count)

Parameters:
key - key to be checked
Returns:
if value for key exists

getUserKey

String getUserKey()
Returns the user's key, or null if the preferences are for an anonymous user.

Returns:
the user's key, or null if the preferences are for an anonymous user.
Since:
6.2

equals

boolean equals(Object other)
Preferences objects are equal iff they are preferences for the same user.

Overrides:
equals in class Object
Parameters:
other - the object to check for equality
Returns:
true if the the preferences are for the same user; false otherwise

hashCode

int hashCode()
Returns a hash code based on the user's key, or 0 if the preferences are for an anonymous user.

Overrides:
hashCode in class Object
Returns:
a hash code based on the user's key, or 0 if the preferences are for an anonymous user.


Copyright © 2002-2014 Atlassian. All Rights Reserved.