1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.security.ldap;
16  
17  import com.liferay.portal.kernel.exception.SystemException;
18  import com.liferay.portal.model.Contact;
19  import com.liferay.portal.model.User;
20  
21  import java.io.Serializable;
22  
23  import java.util.Map;
24  import java.util.Properties;
25  
26  import javax.naming.directory.Attributes;
27  
28  /**
29   * <a href="PortalToLDAPConverter.java.html"><b><i>View Source</i></b></a>
30   *
31   * @author Michael C. Han
32   * @author Brian Wing Shun Chan
33   */
34  public interface PortalToLDAPConverter {
35  
36      public Modifications getLDAPContactModifications(
37              Contact contact, Map<String, Serializable> contactExpandoAttributes,
38              Properties contactMappings, Properties contactExpandoMappings)
39          throws Exception;
40  
41      public Attributes getLDAPUserAttributes(
42              long ldapServerId, User user, Properties userMappings)
43          throws SystemException;
44  
45      public Modifications getLDAPUserModifications(
46              User user, Map<String, Serializable> userExpandoAttributes,
47              Properties userMappings, Properties userExpandoMappings)
48          throws Exception;
49  
50      public String getUserDNName(
51              long ldapServerId, User user, Properties userMappings)
52          throws Exception;
53  
54  }