Package com.jalios.jcms
Class GroupIndexManager
- java.lang.Object
-
- com.jalios.jcms.AbstractIndexManager
-
- com.jalios.jcms.GroupIndexManager
-
public class GroupIndexManager extends AbstractIndexManager
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.jalios.jcms.AbstractIndexManager
AbstractIndexManager.DataIndex<D extends Data,C>, AbstractIndexManager.DataIndexMap<D extends Data,K,V>, AbstractIndexManager.DataIndexSet<D extends Data,E>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REVISION
-
Fields inherited from class com.jalios.jcms.AbstractIndexManager
channel
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAuthGroupPublication(Group group, Publication pub)
Adds the given Publication to the given Group.boolean
addDeclaredMember(Group group, Member member)
Adds the given Member to the given Group.boolean
addDeclaredMembers(Group group, java.util.Set<Member> memberSet)
Adds the given Member to the given Group.boolean
addMember(Group group, Member member)
Adds the given Member to the given Group.boolean
addMembers(Group group, java.util.Set<Member> memberSet)
Adds the given Member to the given Group.void
clearManagerIndex()
java.util.Set<Group>
getAncestorAndMeSet(Group group)
Returns the ancestor set associated to the given Group.java.util.Set<Group>
getAncestorSet(Group group)
Returns the ancestor set associated to the given Group.java.util.Set<Category>
getAuthGroupCategorySet(Group group)
java.util.Set<Publication>
getAuthGroupPublicationSet(Group group)
Returns publications which authorized Groups is associated to the given Group.java.util.Set<Group>
getChildrenSet(Group group)
Returns the children set associated to the given Group.java.util.Set<Member>
getDeclaredMemberSet(Group group)
Returns the member set associated to the given Group.java.util.Set<Group>
getDescendantSet(Group group)
Returns the descendant set associated to the given Group.java.util.Set<Group>
getExplicitelyManagedGroupSet(Member mbr)
Retrieve Groups who have the specified member as declared manager.static GroupIndexManager
getInstance()
java.util.Optional<java.lang.String>
getManager(Group grp)
Returns the id of manager of the given group.java.util.Set<Member>
getMemberSet(Group group)
Returns the member set associated to the given Group.boolean
isExplicitGroupManager(Member mbr)
Check if the specified member was specified at least once as declared manager of a Group.void
refreshAllChildrenDescendantsAndAncestors(Group group, boolean add)
void
refreshIndexForCreation(Group group)
Specific update of indices while a group is currently created.void
refreshIndexForDelete(Group group)
Specific update of indices while a group is currently deleted.void
refreshIndexForUpdate(Group cloneOldGroup, Group group)
Specific update of indices while a group is currently updated.boolean
removeAuthGroupPublication(Group group, Publication pub)
Removes the given Publication for the given Group.boolean
removeDeclaredMember(Group group, Member member)
Removes the given member for the given Group.boolean
removeDeclaredMembers(Group group, java.util.Set<Member> memberSet)
Removes the given member for the given Group.void
removeManager(Group grp)
Remove the given group form the manager map.boolean
removeMember(Group group, Member member)
Removes the given member for the given Group.boolean
removeMembers(Group group, java.util.Set<Member> memberSet)
Removes the given member for the given Group.void
setManager(Group grp, java.lang.String managerId)
Sets id of the manager of the given group.void
setNoManager(Group grp)
-
Methods inherited from class com.jalios.jcms.AbstractIndexManager
addIndexWithSet, addIndexWithSet, clearIndex, getIndexWithMap, getIndexWithMap, getIndexWithSet, getOriginalData, isUndefinedIndexWithSet, putIndexWithMap, removeIndexWithMap, removeIndexWithSet, removeIndexWithSet, setIndexWithSet
-
-
-
-
Field Detail
-
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static GroupIndexManager getInstance()
-
getMemberSet
public java.util.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, java.util.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, java.util.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 java.util.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, java.util.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, java.util.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 java.util.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 effectivegroup
- 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 java.util.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 java.util.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 java.util.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 java.util.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 java.util.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 java.util.Optional<java.lang.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, java.lang.String managerId)
Sets id of the manager of the given group.- Parameters:
grp
- the groupmanagerId
- 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:
MemberIndexManager.isExplicitMemberManager(Member)
-
-