001
014
015 package com.liferay.portal.security.ldap;
016
017 import com.liferay.portal.model.User;
018
019 import javax.naming.directory.Attributes;
020 import javax.naming.ldap.LdapContext;
021
022
027 public class PortalLDAPImporterUtil {
028
029 public static void importFromLDAP() throws Exception {
030 _portalLDAPImporter.importFromLDAP();
031 }
032
033 public static void importFromLDAP(long companyId) throws Exception {
034 _portalLDAPImporter.importFromLDAP(companyId);
035 }
036
037 public static void importFromLDAP(long ldapServerId, long companyId)
038 throws Exception {
039
040 _portalLDAPImporter.importFromLDAP(ldapServerId, companyId);
041 }
042
043 public static User importLDAPUser(
044 long ldapServerId, long companyId, LdapContext ldapContext,
045 Attributes attributes, String password)
046 throws Exception {
047
048 return _portalLDAPImporter.importLDAPUser(
049 ldapServerId, companyId, ldapContext, attributes, password);
050 }
051
052 public static User importLDAPUser(
053 long ldapServerId, long companyId, String emailAddress,
054 String screenName)
055 throws Exception {
056
057 return _portalLDAPImporter.importLDAPUser(
058 ldapServerId, companyId, emailAddress, screenName);
059 }
060
061 public static User importLDAPUser(
062 long companyId, String emailAddress, String screenName)
063 throws Exception {
064
065 return _portalLDAPImporter.importLDAPUser(
066 companyId, emailAddress, screenName);
067 }
068
069 public static User importLDAPUserByScreenName(
070 long companyId, String screenName)
071 throws Exception {
072
073 return _portalLDAPImporter.importLDAPUserByScreenName(
074 companyId, screenName);
075 }
076
077 public void setPortalLDAPImporter(PortalLDAPImporter portalLDAPImporter) {
078 _portalLDAPImporter = portalLDAPImporter;
079 }
080
081 private static PortalLDAPImporter _portalLDAPImporter;
082
083 }