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
.void
Removes 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.int
getLevel()
Returns the depth level of this group.getName()
Returns the name of this group ornull
if not set@Nullable Group
Returns the parent group of this group ornull
if this group is theroot group
boolean
hasId()
Indicates whether this group has an id or not.boolean
Indicates whether this group is selectable in the permission editor component or not.void
removeChild
(Group group) Removes the given group from the listvoid
removeId()
Removes the id of this group.void
Sets the id of this group.void
Sets the name for this group.void
setSelectable
(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 ornull
if this group is theroot group
- Returns:
- the parent of this group or
null
in case of thegroup root
- Since:
- 3.1.170
-
getLevel
int getLevel()Returns the depth level of this group. In case ofroot group
the 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:
true
if this group has an id,false
otherwise- Since:
- 3.1.170
-
getName
String getName()Returns the name of this group ornull
if 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 parent
and the last element is theroot group
this 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:
true
if this group is selectable in permission editor,false
otherwise- 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
- usetrue
to make this group selectable in permission editor,false
otherwise- Since:
- 3.1.170
- See Also:
-
getAllChildren()
instead