Class GroupIndexManager

java.lang.Object
com.jalios.jcms.AbstractIndexManager
com.jalios.jcms.GroupIndexManager

public class GroupIndexManager extends AbstractIndexManager
  • Method Details

    • getInstance

      public static GroupIndexManager getInstance()
    • getMemberSet

      public Set<Member> getMemberSet(Group group)
      Returns the member set associated to the given Group.
      Parameters:
      group - the Group
      Returns:
      the member set associated to the given Group.
      Since:
      jcms-6.0.0
    • addMember

      public boolean addMember(Group group, Member member)
      Adds the given Member to the given Group.
      Parameters:
      group - Group with which this member must be added.
      member - the Member
      Returns:
      true if this set did not already contain the specified element.
      Since:
      jcms-6.0.0
    • removeMember

      public boolean removeMember(Group group, Member member)
      Removes the given member for the given Group.
      Parameters:
      group - Group with which this content must be removed.
      member - Member to be removed from this set, if present.
      Returns:
      true if the set contained the specified element.
      Since:
      jcms-6.0.0
    • addMembers

      public boolean addMembers(Group group, Set<Member> memberSet)
      Adds the given Member to the given Group.
      Parameters:
      group - Group with which this member must be added.
      memberSet - Members to be added
      Returns:
      true if this set did not already contain the specified element.
      Since:
      jcms-9.0.5 JCMS-5821
    • removeMembers

      public boolean removeMembers(Group group, Set<Member> memberSet)
      Removes the given member for the given Group.
      Parameters:
      group - Group with which this content must be removed.
      memberSet - Members to be removed from this set, if present.
      Returns:
      true if the set contained the specified element.
      Since:
      jcms-9.0.5 JCMS-5821
    • getDeclaredMemberSet

      public Set<Member> getDeclaredMemberSet(Group group)
      Returns the member set associated to the given Group.
      Parameters:
      group - the Group
      Returns:
      the member set associated to the given Group.
      Since:
      jcms-6.0.0
    • addDeclaredMember

      public boolean addDeclaredMember(Group group, Member member)
      Adds the given Member to the given Group.
      Parameters:
      group - Group with which this member must be added.
      member - the Member
      Returns:
      true if this set did not already contain the specified element.
      Since:
      jcms-6.0.0
    • removeDeclaredMember

      public boolean removeDeclaredMember(Group group, Member member)
      Removes the given member for the given Group.
      Parameters:
      group - Group with which this content must be removed.
      member - Member to be removed from this set, if present.
      Returns:
      true if the set contained the specified element.
      Since:
      jcms-6.0.0
    • addDeclaredMembers

      public boolean addDeclaredMembers(Group group, Set<Member> memberSet)
      Adds the given Member to the given Group.
      Parameters:
      group - Group with which this member must be added.
      memberSet - Members to be added
      Returns:
      true if this set did not already contain the specified element.
      Since:
      jcms-9.0.5 JCMS-5821
    • removeDeclaredMembers

      public boolean removeDeclaredMembers(Group group, Set<Member> memberSet)
      Removes the given member for the given Group.
      Parameters:
      group - Group with which this content must be removed.
      memberSet - Members to be removed from this set, if present.
      Returns:
      true if the set contained the specified element.
      Since:
      jcms-9.0.5 JCMS-5821
    • getChildrenSet

      public Set<Group> getChildrenSet(Group group)
      Returns the children set associated to the given Group.
      Parameters:
      group - the Group
      Returns:
      the children set associated to the given Group.
      Since:
      jcms-6.0.0
    • refreshIndexForCreation

      public void refreshIndexForCreation(Group group)
      Specific update of indices while a group is currently created.
      Parameters:
      group - the group
      Since:
      jcms-6.0.2 jcms-6.1.0
    • refreshIndexForUpdate

      public void refreshIndexForUpdate(Group cloneOldGroup, Group group)
      Specific update of indices while a group is currently updated.
      Parameters:
      cloneOldGroup - a clone of the former group, before update is effective
      group - the stored group, already updated
      Since:
      jcms-6.0.2 jcms-6.1.0
    • refreshIndexForDelete

      public void refreshIndexForDelete(Group group)
      Specific update of indices while a group is currently deleted.
      Parameters:
      group - the stored group, to be deleted
      Since:
      jcms-6.1.1
    • refreshAllChildrenDescendantsAndAncestors

      public void refreshAllChildrenDescendantsAndAncestors(Group group, boolean add)
    • getDescendantSet

      public Set<Group> getDescendantSet(Group group)
      Returns the descendant set associated to the given Group.
      Parameters:
      group - the Group
      Returns:
      the descendant set associated to the given Group.
      Since:
      jcms-6.0.0
    • getAncestorSet

      public Set<Group> getAncestorSet(Group group)
      Returns the ancestor set associated to the given Group.
      Parameters:
      group - the Group
      Returns:
      the ancestor set associated to the given Group.
      Since:
      jcms-6.0.0
    • getAncestorAndMeSet

      public Set<Group> getAncestorAndMeSet(Group group)
      Returns the ancestor set associated to the given Group.
      Parameters:
      group - the Group
      Returns:
      the ancestor set associated to the given Group.
      Since:
      jcms-6.0.0
    • getAuthGroupPublicationSet

      public Set<Publication> getAuthGroupPublicationSet(Group group)
      Returns publications which authorized Groups is associated to the given Group.
      Parameters:
      group - the Group
      Returns:
      the ancestor set associated to the given Group.
      Since:
      jcms-9.0.5 jcms-10.0.2 JCMS-6305
    • addAuthGroupPublication

      public boolean addAuthGroupPublication(Group group, Publication pub)
      Adds the given Publication to the given Group.
      Parameters:
      group - Group with which this Publication must be added.
      pub - the publication
      Returns:
      true if this set did not already contain the specified element.
      Since:
      jcms-9.0.5 jcms-10.0.2 JCMS-6305
    • removeAuthGroupPublication

      public boolean removeAuthGroupPublication(Group group, Publication pub)
      Removes the given Publication for the given Group.
      Parameters:
      group - Group with which this content must be removed.
      pub - Publication to be removed from this set, if present.
      Returns:
      true if the set contained the specified element.
      Since:
      jcms-9.0.5 jcms-10.0.2 JCMS-6305
    • getAuthGroupCategorySet

      public Set<Category> getAuthGroupCategorySet(Group group)
      Parameters:
      group - the group to het its referrers.
      Returns:
      the Categories using this group in their read right group field.
      Since:
      jcms-9.0.5 jcms-10.0.2 JCMS-6305
    • getManager

      public Optional<String> getManager(Group grp)
      Returns the id of manager of the given group.
      Parameters:
      grp - the group
      Returns:
      the id of manager of the given group.
      Since:
      jcms-10.0.2
    • setManager

      public void setManager(Group grp, String managerId)
      Sets id of the manager of the given group.
      Parameters:
      grp - the group
      managerId - the id of the manager of the given group.
      Since:
      jcms-10.0.2
    • clearManagerIndex

      public void clearManagerIndex()
    • setNoManager

      public void setNoManager(Group grp)
    • removeManager

      public void removeManager(Group grp)
      Remove the given group form the manager map.
      Parameters:
      grp - the group
      Since:
      jcms-10.0.2
    • isExplicitGroupManager

      public boolean isExplicitGroupManager(Member mbr)
      Check if the specified member was specified at least once as declared manager of a Group.
      Parameters:
      mbr - the member to check
      Returns:
      true if member is manager of at least one Group, false if member is not a manager of any group
      Since:
      jcms-10.0.7 / JCMS-9477
      See Also:
    • getExplicitelyManagedGroupSet

      public Set<Group> getExplicitelyManagedGroupSet(Member mbr)
      Retrieve Groups who have the specified member as declared manager.
      Parameters:
      mbr - the manager
      Returns:
      a Collection of Group, never return null
      Since:
      jcms-10.0.7 / JCMS-9477