001
014
015 package com.liferay.portal.kernel.lar;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.exception.SystemException;
019 import com.liferay.portal.kernel.repository.model.FileEntry;
020 import com.liferay.portal.kernel.util.DateRange;
021 import com.liferay.portal.kernel.xml.Document;
022 import com.liferay.portal.kernel.xml.Element;
023 import com.liferay.portal.model.Layout;
024 import com.liferay.portal.model.Portlet;
025 import com.liferay.portal.model.StagedModel;
026 import com.liferay.portal.theme.ThemeDisplay;
027
028 import java.io.File;
029
030 import java.util.Calendar;
031 import java.util.Map;
032
033 import javax.portlet.PortletPreferences;
034 import javax.portlet.PortletRequest;
035
036
039 public interface ExportImportHelper {
040
041 public static final String TEMP_FOLDER_NAME =
042 ExportImportHelper.class.getName();
043
044 public Calendar getCalendar(
045 PortletRequest portletRequest, String paramPrefix,
046 boolean timeZoneSensitive);
047
048 public DateRange getDateRange(
049 PortletRequest portletRequest, long groupId, boolean privateLayout,
050 long plid, String portletId)
051 throws Exception;
052
053 public Layout getExportableLayout(ThemeDisplay themeDisplay)
054 throws PortalException, SystemException;
055
056 public String getExportableRootPortletId(long companyId, String portletId)
057 throws Exception;
058
059 public ManifestSummary getManifestSummary(
060 long userId, long groupId, Map<String, String[]> parameterMap,
061 File file)
062 throws Exception;
063
064 public ManifestSummary getManifestSummary(
065 long userId, long groupId, Map<String, String[]> parameterMap,
066 FileEntry fileEntry)
067 throws Exception;
068
069 public long getModelDeletionCount(
070 final PortletDataContext portletDataContext,
071 final StagedModelType stagedModelType)
072 throws PortalException, SystemException;
073
074 public FileEntry getTempFileEntry(
075 long groupId, long userId, String folderName)
076 throws PortalException, SystemException;
077
078 public String replaceExportContentReferences(
079 PortletDataContext portletDataContext,
080 StagedModel entityStagedModel, Element entityElement,
081 String content, boolean exportReferencedContent)
082 throws Exception;
083
084 public String replaceExportDLReferences(
085 PortletDataContext portletDataContext,
086 StagedModel entityStagedModel, Element entityElement,
087 String content, boolean exportReferencedContent)
088 throws Exception;
089
090 public String replaceExportLayoutReferences(
091 PortletDataContext portletDataContext, String content,
092 boolean exportReferencedContent)
093 throws Exception;
094
095 public String replaceExportLinksToLayouts(
096 PortletDataContext portletDataContext,
097 StagedModel entityStagedModel, Element entityElement,
098 String content, boolean exportReferencedContent)
099 throws Exception;
100
101 public String replaceImportContentReferences(
102 PortletDataContext portletDataContext, Element entityElement,
103 String content, boolean importReferencedContent)
104 throws Exception;
105
106 public String replaceImportDLReferences(
107 PortletDataContext portletDataContext, Element entityElement,
108 String content, boolean importReferencedContent)
109 throws Exception;
110
111 public String replaceImportLayoutReferences(
112 PortletDataContext portletDataContext, String content,
113 boolean importReferencedContent)
114 throws Exception;
115
116 public String replaceImportLinksToLayouts(
117 PortletDataContext portletDataContext, String content,
118 boolean importReferencedContent)
119 throws Exception;
120
121 public void updateExportPortletPreferencesClassPKs(
122 PortletDataContext portletDataContext, Portlet portlet,
123 PortletPreferences portletPreferences, String key, String className,
124 Element rootElement)
125 throws Exception;
126
127 public void updateImportPortletPreferencesClassPKs(
128 PortletDataContext portletDataContext,
129 PortletPreferences portletPreferences, String key, Class<?> clazz,
130 long companyGroupId)
131 throws Exception;
132
133 public MissingReferences validateMissingReferences(
134 long userId, long groupId, Map<String, String[]> parameterMap,
135 File file)
136 throws Exception;
137
138 public void writeManifestSummary(
139 Document document, ManifestSummary manifestSummary);
140
141 }