Class SyncLdapHandler

    • Field Detail

      • logger

        public static final org.apache.log4j.Logger logger
      • op

        protected boolean op
      • opSyncOne

        protected boolean opSyncOne
      • opSyncGroup

        protected boolean opSyncGroup
      • opSyncLdapGroup

        protected boolean opSyncLdapGroup
      • opSyncAll

        protected boolean opSyncAll
      • opImportAll

        protected boolean opImportAll
      • LDAP_IMPORT_ALL_DONE

        public static final java.lang.String LDAP_IMPORT_ALL_DONE
        See Also:
        Constant Field Values
      • LDAP_GROUP_SYNC_DONE

        public static final java.lang.String LDAP_GROUP_SYNC_DONE
        See Also:
        Constant Field Values
      • SYNC_PROGRESS_GROUP_CREATED

        public static final int SYNC_PROGRESS_GROUP_CREATED
        See Also:
        Constant Field Values
      • SYNC_PROGRESS_GROUP_UPDATED

        public static final int SYNC_PROGRESS_GROUP_UPDATED
        See Also:
        Constant Field Values
      • SYNC_PROGRESS_GROUP_TREATED

        public static final int SYNC_PROGRESS_GROUP_TREATED
        See Also:
        Constant Field Values
      • SYNC_PROGRESS_MEMBER_CREATED

        public static final int SYNC_PROGRESS_MEMBER_CREATED
        See Also:
        Constant Field Values
      • SYNC_PROGRESS_MEMBER_UPDATED

        public static final int SYNC_PROGRESS_MEMBER_UPDATED
        See Also:
        Constant Field Values
      • SYNC_PROGRESS_MEMBER_TREATED

        public static final int SYNC_PROGRESS_MEMBER_TREATED
        See Also:
        Constant Field Values
    • Constructor Detail

      • SyncLdapHandler

        public SyncLdapHandler()
    • Method Detail

      • processAction

        public boolean processAction()
                              throws java.io.IOException
        Description copied from class: JcmsFormHandler
        Method to be implemented to check/validate action to be performed and process them.

        Default implementation is to return false. No need to call super method.

        This method may NOT be invoked at all if security validation are not met.

        You must ensure your handler and JSP can work properly without any code invoked in this method.

        Overrides:
        processAction in class JcmsFormHandler
        Returns:
        false if no redirection is needed, true otherwise
        Throws:
        java.io.IOException - IO Exception
      • validateSyncOne

        public boolean validateSyncOne()
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • performSyncOne

        public void performSyncOne()
        Synchronize current member with LDAP.
      • validateSyncGroup

        public boolean validateSyncGroup()
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • performSyncGroup

        public void performSyncGroup()
        Synchronize members of current group with LDAP.
      • validateSyncLdapGroup

        public boolean validateSyncLdapGroup()
                                      throws java.io.IOException
        Returns:
        true the syncldapgroup operation can be performed
        Throws:
        java.io.IOException - if sendRedirect/sendForbidden failed
        Since:
        jcms-5.7.0
      • performSyncLdapGroup

        public void performSyncLdapGroup()
        Synchronize the LDAP group and retrieve all its member from LDAP.
        Since:
        jcms-5.7.0
      • validateSyncAll

        public boolean validateSyncAll()
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • performSyncAll

        public void performSyncAll()
        Synchronize all members with LDAP.
      • validateImportAll

        public boolean validateImportAll()
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • performImportAll

        public void performImportAll()
        Import all LDAP members and their group in JCMS.
      • synchronizeMembers

        public static void synchronizeMembers​(java.util.Set<Member> memberSet,
                                              JcmsJspContext ctxt)
        Synchronize all LDAP account in the specified Set of Member.
        Parameters:
        memberSet - the set of Member to synchronize (only LDAP account will be synchronized)
        ctxt - the current JcmsJspContext (used to retrieve logged member as opAuthor, request & session for error message)
      • synchronizeMembers

        public static void synchronizeMembers​(java.util.Iterator<Member> mbrIterator,
                                              JcmsJspContext ctxt)
        Synchronize all LDAP account return by the specified Iterator of Member.
        Parameters:
        mbrIterator - an iterator of Member to synchronize (only LDAP account will be synchronized)
        ctxt - the current JcmsJspContext (used to retrieve logged member as opAuthor, request & session for error message)
        Since:
        jcms-10.0.1 / JCMS-6340
      • clearLdapGroupBeingSync

        public static void clearLdapGroupBeingSync​(javax.servlet.http.HttpSession session)
      • getLdapGroupBeingSync

        public static Group getLdapGroupBeingSync​(javax.servlet.http.HttpSession session)
        If LDAP synchronization was request on a LDAP group, return the LDAP Group being synchronized. otherwise return null.
        Parameters:
        session - the current HttpSession
        Returns:
        the group being synchronized
      • getLdapGroupSyncProgressInformation

        public static java.lang.String getLdapGroupSyncProgressInformation()
        Retrieve progress information of ldap group synchronization.
        Returns:
        a String containing information about current operation progress or null if operation is over This method MUST be call from a thread with access to Channel.getCurrentServletRequest().
      • setOpSyncOne

        public void setOpSyncOne​(java.lang.String v)
      • setOpSyncGroup

        public void setOpSyncGroup​(java.lang.String v)
      • setOpSyncLdapGroup

        public void setOpSyncLdapGroup​(java.lang.String v)
      • setOpSyncAll

        public void setOpSyncAll​(java.lang.String v)
      • setOpImportAll

        public void setOpImportAll​(java.lang.String v)
      • setId

        public void setId​(java.lang.String id)
      • setGid

        public void setGid​(java.lang.String gid)
      • setLdapGid

        public void setLdapGid​(java.lang.String gid)