Class AnyGroupsManager
java.lang.Object
eu.c6.gibraltar.api.common.AbstractManager
eu.c6.gibraltar.api.managers.groups.AnyGroupsManager
Class to manage groups. Group identifier (group ID) is the group name.
-
Field Summary
Fields inherited from class eu.c6.gibraltar.api.common.AbstractManager
APPLICATION_XLS, APPLICATION_XLS_TYPE, APPLICATION_XLSX, APPLICATION_XLSX_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCreates the group with specified identifier, description, roles, group members and user members.booleanDelete the group with specified identifier.Gets the group item with its name.Gets the list of group items.getItemsAsExcel(boolean showTechnical, String search) Gets the list of group items as Excel stream output.getMembers(String groupId) Get recursively all the members of a group.booleanUpdate the group with specified identifier using description, roles, group members and user members.
-
Constructor Details
-
AnyGroupsManager
Instantiates a new groups manager.- Parameters:
anySession- the Any user session
-
-
Method Details
-
getItemsAsExcel
Gets the list of group items as Excel stream output.- Parameters:
showTechnical- If TRUE the list will also contain technical groups. If FALSE the list will contain only public groups.search- Filters groups using fulltext search term. Use NULL to not filter. Performances can be affected when using a filter.- Returns:
- Excel file input stream (media type : "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
- Throws:
Exception- the exception if current user does not have permission to list groups.
-
getItems
Gets the list of group items.- Parameters:
showTechnical- the show technicalsearch- Filters groups using fulltext search term. Use NULL to not filter. Performances can be affected when using a filter.- Returns:
- the group items
- Throws:
Exception- the exception if current user does not have permission to list groups.- See Also:
-
get
Gets the group item with its name.- Parameters:
groupId- the group identifier- Returns:
- the group item
- Throws:
Exception- the exception if current user does not have permission to list groups or group does not exist.
-
getMembers
Get recursively all the members of a group.- Parameters:
groupId- the group identifier- Returns:
- the list of user names in the group and the ones in the sub groups
- Throws:
Exception- the exception if current user does not have permission to list groups or group does not exist
-
create
Creates the group with specified identifier, description, roles, group members and user members.- Parameters:
group- the group item. Group identifier is required and must be only composed with lower case characters, underscore and number. Group identifier maximum length is 128 characters.- Returns:
- true, if successfully created
- Throws:
Exception- the exception if current user does not have permission to create groups or group already exist.
-
update
Update the group with specified identifier using description, roles, group members and user members.- Parameters:
group- the group item to update. Will match group with specified group ID.- Returns:
- true, if successfully updated
- Throws:
Exception- the exception if current user does not have permission to update groups or group does not exist.
-
delete
Delete the group with specified identifier.- Parameters:
groupId- the group identifier- Returns:
- true, if successfully deleted
- Throws:
Exception- the exception if current user does not have permission to delete groups or group does not exist.
-