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.List;
032 import java.util.Map;
033
034 import javax.portlet.PortletPreferences;
035 import javax.portlet.PortletRequest;
036
037
040 public interface ExportImportHelper {
041
042 public static final String DATA_HANDLER_COMPANY_SECURE_URL =
043 "@data_handler_company_secure_url@";
044
045 public static final String DATA_HANDLER_COMPANY_URL =
046 "@data_handler_company_url@";
047
048 public static final String DATA_HANDLER_GROUP_FRIENDLY_URL =
049 "@data_handler_group_friendly_url@";
050
051 public static final String DATA_HANDLER_PATH_CONTEXT =
052 "@data_handler_path_context@";
053
054 public static final String DATA_HANDLER_PRIVATE_GROUP_SERVLET_MAPPING =
055 "@data_handler_private_group_servlet_mapping@";
056
057 public static final String DATA_HANDLER_PRIVATE_LAYOUT_SET_SECURE_URL =
058 "@data_handler_private_layout_set_secure_url@";
059
060 public static final String DATA_HANDLER_PRIVATE_LAYOUT_SET_URL =
061 "@data_handler_private_layout_set_url@";
062
063 public static final String DATA_HANDLER_PRIVATE_USER_SERVLET_MAPPING =
064 "@data_handler_private_user_servlet_mapping@";
065
066 public static final String DATA_HANDLER_PUBLIC_LAYOUT_SET_SECURE_URL =
067 "@data_handler_public_layout_set_secure_url@";
068
069 public static final String DATA_HANDLER_PUBLIC_LAYOUT_SET_URL =
070 "@data_handler_public_layout_set_url@";
071
072 public static final String DATA_HANDLER_PUBLIC_SERVLET_MAPPING =
073 "@data_handler_public_servlet_mapping@";
074
075 public static final String TEMP_FOLDER_NAME =
076 ExportImportHelper.class.getName();
077
078 public void reindex(PortletDataContext portletDataContext, long userId)
079 throws PortalException, SystemException;
080
081 public Calendar getCalendar(
082 PortletRequest portletRequest, String paramPrefix,
083 boolean timeZoneSensitive);
084
085 public DateRange getDateRange(
086 PortletRequest portletRequest, long groupId, boolean privateLayout,
087 long plid, String portletId, String defaultRange)
088 throws Exception;
089
090 public Layout getExportableLayout(ThemeDisplay themeDisplay)
091 throws PortalException, SystemException;
092
093 public String getExportableRootPortletId(long companyId, String portletId)
094 throws Exception;
095
096 public Map<Long, Boolean> getLayoutIdMap(PortletRequest portletRequest)
097 throws Exception;
098
099 public long[] getLayoutIds(List<Layout> layouts);
100
101 public ManifestSummary getManifestSummary(
102 long userId, long groupId, Map<String, String[]> parameterMap,
103 File file)
104 throws Exception;
105
106 public ManifestSummary getManifestSummary(
107 long userId, long groupId, Map<String, String[]> parameterMap,
108 FileEntry fileEntry)
109 throws Exception;
110
111 public long getModelDeletionCount(
112 final PortletDataContext portletDataContext,
113 final StagedModelType stagedModelType)
114 throws PortalException, SystemException;
115
116 public String getSelectedLayoutsJSON(
117 long groupId, boolean privateLayout, String selectedNodes)
118 throws SystemException;
119
120 public FileEntry getTempFileEntry(
121 long groupId, long userId, String folderName)
122 throws PortalException, SystemException;
123
124 public String replaceExportContentReferences(
125 PortletDataContext portletDataContext,
126 StagedModel entityStagedModel, Element entityElement,
127 String content, boolean exportReferencedContent)
128 throws Exception;
129
130 public String replaceExportDLReferences(
131 PortletDataContext portletDataContext,
132 StagedModel entityStagedModel, Element entityElement,
133 String content, boolean exportReferencedContent)
134 throws Exception;
135
136 public String replaceExportLayoutReferences(
137 PortletDataContext portletDataContext, String content,
138 boolean exportReferencedContent)
139 throws Exception;
140
141 public String replaceExportLinksToLayouts(
142 PortletDataContext portletDataContext,
143 StagedModel entityStagedModel, Element entityElement,
144 String content, boolean exportReferencedContent)
145 throws Exception;
146
147 public String replaceImportContentReferences(
148 PortletDataContext portletDataContext, Element entityElement,
149 String content, boolean importReferencedContent)
150 throws Exception;
151
152 public String replaceImportDLReferences(
153 PortletDataContext portletDataContext, Element entityElement,
154 String content, boolean importReferencedContent)
155 throws Exception;
156
157 public String replaceImportLayoutReferences(
158 PortletDataContext portletDataContext, String content,
159 boolean importReferencedContent)
160 throws Exception;
161
162 public String replaceImportLinksToLayouts(
163 PortletDataContext portletDataContext, String content,
164 boolean importReferencedContent)
165 throws Exception;
166
167 public void updateExportPortletPreferencesClassPKs(
168 PortletDataContext portletDataContext, Portlet portlet,
169 PortletPreferences portletPreferences, String key, String className,
170 Element rootElement)
171 throws Exception;
172
173 public void updateImportPortletPreferencesClassPKs(
174 PortletDataContext portletDataContext,
175 PortletPreferences portletPreferences, String key, Class<?> clazz,
176 long companyGroupId)
177 throws Exception;
178
179 public MissingReferences validateMissingReferences(
180 long userId, long groupId, Map<String, String[]> parameterMap,
181 File file)
182 throws Exception;
183
184 public void writeManifestSummary(
185 Document document, ManifestSummary manifestSummary);
186
187 }