com.atlassian.jira.user
Interface UserPropertyManager

All Known Implementing Classes:
DefaultUserPropertyManager, MockUserPropertyManager

public interface UserPropertyManager

The manager allows the caller to get the PropertySet associated with a user. Property sets are live objects and changes to the property set are persisted when they occur. The properties that are stored in the user's property set are not part of the JIRA API, and modifying the property set directly may have unexpected side-effects. In most cases, it will make more sense to use the UserPreferencesManager to obtain a user's preferences, instead.

Since:
v4.3

Method Summary
 com.opensymphony.module.propertyset.PropertySet getPropertySet(ApplicationUser user)
          Get the property set associated with a user.
 com.opensymphony.module.propertyset.PropertySet getPropertySet(com.atlassian.crowd.embedded.api.User user)
          Deprecated. Use getPropertySet(ApplicationUser) or getPropertySetForUserKey(String) instead. Since v6.2.
 com.opensymphony.module.propertyset.PropertySet getPropertySetForUserKey(String userKey)
          Get the property set associated with a user.
 

Method Detail

getPropertySet

@Nonnull
com.opensymphony.module.propertyset.PropertySet getPropertySet(@Nonnull
                                                                       ApplicationUser user)
Get the property set associated with a user.

Parameters:
user - the user that the property set is associated with.
Returns:
the property set for this user
Throws:
IllegalArgumentException - if user is null
IllegalStateException - if the user does not have an ID mapping, which suggests that the user does not actually exist

getPropertySet

@Deprecated
@Nonnull
com.opensymphony.module.propertyset.PropertySet getPropertySet(@Nonnull
                                                                                  com.atlassian.crowd.embedded.api.User user)
Deprecated. Use getPropertySet(ApplicationUser) or getPropertySetForUserKey(String) instead. Since v6.2.

Get the property set associated with a user.

Parameters:
user - the user that the property set is associated with.
Returns:
property set
Throws:
IllegalArgumentException - if user is null
IllegalStateException - if the user does not have an ID mapping, which suggests that the user does not actually exist

getPropertySetForUserKey

@Nonnull
com.opensymphony.module.propertyset.PropertySet getPropertySetForUserKey(String userKey)
Get the property set associated with a user.

Parameters:
userKey - the key for the user that the property set is associated with.
Returns:
property set
Throws:
IllegalArgumentException - if userKey is null
IllegalStateException - if the user does not have an ID mapping, which suggests that the user does not actually exist


Copyright © 2002-2014 Atlassian. All Rights Reserved.