com.atlassian.jira.user.preferences
Class DefaultUserPreferencesManager

java.lang.Object
  extended by com.atlassian.jira.user.preferences.DefaultUserPreferencesManager
All Implemented Interfaces:
Startable, UserPreferencesManager

public class DefaultUserPreferencesManager
extends Object
implements UserPreferencesManager, Startable

A simple implementation to cache user preferences objects.


Constructor Summary
DefaultUserPreferencesManager(com.atlassian.event.api.EventPublisher eventPublisher)
           
 
Method Summary
 void clearCache()
          Clear all cached preferences.
 void clearCache(String username)
          Clear any cached preferences for a given username.
 com.atlassian.core.user.preferences.Preferences getPreferences(com.atlassian.crowd.embedded.api.User user)
           
 void onClearCache(ClearCacheEvent event)
           
 void start()
          This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultUserPreferencesManager

public DefaultUserPreferencesManager(com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail

start

public void start()
           throws Exception
Description copied from interface: Startable
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.

Specified by:
start in interface Startable
Throws:
Exception - Allows implementations to throw an Exception.

onClearCache

@EventListener
public void onClearCache(ClearCacheEvent event)

getPreferences

public com.atlassian.core.user.preferences.Preferences getPreferences(com.atlassian.crowd.embedded.api.User user)
Specified by:
getPreferences in interface UserPreferencesManager
Returns:
The user preferences for a user, or null if the user is null

clearCache

public void clearCache(String username)
Description copied from interface: UserPreferencesManager
Clear any cached preferences for a given username.

Specified by:
clearCache in interface UserPreferencesManager

clearCache

public void clearCache()
Description copied from interface: UserPreferencesManager
Clear all cached preferences.

Specified by:
clearCache in interface UserPreferencesManager


Copyright © 2002-2012 Atlassian. All Rights Reserved.