com.atlassian.jira.user.util
Class DefaultUserManager

java.lang.Object
  extended by com.atlassian.jira.user.util.DefaultUserManager
All Implemented Interfaces:
Startable, UserManager

public class DefaultUserManager
extends java.lang.Object
implements UserManager, Startable


Constructor Summary
DefaultUserManager(com.opensymphony.user.UserManager osuserManager, com.atlassian.event.api.EventPublisher eventPublisher)
          Use the static factory method if you are simply passing the current user manager singleton
 
Method Summary
static UserManager get()
          Static factory method.
 java.util.Set<com.opensymphony.user.Group> getAllGroups()
          Returns all groups defined in JIRA.
 java.util.Set<com.opensymphony.user.User> getAllUsers()
          Returns all users defined in JIRA, regardless of whether they are active or not.
 com.opensymphony.user.Group getGroup(java.lang.String groupName)
          Returns a Group based on user name.
 int getTotalUserCount()
          Returns the total number of users defined in JIRA, regardless of whether they are active or not.
 com.opensymphony.user.User getUser(java.lang.String userName)
          Returns a User based on user name.
 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

DefaultUserManager

public DefaultUserManager(com.opensymphony.user.UserManager osuserManager,
                          com.atlassian.event.api.EventPublisher eventPublisher)
Use the static factory method if you are simply passing the current user manager singleton

Parameters:
osuserManager - the osuser user manager
eventPublisher -
Method Detail

get

public static UserManager get()
Static factory method.

Returns:
a new instance of SimpleUserUtil.

start

public void start()
           throws java.lang.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:
java.lang.Exception - Allows implementations to throw an Exception.

onClearCache

@EventListener
public void onClearCache(ClearCacheEvent event)

getTotalUserCount

public int getTotalUserCount()
Description copied from interface: UserManager
Returns the total number of users defined in JIRA, regardless of whether they are active or not.

Specified by:
getTotalUserCount in interface UserManager
Returns:
the total number of users defined in JIRA

getAllUsers

public java.util.Set<com.opensymphony.user.User> getAllUsers()
Description copied from interface: UserManager
Returns all users defined in JIRA, regardless of whether they are active or not.

Specified by:
getAllUsers in interface UserManager
Returns:
the set of all users

getUser

public com.opensymphony.user.User getUser(java.lang.String userName)
Description copied from interface: UserManager
Returns a User based on user name.

Specified by:
getUser in interface UserManager
Parameters:
userName - the user name of the user
Returns:
the User object, or null if the user cannot be found including null userName.

getAllGroups

public java.util.Set<com.opensymphony.user.Group> getAllGroups()
Description copied from interface: UserManager
Returns all groups defined in JIRA.

Specified by:
getAllGroups in interface UserManager
Returns:
the set of all groups

getGroup

public com.opensymphony.user.Group getGroup(java.lang.String groupName)
Description copied from interface: UserManager
Returns a Group based on user name.

Specified by:
getGroup in interface UserManager
Parameters:
groupName - the user name of the group
Returns:
the Group object, or null if the user cannot be found including null groupName.


Copyright © 2002-2011 Atlassian. All Rights Reserved.