public class GroupRemoveChildMapper extends Object
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 children and not all children are being removed from all groups.
In all other cases the usage pattern for this class should be:
GroupRemoveChildMapper mapper = new GroupRemoveChildMapper(listOfGroupNamesToRemoveFrom);
mapper.registerForSelected(childNameWhoShouldBeRemovedFromGroups);
Constructor and Description |
---|
GroupRemoveChildMapper()
Creates the mapper with no default groups.
|
GroupRemoveChildMapper(List defaultGroupNames)
Creates the mapper with the given groups marked as default groups.
|
Modifier and Type | Method and Description |
---|---|
Iterator |
childIterator()
Provides an iterator over the childNames.
|
List |
getDefaultGroupNames()
Returns the default groups.
|
Collection |
getGroups(String childName)
Provides an unmodifiable collection of all registered groups for a child.
|
Iterator |
getGroupsIterator(String childName)
Provides an Iterator to loop over all registered groups for a child.
|
boolean |
isRemoveFromAllSelected(String childName)
Indicates that the given child is to be removed from all default groups.
|
GroupRemoveChildMapper |
register(String childName)
Registers the given childName to be removed from the configured list of default groups.
|
GroupRemoveChildMapper |
register(String childName,
Collection groupNames)
Registers the given childName to be removed from the specified group names.
|
GroupRemoveChildMapper |
register(String childName,
String groupName)
Registers the given childName to be removed from the specified groupName.
|
public GroupRemoveChildMapper()
public GroupRemoveChildMapper(List defaultGroupNames)
defaultGroupNames
- the defaultGroupNames.public GroupRemoveChildMapper register(String childName)
childName
- identifies the child to be removed from the default groups.public GroupRemoveChildMapper register(String childName, String groupName)
childName
- identifies the child to be removed from the default groups.groupName
- identifies the group to remove the child from.public GroupRemoveChildMapper register(String childName, Collection groupNames)
childName
- identifies the child to be removed from the default groups.groupNames
- a collection of groupNames that identify the groups to remove the child from.public boolean isRemoveFromAllSelected(String childName)
childName
- identifies the child to be removed from the default groups.public Iterator getGroupsIterator(String childName)
childName
- identifies the child whose groups we want to iterate over.public Collection getGroups(String childName)
childName
- identifies the child to be removed from the default groups.public Iterator childIterator()
public List getDefaultGroupNames()
Copyright © 2002-2017 Atlassian. All Rights Reserved.