Class GroupListener

    • Field Detail

      • groupsInvalidationCounter

        public static long groupsInvalidationCounter
        Internal value used as version for track an increment counter of operation which may have invalidated DBMember.getGroups. It is used by DBMember.getGroups to check for its cache validity.
        Since:
        JCMS-6331
      • workspaceInvalidationCounter

        public static long workspaceInvalidationCounter
        Internal value used as version for track an increment counter of operation which may have invalidated DBMember.getWorkspaceSet. It is used by DBMember.getWorkspaceSet to check for its cache validity.
        Since:
        JCMS-6331
      • dn2GroupMap

        protected static final java.util.Map<java.lang.String,​Group> dn2GroupMap
    • Constructor Detail

      • GroupListener

        public GroupListener()
    • Method Detail

      • handleCommitUpdate

        public void handleCommitUpdate​(Storable storable,
                                       Storable oldStorable,
                                       boolean firstTime)
        Description copied from interface: StoreListener
        This method gets called when after a storable has been updated.
        Specified by:
        handleCommitUpdate in interface StoreListener
        Overrides:
        handleCommitUpdate in class BasicStoreListener
        Parameters:
        storable - the storable, this instance is the object that was created at first and that will be stored in jcms until deletion of the storable with this ID. You should always manipulate this object if you maintain any index.
        oldStorable - the previous version of the storable, it is a clone, do not use in any index, it should only be used to access old values.
        firstTime - true if it is the first time this operation is processed
        See Also:
        StoreListener.handleCommitUpdate(Storable, Storable, boolean)
      • updateMembers

        protected void updateMembers​(Group group)
        Invalidate canManageContent foreach members of this group
        Parameters:
        group - the group to be updated
      • updateWorkspaces

        protected void updateWorkspaces​(Group group,
                                        boolean add)
        Add Group to workspace groupSet
        Parameters:
        group - the group to be added/removed
        add - true means "add", false means "remove"
      • refreshWorkspacesMembers

        protected void refreshWorkspacesMembers​(Group group)
        Refresh member index of workspace
        Parameters:
        group - the group to refresh the members
        Since:
        jcms-5.6.2
      • addGroupInDnToGroupMap

        public static void addGroupInDnToGroupMap​(java.lang.String dn,
                                                  Group group)
        Add the given new group to the index of DN to Group Map.
        Parameters:
        dn - the LDAP DN of the Group, operation ignore if empty
        group - the Group, must not be null
        Since:
        jcms-5.7.0
      • updateDnToGroupMap

        public static void updateDnToGroupMap​(Group oldGroup,
                                              Group newGroup)
        Update the given group in the index of DN to Group Map.
        Parameters:
        oldGroup - the group instance before the modification
        newGroup - the group instance in its latest version
        Since:
        jcms-5.7.0
      • removeGroupFromDnToGroupMap

        public static void removeGroupFromDnToGroupMap​(java.lang.String dn)
        Remove the given group from the index of DN to Group Map.
        Parameters:
        dn - the LDAP DN of the Group, operation ignore if empty
        Since:
        jcms-5.7.0
      • getGroupFromDN

        public static Group getGroupFromDN​(java.lang.String dn)
        Returns a LDAP group from its distinguish name.
        Parameters:
        dn - the dn of the group
        Returns:
        the group or null if not found
        Since:
        jcms-5.7.0
      • clearMemberIsWorkerCache

        protected void clearMemberIsWorkerCache()
        Clears Member isWorker status cache.
        Since:
        jcms-9.0.5 - JCMS-5683