001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.security.ldap;
016    
017    import com.liferay.portal.model.Contact;
018    import com.liferay.portal.model.User;
019    import com.liferay.portal.model.UserGroup;
020    
021    import java.io.Serializable;
022    
023    import java.util.Map;
024    import java.util.Properties;
025    
026    import javax.naming.directory.Attributes;
027    
028    /**
029     * @author Michael C. Han
030     * @author Brian Wing Shun Chan
031     * @author Marcellus Tavares
032     */
033    public interface PortalToLDAPConverter {
034    
035            public String getGroupDNName(
036                            long ldapServerId, UserGroup userGroup, Properties groupMappings)
037                    throws Exception;
038    
039            public Modifications getLDAPContactModifications(
040                            Contact contact, Map<String, Serializable> contactExpandoAttributes,
041                            Properties contactMappings, Properties contactExpandoMappings)
042                    throws Exception;
043    
044            public Attributes getLDAPGroupAttributes(
045                            long ldapServerId, UserGroup userGroup, User user,
046                            Properties groupMappings, Properties userMappings)
047                    throws Exception;
048    
049            public Modifications getLDAPGroupModifications(
050                            long ldapServerId, UserGroup userGroup, User user,
051                            Properties groupMappings, Properties userMappings)
052                    throws Exception;
053    
054            public Attributes getLDAPUserAttributes(
055                            long ldapServerId, User user, Properties userMappings)
056                    throws Exception;
057    
058            public Modifications getLDAPUserModifications(
059                            User user, Map<String, Serializable> userExpandoAttributes,
060                            Properties userMappings, Properties userExpandoMappings)
061                    throws Exception;
062    
063            public String getUserDNName(
064                            long ldapServerId, User user, Properties userMappings)
065                    throws Exception;
066    
067    }