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 long companyId, long groupId, Date startDate, Date endDate)
057 throws PortletDataException {
058
059 return getPortletDataContextFactory().createPreparePortletDataContext(
060 companyId, groupId, startDate, endDate);
061 }
062
063 public static PortletDataContext createPreparePortletDataContext(
064 ThemeDisplay themeDisplay, Date startDate, Date endDate)
065 throws PortletDataException {
066
067 return getPortletDataContextFactory().createPreparePortletDataContext(
068 themeDisplay, startDate, endDate);
069 }
070
071 public static PortletDataContextFactory getPortletDataContextFactory() {
072 PortalRuntimePermission.checkGetBeanProperty(
073 PortletDataContextFactoryUtil.class);
074
075 return _portletDataContextFactory;
076 }
077
078 public void setPortletDataContextFactory(
079 PortletDataContextFactory portletDataContextFactory) {
080
081 PortalRuntimePermission.checkSetBeanProperty(getClass());
082
083 _portletDataContextFactory = portletDataContextFactory;
084 }
085
086 private static PortletDataContextFactory _portletDataContextFactory;
087
088 }