001    /**
002     * Copyright (c) 2000-2011 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.List;
024    import java.util.Map;
025    import java.util.Properties;
026    
027    import javax.naming.directory.Attributes;
028    
029    /**
030     * @author Michael C. Han
031     * @author Brian Wing Shun Chan
032     * @author Marcellus Tavares
033     * @author Wesley Gong
034     */
035    public interface PortalToLDAPConverter {
036    
037            public String getGroupDNName(
038                            long ldapServerId, UserGroup userGroup, Properties groupMappings)
039                    throws Exception;
040    
041            public Modifications getLDAPContactModifications(
042                            Contact contact, Map<String, Serializable> contactExpandoAttributes,
043                            Properties contactMappings, Properties contactExpandoMappings)
044                    throws Exception;
045    
046            public Attributes getLDAPGroupAttributes(
047                            long ldapServerId, UserGroup userGroup, User user,
048                            Properties groupMappings, Properties userMappings)
049                    throws Exception;
050    
051            public Modifications getLDAPGroupModifications(
052                            long ldapServerId, UserGroup userGroup, User user,
053                            Properties groupMappings, Properties userMappings)
054                    throws Exception;
055    
056            public Attributes getLDAPUserAttributes(
057                            long ldapServerId, User user, Properties userMappings)
058                    throws Exception;
059    
060            public Modifications getLDAPUserGroupModifications(
061                            long ldapServerId, List<UserGroup> userGroups, User user,
062                            Properties userMappings)
063                    throws Exception;
064    
065            public Modifications getLDAPUserModifications(
066                            User user, Map<String, Serializable> userExpandoAttributes,
067                            Properties userMappings, Properties userExpandoMappings)
068                    throws Exception;
069    
070            public String getUserDNName(
071                            long ldapServerId, User user, Properties userMappings)
072                    throws Exception;
073    
074    }