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.portlet.exportimport.lar;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.zip.ZipReader;
020    import com.liferay.portal.kernel.zip.ZipWriter;
021    import com.liferay.portal.theme.ThemeDisplay;
022    
023    import java.util.Date;
024    import java.util.Map;
025    
026    /**
027     * @author Mate Thurzo
028     */
029    @ProviderType
030    public interface PortletDataContextFactory {
031    
032            public PortletDataContext clonePortletDataContext(
033                    PortletDataContext portletDataContext);
034    
035            public PortletDataContext createExportPortletDataContext(
036                            long companyId, long groupId, Map<String, String[]> parameterMap,
037                            Date startDate, Date endDate, ZipWriter zipWriter)
038                    throws PortletDataException;
039    
040            public PortletDataContext createImportPortletDataContext(
041                            long companyId, long groupId, Map<String, String[]> parameterMap,
042                            UserIdStrategy userIdStrategy, ZipReader zipReader)
043                    throws PortletDataException;
044    
045            public PortletDataContext createPreparePortletDataContext(
046                            long companyId, long groupId, Date startDate, Date endDate)
047                    throws PortletDataException;
048    
049            public PortletDataContext createPreparePortletDataContext(
050                            ThemeDisplay themeDisplay, Date startDate, Date endDate)
051                    throws PortletDataException;
052    
053    }