001
014
015 package com.liferay.portlet.exportimport.lar;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
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 getPortletDataContextFactory().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 getPortletDataContextFactory().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 getPortletDataContextFactory().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 getPortletDataContextFactory().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 getPortletDataContextFactory().createPreparePortletDataContext(
071 themeDisplay, startDate, endDate);
072 }
073
074 public static PortletDataContextFactory getPortletDataContextFactory() {
075 PortalRuntimePermission.checkGetBeanProperty(
076 PortletDataContextFactoryUtil.class);
077
078 return _portletDataContextFactory;
079 }
080
081 public void setPortletDataContextFactory(
082 PortletDataContextFactory portletDataContextFactory) {
083
084 PortalRuntimePermission.checkSetBeanProperty(getClass());
085
086 _portletDataContextFactory = portletDataContextFactory;
087 }
088
089 private static PortletDataContextFactory _portletDataContextFactory;
090
091 }