Package org.codelibs.fess.app.service
Class GroupService
java.lang.Object
org.codelibs.fess.app.service.GroupService
Service class for managing group operations in the Fess application.
Provides CRUD operations for groups, including integration with LDAP manager
and user-group relationships. Handles group pagination, searching, and
maintaining data consistency between groups and associated users.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.codelibs.fess.mylasta.direction.FessConfigConfiguration settings for the Fess applicationprotected org.codelibs.fess.opensearch.user.exbhv.GroupBhvBehavior class for group database operationsprotected org.codelibs.fess.opensearch.user.exbhv.UserBhvBehavior class for user database operations -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(org.codelibs.fess.opensearch.user.exentity.Group group) Deletes a group from both LDAP and the database, and removes the group association from all users that belong to this group.List<org.codelibs.fess.opensearch.user.exentity.Group> Retrieves all available groups ordered by name in ascending order.org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.user.exentity.Group> Retrieves a specific group by its ID and applies LDAP manager settings.List<org.codelibs.fess.opensearch.user.exentity.Group> getGroupList(GroupPager groupPager) Retrieves a paginated list of groups based on the provided pager criteria.protected voidsetupListCondition(org.codelibs.fess.opensearch.user.cbean.GroupCB cb, GroupPager groupPager) Sets up the search conditions for group list queries based on pager criteria.voidstore(org.codelibs.fess.opensearch.user.exentity.Group group) Stores a group by inserting or updating it in both LDAP and the database.
-
Field Details
-
groupBhv
protected org.codelibs.fess.opensearch.user.exbhv.GroupBhv groupBhvBehavior class for group database operations -
fessConfig
protected org.codelibs.fess.mylasta.direction.FessConfig fessConfigConfiguration settings for the Fess application -
userBhv
protected org.codelibs.fess.opensearch.user.exbhv.UserBhv userBhvBehavior class for user database operations
-
-
Constructor Details
-
GroupService
public GroupService()Default constructor for GroupService.
-
-
Method Details
-
getGroupList
Retrieves a paginated list of groups based on the provided pager criteria. Updates the pager with pagination information including page numbers and ranges.- Parameters:
groupPager- the pager containing pagination and search criteria- Returns:
- a list of groups matching the criteria
-
getGroup
public org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.user.exentity.Group> getGroup(String id) Retrieves a specific group by its ID and applies LDAP manager settings.- Parameters:
id- the unique identifier of the group- Returns:
- an OptionalEntity containing the group if found, empty otherwise
-
store
public void store(org.codelibs.fess.opensearch.user.exentity.Group group) Stores a group by inserting or updating it in both LDAP and the database. Uses refresh policy to ensure immediate availability of the stored data.- Parameters:
group- the group entity to store
-
delete
public void delete(org.codelibs.fess.opensearch.user.exentity.Group group) Deletes a group from both LDAP and the database, and removes the group association from all users that belong to this group.- Parameters:
group- the group entity to delete
-
setupListCondition
protected void setupListCondition(org.codelibs.fess.opensearch.user.cbean.GroupCB cb, GroupPager groupPager) Sets up the search conditions for group list queries based on pager criteria. Configures the condition bean with ID filtering and ordering by name.- Parameters:
cb- the condition bean for building the querygroupPager- the pager containing search and filter criteria
-
getAvailableGroupList
Retrieves all available groups ordered by name in ascending order. Limited by the configured maximum fetch size for groups.- Returns:
- a list of all available groups
-