Interface Group
- All Known Subinterfaces:
GroupRoot
public interface Group
Interface representing a group used in the
permission service.- Since:
- 3.1.170
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionappendChild(String name) Creates a new group with the given name as child of this group and appends it to the list ofchildren.appendChild(String id, String name) Creates a new group with the given name and id as child of this group and appends it to the list ofchildren.voidRemoves all children of this group.Returns a list of all (recursive) group children of this group.Deprecated.Returns a list of all parents existing on the parent path of this group.Collection<? extends Group>Returns a collection of all direct sub group children.getId()Returns the id of this group.intgetLevel()Returns the depth level of this group.getName()Returns the name of this group ornullif not set@Nullable GroupReturns the parent group of this group ornullif this group is theroot groupbooleanhasId()Indicates whether this group has an id or not.booleanIndicates whether this group is selectable in the permission editor component or not.voidremoveChild(Group group) Removes the given group from the listvoidremoveId()Removes the id of this group.voidSets the id of this group.voidSets the name for this group.voidsetSelectable(boolean selectable) Make this group selectable in the permission editor component (true) or notfalse.
-
Method Details
-
getChildren
Collection<? extends Group> getChildren()Returns a collection of all direct sub group children.- Returns:
- a collection of direct sub groups.
- Since:
- 4.2.200
-
getParent
Returns the parent group of this group ornullif this group is theroot group- Returns:
- the parent of this group or
nullin case of thegroup root - Since:
- 3.1.170
-
getLevel
int getLevel()Returns the depth level of this group. In case ofroot groupthe level is0- Returns:
- the level of this group.
- Since:
- 3.1.324
-
getId
String getId()Returns the id of this group.- Returns:
- the id of this group.
- Since:
- 3.1.170
- See Also:
-
setId
Sets the id of this group.- Parameters:
id- the new id- Since:
- 3.1.170
- See Also:
-
removeId
void removeId()Removes the id of this group.- Since:
- 3.1.170
-
hasId
boolean hasId()Indicates whether this group has an id or not.- Returns:
trueif this group has an id,falseotherwise- Since:
- 3.1.170
-
getName
String getName()Returns the name of this group ornullif not set- Returns:
- the name of this group or
null - Since:
- 3.1.170
- See Also:
-
setName
Sets the name for this group.- Parameters:
name- the name to be used for this group.- Since:
- 3.1.170
- See Also:
-
removeChild
Removes the given group from the list- Parameters:
group- the group to remove- Since:
- 3.1.170
-
clearChildren
void clearChildren()Removes all children of this group.- Since:
- 4.2.200
-
getAllChilds
Deprecated.since 4.2.200 - usegetAllChildren()instead- Since:
- 3.1.170
-
getAllChildren
Returns a list of all (recursive) group children of this group.- Returns:
- a list of all (recursive) group children of this group
- Since:
- 4.2.200
- See Also:
-
getAllParents
Returns a list of all parents existing on the parent path of this group. The first element of returned list is thedirect parentand the last element is theroot groupthis group belongs to.- Returns:
- a list of all parents existing on the parent path.
- Since:
- 3.1.324
-
appendChild
Creates a new group with the given name as child of this group and appends it to the list ofchildren.- Parameters:
name- the name for the new group- Returns:
- the created group
- Since:
- 3.1.170
-
appendChild
Creates a new group with the given name and id as child of this group and appends it to the list ofchildren.- Parameters:
name- the name for the new groupid- the id for the new group- Returns:
- the created group
- Since:
- 3.1.170
-
isSelectable
boolean isSelectable()Indicates whether this group is selectable in the permission editor component or not.- Returns:
trueif this group is selectable in permission editor,falseotherwise- Since:
- 3.1.170
- See Also:
-
setSelectable
void setSelectable(boolean selectable) Make this group selectable in the permission editor component (true) or notfalse.- Parameters:
selectable- usetrueto make this group selectable in permission editor,falseotherwise- Since:
- 3.1.170
- See Also:
-
getAllChildren()instead