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