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 boolean importGroupMembership)
49 throws Exception {
50
51 return _portalLDAPImporter.importLDAPUser(
52 ldapServerId, companyId, ldapContext, attributes, password,
53 importGroupMembership);
54 }
55
56 public void setPortalLDAPImporter(PortalLDAPImporter portalLDAPImporter) {
57 _portalLDAPImporter = portalLDAPImporter;
58 }
59
60 private static PortalLDAPImporter _portalLDAPImporter;
61
62 }