1
14
15 package com.liferay.portal.security.ldap;
16
17 import com.liferay.portal.model.User;
18
19 import javax.naming.directory.Attributes;
20 import javax.naming.ldap.LdapContext;
21
22
29 public class PortalLDAPImporterUtil {
30
31 public static void importFromLDAP() throws Exception {
32 _portalLDAPImporter.importFromLDAP();
33 }
34
35 public static void importFromLDAP(long companyId) throws Exception {
36 _portalLDAPImporter.importFromLDAP(companyId);
37 }
38
39 public static void importFromLDAP(long ldapServerId, long companyId)
40 throws Exception {
41
42 _portalLDAPImporter.importFromLDAP(ldapServerId, companyId);
43 }
44
45 public static User importLDAPUser(
46 long ldapServerId, long companyId, LdapContext ldapContext,
47 Attributes attributes, String password)
48 throws Exception {
49
50 return _portalLDAPImporter.importLDAPUser(
51 ldapServerId, companyId, ldapContext, attributes, password);
52 }
53
54 public void setPortalLDAPImporter(PortalLDAPImporter portalLDAPImporter) {
55 _portalLDAPImporter = portalLDAPImporter;
56 }
57
58 private static PortalLDAPImporter _portalLDAPImporter;
59
60 }