Class GroupService

java.lang.Object
org.codelibs.fess.app.service.GroupService

public class GroupService extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    protected org.codelibs.fess.mylasta.direction.FessConfig
    Configuration settings for the Fess application
    protected org.codelibs.fess.opensearch.user.exbhv.GroupBhv
    Behavior class for group database operations
    protected org.codelibs.fess.opensearch.user.exbhv.UserBhv
    Behavior class for user database operations
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for GroupService.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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>
    Retrieves a paginated list of groups based on the provided pager criteria.
    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.
    void
    store(org.codelibs.fess.opensearch.user.exentity.Group group)
    Stores a group by inserting or updating it in both LDAP and the database.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • groupBhv

      protected org.codelibs.fess.opensearch.user.exbhv.GroupBhv groupBhv
      Behavior class for group database operations
    • fessConfig

      protected org.codelibs.fess.mylasta.direction.FessConfig fessConfig
      Configuration settings for the Fess application
    • userBhv

      protected org.codelibs.fess.opensearch.user.exbhv.UserBhv userBhv
      Behavior class for user database operations
  • Constructor Details

    • GroupService

      public GroupService()
      Default constructor for GroupService.
  • Method Details

    • getGroupList

      public List<org.codelibs.fess.opensearch.user.exentity.Group> getGroupList(GroupPager groupPager)
      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 query
      groupPager - the pager containing search and filter criteria
    • getAvailableGroupList

      public List<org.codelibs.fess.opensearch.user.exentity.Group> 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