|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.bc.group.GroupRemoveUserMapper
public class GroupRemoveUserMapper
Holds the parameters that specify which users should be removed from which groups. Also holds a list of
default groups which users can be registered to be removed from.
This class is not threadsafe.
The only time you want to use the register methods and not the register(String)
method is
when you are updating multiple groups and multiple users and not all users are being removed from all groups.
In all other cases the usage pattern for this class should be:
GroupRemoveUserMapper mapper = new GroupRemoveUserMapper(listOfGroupNamesToRemoveFrom);
mapper.registerForSelected(userNameWhoShouldBeRemovedFromGroups);
Constructor Summary | |
---|---|
GroupRemoveUserMapper()
Creates the mapper with no default groups. |
|
GroupRemoveUserMapper(List defaultGroupNames)
Creates the mapper with the given groups marked as default groups. |
Method Summary | |
---|---|
List |
getDefaultGroupNames()
Returns the default groups. |
Collection |
getGroups(String userName)
Provides an unmodifiable collection of all registered groups for a user. |
Iterator |
getGroupsIterator(String userName)
Provides an Iterator to loop over all registered groups for a user. |
boolean |
isRemoveFromAllSelected(String userName)
Indicates that the given user is to be removed from all default groups. |
GroupRemoveUserMapper |
register(String userName)
Registers the given userName to be removed from the configured list of default groups. |
GroupRemoveUserMapper |
register(String userName,
Collection groupNames)
Registers the given userName to be removed from the specified group names. |
GroupRemoveUserMapper |
register(String userName,
String groupName)
Registers the given userName to be removed from the specified groupName. |
Iterator |
userIterator()
Provides an iterator over the userNames. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GroupRemoveUserMapper()
public GroupRemoveUserMapper(List defaultGroupNames)
defaultGroupNames
- the defaultGroupNames.Method Detail |
---|
public GroupRemoveUserMapper register(String userName)
userName
- identifies the user to be removed from the default groups.
public GroupRemoveUserMapper register(String userName, String groupName)
userName
- identifies the user to be removed from the default groups.groupName
- identifies the group to remove the user from.
public GroupRemoveUserMapper register(String userName, Collection groupNames)
userName
- identifies the user to be removed from the default groups.groupNames
- a collection of groupNames that identify the groups to remove the user from.
public boolean isRemoveFromAllSelected(String userName)
userName
- identifies the user to be removed from the default groups.
public Iterator getGroupsIterator(String userName)
userName
- identifies the user whose groups we want to iterate over.
public Collection getGroups(String userName)
userName
- identifies the user to be removed from the default groups.
public Iterator userIterator()
public List getDefaultGroupNames()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |