de.espirit.firstspirit.service.permission.groups
Interface Group

All Known Subinterfaces:
GroupRoot

public interface Group

Interface representing a group used in the permission service.

Since:
3.1.170
See Also:
GroupRoot

Method Summary
 Group appendChild(String name)
          Creates a new group with the given name as child of this group and appends it to the list of children.
 Group 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 of children.
 void clearChildren()
          Removes all children of this group.
 void clearChilds()
          Deprecated. since 4.2.200 - use Group.clearChildren() instead
 List<Group> getAllChildren()
          Returns a list of all (recursive) group children of this group.
 List<Group> getAllChilds()
          Deprecated. since 4.2.200 - use Group.getAllChildren() instead
 List<Group> getAllParents()
          Returns a list of all parents existing on the parent path of this group.
 Collection<? extends Group> getChildren()
          Returns a collection of all direct sub group children.
 Group[] getChilds()
          Deprecated. since 4.2.200 - use Group.getChildren() instead
 String getId()
          Returns the id of this group.
 int getLevel()
          Returns the depth level of this group.
 String getName()
          Returns the name of this group or null if not set
 Group getParent()
          Returns the parent group of this group or null if this group is the root group
 boolean hasId()
          Indicates whether this group has an id or not.
 boolean isSelectable()
          Indicates whether this group is selectable in the permission editor component or not.
 void removeChild(Group group)
          Removes the given group from the list
 void removeId()
          Removes the id of this group.
 void setId(String id)
          Sets the id of this group.
 void setName(String name)
          Sets the name for this group.
 void setSelectable(boolean selectable)
          Make this group selectable in the permission editor component (true) or not false.
 

Method Detail

getChilds

@Deprecated
Group[] getChilds()
Deprecated. since 4.2.200 - use Group.getChildren() instead

Returns an array of all direct sub groups.

Since:
3.1.170

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

@Nullable
Group getParent()
Returns the parent group of this group or null if this group is the root group

Returns:
the parent of this group or null in case of the group root
Since:
3.1.170

getLevel

int getLevel()
Returns the depth level of this group. In case of root group the level is 0

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:
GroupRoot.getGroupById(String)

setId

void setId(String id)
Sets the id of this group.

Parameters:
id - the new id
Since:
3.1.170
See Also:
GroupRoot.getGroupById(String)

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 or null if not set

Returns:
the name of this group or null
Since:
3.1.170
See Also:
Group.setName(String)

setName

void setName(String name)
Sets the name for this group.

Parameters:
name - the name to be used for this group.
Since:
3.1.170
See Also:
Group.getName()

removeChild

void removeChild(Group group)
Removes the given group from the list

Parameters:
group - the group to remove
Since:
3.1.170

clearChilds

@Deprecated
void clearChilds()
Deprecated. since 4.2.200 - use Group.clearChildren() instead

Since:
3.1.170

clearChildren

void clearChildren()
Removes all children of this group.

Since:
4.2.200

getAllChilds

@Deprecated
List<Group> getAllChilds()
Deprecated. since 4.2.200 - use Group.getAllChildren() instead

Since:
3.1.170

getAllChildren

@NotNull
List<Group> 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:
Group.getChildren()

getAllParents

List<Group> getAllParents()
Returns a list of all parents existing on the parent path of this group. The first element of returned list is the direct parent and the last element is the root group this group belongs to.

Returns:
a list of all parents existing on the parent path.
Since:
3.1.324

appendChild

Group appendChild(String name)
Creates a new group with the given name as child of this group and appends it to the list of children.

Parameters:
name - the name for the new group
Returns:
the created group
Since:
3.1.170

appendChild

Group 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 of children.

Parameters:
name - the name for the new group
id - 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:
Group.setSelectable(boolean)

setSelectable

void setSelectable(boolean selectable)
Make this group selectable in the permission editor component (true) or not false.

Parameters:
selectable - use true to make this group selectable in permission editor, false otherwise
Since:
3.1.170
See Also:
Group.isSelectable()


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480