com.liferay.portal.security.ldap
Class PortalLDAPImporterImpl

java.lang.Object
  extended by com.liferay.portal.security.ldap.PortalLDAPImporterImpl
All Implemented Interfaces:
com.liferay.portal.security.ldap.PortalLDAPImporter

public class PortalLDAPImporterImpl
extends java.lang.Object
implements com.liferay.portal.security.ldap.PortalLDAPImporter

View Source

Author:
Michael C. Han, Brian Wing Shun Chan

Constructor Summary
PortalLDAPImporterImpl()
           
 
Method Summary
protected  com.liferay.portal.model.User createLiferayUser(long companyId, com.liferay.portal.security.ldap.LDAPUser ldapUser, java.lang.String password)
           
protected  com.liferay.portal.model.User doImportLDAPUser(long ldapServerId, long companyId, javax.naming.ldap.LdapContext ldapContext, javax.naming.directory.Attributes attributes, java.lang.String password, boolean importGroupMembership)
           
protected  com.liferay.portal.model.User findLiferayUser(long companyId, com.liferay.portal.security.ldap.LDAPUser ldapUser)
           
 void importFromLDAP()
           
 void importFromLDAP(long companyId)
           
 void importFromLDAP(long ldapServerId, long companyId)
           
protected  void importGroupsAndMembershipFromLDAPUser(long ldapServerId, long companyId, javax.naming.ldap.LdapContext ldapContext, javax.naming.directory.Attributes attributes, com.liferay.portal.security.ldap.LDAPUser ldapUser, com.liferay.portal.model.User user, java.util.Properties userMappings)
           
protected  com.liferay.portal.model.UserGroup importLDAPGroup(long ldapServerId, long companyId, javax.naming.ldap.LdapContext ldapContext, javax.naming.directory.Attributes attributes, boolean importGroupMembership)
           
 com.liferay.portal.model.User importLDAPUser(long ldapServerId, long companyId, javax.naming.ldap.LdapContext ldapContext, javax.naming.directory.Attributes attributes, java.lang.String password, boolean importGroupMembership)
           
protected  void importUsersAndMembershipFromLDAPGroup(long ldapServerId, long companyId, javax.naming.ldap.LdapContext ldapContext, long userGroupId, javax.naming.directory.Attribute attribute)
           
protected  void populateExpandoAttributes(com.liferay.portlet.expando.model.ExpandoBridge expandoBridge, java.util.Map<java.lang.String,java.lang.String> expandoAttributes)
           
 void setLDAPToPortalConverter(com.liferay.portal.security.ldap.LDAPToPortalConverter ldapToPortalConverter)
           
protected  void updateExpandoAttributes(com.liferay.portal.model.User user, com.liferay.portal.security.ldap.LDAPUser ldapUser)
           
protected  com.liferay.portal.model.User updateLiferayUser(long companyId, com.liferay.portal.security.ldap.LDAPUser ldapUser, com.liferay.portal.model.User user, java.lang.String password, java.lang.String modifiedDate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortalLDAPImporterImpl

public PortalLDAPImporterImpl()
Method Detail

importFromLDAP

public void importFromLDAP()
                    throws java.lang.Exception
Specified by:
importFromLDAP in interface com.liferay.portal.security.ldap.PortalLDAPImporter
Throws:
java.lang.Exception

importFromLDAP

public void importFromLDAP(long companyId)
                    throws java.lang.Exception
Specified by:
importFromLDAP in interface com.liferay.portal.security.ldap.PortalLDAPImporter
Throws:
java.lang.Exception

importFromLDAP

public void importFromLDAP(long ldapServerId,
                           long companyId)
                    throws java.lang.Exception
Specified by:
importFromLDAP in interface com.liferay.portal.security.ldap.PortalLDAPImporter
Throws:
java.lang.Exception

importLDAPUser

public com.liferay.portal.model.User importLDAPUser(long ldapServerId,
                                                    long companyId,
                                                    javax.naming.ldap.LdapContext ldapContext,
                                                    javax.naming.directory.Attributes attributes,
                                                    java.lang.String password,
                                                    boolean importGroupMembership)
                                             throws java.lang.Exception
Specified by:
importLDAPUser in interface com.liferay.portal.security.ldap.PortalLDAPImporter
Throws:
java.lang.Exception

setLDAPToPortalConverter

public void setLDAPToPortalConverter(com.liferay.portal.security.ldap.LDAPToPortalConverter ldapToPortalConverter)

createLiferayUser

protected com.liferay.portal.model.User createLiferayUser(long companyId,
                                                          com.liferay.portal.security.ldap.LDAPUser ldapUser,
                                                          java.lang.String password)

doImportLDAPUser

protected com.liferay.portal.model.User doImportLDAPUser(long ldapServerId,
                                                         long companyId,
                                                         javax.naming.ldap.LdapContext ldapContext,
                                                         javax.naming.directory.Attributes attributes,
                                                         java.lang.String password,
                                                         boolean importGroupMembership)
                                                  throws java.lang.Exception
Throws:
java.lang.Exception

findLiferayUser

protected com.liferay.portal.model.User findLiferayUser(long companyId,
                                                        com.liferay.portal.security.ldap.LDAPUser ldapUser)
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

importGroupsAndMembershipFromLDAPUser

protected void importGroupsAndMembershipFromLDAPUser(long ldapServerId,
                                                     long companyId,
                                                     javax.naming.ldap.LdapContext ldapContext,
                                                     javax.naming.directory.Attributes attributes,
                                                     com.liferay.portal.security.ldap.LDAPUser ldapUser,
                                                     com.liferay.portal.model.User user,
                                                     java.util.Properties userMappings)
                                              throws java.lang.Exception
Throws:
java.lang.Exception

importLDAPGroup

protected com.liferay.portal.model.UserGroup importLDAPGroup(long ldapServerId,
                                                             long companyId,
                                                             javax.naming.ldap.LdapContext ldapContext,
                                                             javax.naming.directory.Attributes attributes,
                                                             boolean importGroupMembership)
                                                      throws java.lang.Exception
Throws:
java.lang.Exception

importUsersAndMembershipFromLDAPGroup

protected void importUsersAndMembershipFromLDAPGroup(long ldapServerId,
                                                     long companyId,
                                                     javax.naming.ldap.LdapContext ldapContext,
                                                     long userGroupId,
                                                     javax.naming.directory.Attribute attribute)
                                              throws java.lang.Exception
Throws:
java.lang.Exception

populateExpandoAttributes

protected void populateExpandoAttributes(com.liferay.portlet.expando.model.ExpandoBridge expandoBridge,
                                         java.util.Map<java.lang.String,java.lang.String> expandoAttributes)

updateExpandoAttributes

protected void updateExpandoAttributes(com.liferay.portal.model.User user,
                                       com.liferay.portal.security.ldap.LDAPUser ldapUser)

updateLiferayUser

protected com.liferay.portal.model.User updateLiferayUser(long companyId,
                                                          com.liferay.portal.security.ldap.LDAPUser ldapUser,
                                                          com.liferay.portal.model.User user,
                                                          java.lang.String password,
                                                          java.lang.String modifiedDate)
                                                   throws java.lang.Exception
Throws:
java.lang.Exception