001
014
015 package com.liferay.portlet.exportimport.lar;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.ProxyFactory;
020 import com.liferay.portal.kernel.zip.ZipReader;
021 import com.liferay.portal.kernel.zip.ZipWriter;
022 import com.liferay.portal.theme.ThemeDisplay;
023
024 import java.util.Date;
025 import java.util.Map;
026
027
030 @ProviderType
031 public class PortletDataContextFactoryUtil {
032
033 public static PortletDataContext clonePortletDataContext(
034 PortletDataContext portletDataContext) {
035
036 return _portletDataContextFactory.clonePortletDataContext(
037 portletDataContext);
038 }
039
040 public static PortletDataContext createExportPortletDataContext(
041 long companyId, long groupId, Map<String, String[]> parameterMap,
042 Date startDate, Date endDate, ZipWriter zipWriter)
043 throws PortletDataException {
044
045 return _portletDataContextFactory.createExportPortletDataContext(
046 companyId, groupId, parameterMap, startDate, endDate, zipWriter);
047 }
048
049 public static PortletDataContext createImportPortletDataContext(
050 long companyId, long groupId, Map<String, String[]> parameterMap,
051 UserIdStrategy userIdStrategy, ZipReader zipReader)
052 throws PortletDataException {
053
054 return _portletDataContextFactory.createImportPortletDataContext(
055 companyId, groupId, parameterMap, userIdStrategy, zipReader);
056 }
057
058 public static PortletDataContext createPreparePortletDataContext(
059 long companyId, long groupId, Date startDate, Date endDate)
060 throws PortletDataException {
061
062 return _portletDataContextFactory.createPreparePortletDataContext(
063 companyId, groupId, startDate, endDate);
064 }
065
066 public static PortletDataContext createPreparePortletDataContext(
067 ThemeDisplay themeDisplay, Date startDate, Date endDate)
068 throws PortletDataException {
069
070 return _portletDataContextFactory.createPreparePortletDataContext(
071 themeDisplay, startDate, endDate);
072 }
073
074 private static final PortletDataContextFactory _portletDataContextFactory =
075 ProxyFactory.newServiceTrackedInstance(PortletDataContextFactory.class);
076
077 }