001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.security.exportimport;
016    
017    import com.liferay.portal.kernel.util.ProxyFactory;
018    import com.liferay.portal.model.Contact;
019    import com.liferay.portal.model.User;
020    
021    import java.io.Serializable;
022    
023    import java.util.Map;
024    
025    /**
026     * @author Edward Han
027     * @author Michael C. Han
028     * @author Brian Wing Shun Chan
029     * @author Marcellus Tavares
030     * @author Raymond Aug??
031     */
032    public class UserExporterUtil {
033    
034            public static void exportUser(
035                            Contact contact, Map<String, Serializable> contactExpandoAttributes)
036                    throws Exception {
037    
038                    _getInstance().exportUser(contact, contactExpandoAttributes);
039            }
040    
041            public static void exportUser(
042                            long userId, long userGroupId, UserOperation userOperation)
043                    throws Exception {
044    
045                    _getInstance().exportUser(userId, userGroupId, userOperation);
046            }
047    
048            public static void exportUser(
049                            User user, Map<String, Serializable> userExpandoAttributes)
050                    throws Exception {
051    
052                    _getInstance().exportUser(user, userExpandoAttributes);
053            }
054    
055            private static UserExporter _getInstance() {
056                    return _instance;
057            }
058    
059            private static final UserExporter _instance =
060                    ProxyFactory.newServiceTrackedInstance(UserExporter.class);
061    
062    }