com.atlassian.core.user
Class GroupUtils

java.lang.Object
  extended by com.atlassian.core.user.GroupUtils

Deprecated. Use GroupManager instead. Since v4.4.

public class GroupUtils
extends Object

A utility class for operating on groups. This used to live in the atlassian-core library. This Class is deprecated and will be removed in JIRA v5.0 You should be using GroupManager to do group operations. If you cannot get this injected into your class and need static access, then use ComponentAccessor.getGroupManager().


Constructor Summary
GroupUtils()
          Deprecated.  
 
Method Summary
static boolean existsGroup(String name)
          Deprecated. A simple method to tell if a group already exists or not
static Group getGroup(String name)
          Deprecated. Get a group from the underlying user manager.
static Collection getGroups()
          Deprecated.  
static Group getGroupSafely(String name)
          Deprecated. This method gets a group from OSUser - however if the group does not exist, it tries to create it and then return it (mitigates the need for a setup file).
static void removeGroup(Group group)
          Deprecated. This will remove a group, and remove any users from that group
static void sortGroupNames(List groups)
          Deprecated. Sort group names in alphabetical (*not* ascii) order.
static void sortGroups(List groups)
          Deprecated. Sort group names in alphabetical (*not* ascii) order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupUtils

public GroupUtils()
Deprecated. 
Method Detail

getGroupSafely

public static Group getGroupSafely(String name)
                            throws ImmutableException
Deprecated. 
This method gets a group from OSUser - however if the group does not exist, it tries to create it and then return it (mitigates the need for a setup file).

Throws:
ImmutableException

getGroup

public static Group getGroup(String name)
Deprecated. 
Get a group from the underlying user manager.

Returns:
The Group from the underlying UserManager, or null if the group doesn't exist

existsGroup

public static boolean existsGroup(String name)
Deprecated. 
A simple method to tell if a group already exists or not


getGroups

public static Collection getGroups()
Deprecated. 
Returns:
A collection of all groups (sorted by name)

sortGroups

public static void sortGroups(List groups)
Deprecated. 
Sort group names in alphabetical (*not* ascii) order. This means that upper case and lower case characters are sorted together.

Parameters:
groups -

sortGroupNames

public static void sortGroupNames(List groups)
Deprecated. 
Sort group names in alphabetical (*not* ascii) order. This means that upper case and lower case characters are sorted together.

Parameters:
groups -

removeGroup

public static void removeGroup(Group group)
                        throws Exception
Deprecated. 
This will remove a group, and remove any users from that group

Throws:
Exception


Copyright © 2002-2011 Atlassian. All Rights Reserved.