001
014
015 package com.liferay.portlet.exportimport.lar;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.exception.PortalException;
020 import com.liferay.portal.kernel.repository.model.FileEntry;
021 import com.liferay.portal.kernel.util.DateRange;
022 import com.liferay.portal.kernel.xml.Document;
023 import com.liferay.portal.kernel.xml.Element;
024 import com.liferay.portal.kernel.zip.ZipWriter;
025 import com.liferay.portal.model.Layout;
026 import com.liferay.portal.model.Portlet;
027 import com.liferay.portal.model.StagedModel;
028 import com.liferay.portal.theme.ThemeDisplay;
029
030 import java.io.File;
031
032 import java.util.Calendar;
033 import java.util.List;
034 import java.util.Map;
035
036 import javax.portlet.PortletPreferences;
037 import javax.portlet.PortletRequest;
038
039
042 @ProviderType
043 public interface ExportImportHelper {
044
045
048 @Deprecated
049 public static final String DATA_HANDLER_COMPANY_SECURE_URL =
050 "@data_handler_company_secure_url@";
051
052
055 @Deprecated
056 public static final String DATA_HANDLER_COMPANY_URL =
057 "@data_handler_company_url@";
058
059
062 @Deprecated
063 public static final String DATA_HANDLER_GROUP_FRIENDLY_URL =
064 "@data_handler_group_friendly_url@";
065
066
069 @Deprecated
070 public static final String DATA_HANDLER_PATH_CONTEXT =
071 "@data_handler_path_context@";
072
073
076 @Deprecated
077 public static final String DATA_HANDLER_PRIVATE_GROUP_SERVLET_MAPPING =
078 "@data_handler_private_group_servlet_mapping@";
079
080
083 @Deprecated
084 public static final String DATA_HANDLER_PRIVATE_LAYOUT_SET_SECURE_URL =
085 "@data_handler_private_layout_set_secure_url@";
086
087
090 @Deprecated
091 public static final String DATA_HANDLER_PRIVATE_LAYOUT_SET_URL =
092 "@data_handler_private_layout_set_url@";
093
094
097 @Deprecated
098 public static final String DATA_HANDLER_PRIVATE_USER_SERVLET_MAPPING =
099 "@data_handler_private_user_servlet_mapping@";
100
101
104 @Deprecated
105 public static final String DATA_HANDLER_PUBLIC_LAYOUT_SET_SECURE_URL =
106 "@data_handler_public_layout_set_secure_url@";
107
108
111 @Deprecated
112 public static final String DATA_HANDLER_PUBLIC_LAYOUT_SET_URL =
113 "@data_handler_public_layout_set_url@";
114
115
118 @Deprecated
119 public static final String DATA_HANDLER_PUBLIC_SERVLET_MAPPING =
120 "@data_handler_public_servlet_mapping@";
121
122 public static final String TEMP_FOLDER_NAME =
123 ExportImportHelper.class.getName();
124
125 public long[] getAllLayoutIds(long groupId, boolean privateLayout);
126
127 public Map<Long, Boolean> getAllLayoutIdsMap(
128 long groupId, boolean privateLayout);
129
130
135 @Deprecated
136 public Calendar getCalendar(
137 PortletRequest portletRequest, String paramPrefix,
138 boolean timeZoneSensitive);
139
140 public List<Portlet> getDataSiteLevelPortlets(long companyId)
141 throws Exception;
142
143 public List<Portlet> getDataSiteLevelPortlets(
144 long companyId, boolean excludeDataAlwaysStaged)
145 throws Exception;
146
147
152 @Deprecated
153 public DateRange getDateRange(
154 PortletRequest portletRequest, long groupId, boolean privateLayout,
155 long plid, String portletId, String defaultRange)
156 throws Exception;
157
158 public Layout getExportableLayout(ThemeDisplay themeDisplay)
159 throws PortalException;
160
161 public String getExportableRootPortletId(long companyId, String portletId)
162 throws Exception;
163
164
168 @Deprecated
169 public boolean[] getExportPortletControls(
170 long companyId, String portletId,
171 Map<String, String[]> parameterMap)
172 throws Exception;
173
174
178 @Deprecated
179 public boolean[] getExportPortletControls(
180 long companyId, String portletId,
181 Map<String, String[]> parameterMap, String type)
182 throws Exception;
183
184 public Map<String, Boolean> getExportPortletControlsMap(
185 long companyId, String portletId,
186 Map<String, String[]> parameterMap)
187 throws Exception;
188
189 public Map<String, Boolean> getExportPortletControlsMap(
190 long companyId, String portletId,
191 Map<String, String[]> parameterMap, String type)
192 throws Exception;
193
194
199 @Deprecated
200 public boolean[] getImportPortletControls(
201 long companyId, String portletId,
202 Map<String, String[]> parameterMap, Element portletDataElement)
203 throws Exception;
204
205
210 @Deprecated
211 public boolean[] getImportPortletControls(
212 long companyId, String portletId,
213 Map<String, String[]> parameterMap, Element portletDataElement,
214 ManifestSummary manifestSummary)
215 throws Exception;
216
217 public Map<String, Boolean> getImportPortletControlsMap(
218 long companyId, String portletId,
219 Map<String, String[]> parameterMap, Element portletDataElement,
220 ManifestSummary manifestSummary)
221 throws Exception;
222
223 public Map<Long, Boolean> getLayoutIdMap(PortletRequest portletRequest)
224 throws PortalException;
225
226 public long[] getLayoutIds(List<Layout> layouts);
227
228 public long[] getLayoutIds(Map<Long, Boolean> layoutIdMap)
229 throws PortalException;
230
231 public long[] getLayoutIds(
232 Map<Long, Boolean> layoutIdMap, long targetGroupId)
233 throws PortalException;
234
235 public long[] getLayoutIds(PortletRequest portletRequest)
236 throws PortalException;
237
238 public long[] getLayoutIds(
239 PortletRequest portletRequest, long targetGroupId)
240 throws PortalException;
241
242 public ZipWriter getLayoutSetZipWriter(long groupId);
243
244
248 @Deprecated
249 public ManifestSummary getManifestSummary(
250 long userId, long groupId, Map<String, String[]> parameterMap,
251 File file)
252 throws Exception;
253
254 public ManifestSummary getManifestSummary(
255 long userId, long groupId, Map<String, String[]> parameterMap,
256 FileEntry fileEntry)
257 throws Exception;
258
259 public ManifestSummary getManifestSummary(
260 PortletDataContext portletDataContext)
261 throws Exception;
262
263 public List<Layout> getMissingParentLayouts(Layout layout, long liveGroupId)
264 throws PortalException;
265
266 public long getModelDeletionCount(
267 final PortletDataContext portletDataContext,
268 final StagedModelType stagedModelType)
269 throws PortalException;
270
271 public ZipWriter getPortletZipWriter(String portletId);
272
273 public String getSelectedLayoutsJSON(
274 long groupId, boolean privateLayout, String selectedNodes);
275
276 public FileEntry getTempFileEntry(
277 long groupId, long userId, String folderName)
278 throws PortalException;
279
280 public UserIdStrategy getUserIdStrategy(long userId, String userIdStrategy)
281 throws PortalException;
282
283 public boolean isReferenceWithinExportScope(
284 PortletDataContext portletDataContext, StagedModel stagedModel);
285
286
292 @Deprecated
293 public String replaceExportContentReferences(
294 PortletDataContext portletDataContext,
295 StagedModel entityStagedModel, Element entityElement,
296 String content, boolean exportReferencedContent)
297 throws Exception;
298
299
305 @Deprecated
306 public String replaceExportContentReferences(
307 PortletDataContext portletDataContext,
308 StagedModel entityStagedModel, String content,
309 boolean exportReferencedContent)
310 throws Exception;
311
312
318 @Deprecated
319 public String replaceExportContentReferences(
320 PortletDataContext portletDataContext,
321 StagedModel entityStagedModel, String content,
322 boolean exportReferencedContent, boolean escapeContent)
323 throws Exception;
324
325
328 @Deprecated
329 public String replaceExportDLReferences(
330 PortletDataContext portletDataContext,
331 StagedModel entityStagedModel, Element entityElement,
332 String content, boolean exportReferencedContent)
333 throws Exception;
334
335
338 @Deprecated
339 public String replaceExportDLReferences(
340 PortletDataContext portletDataContext,
341 StagedModel entityStagedModel, String content,
342 boolean exportReferencedContent)
343 throws Exception;
344
345
348 @Deprecated
349 public String replaceExportLayoutReferences(
350 PortletDataContext portletDataContext, String content)
351 throws Exception;
352
353
356 @Deprecated
357 public String replaceExportLayoutReferences(
358 PortletDataContext portletDataContext, String content,
359 boolean exportReferencedContent)
360 throws Exception;
361
362
365 @Deprecated
366 public String replaceExportLinksToLayouts(
367 PortletDataContext portletDataContext,
368 StagedModel entityStagedModel, Element entityElement,
369 String content, boolean exportReferencedContent)
370 throws Exception;
371
372
375 @Deprecated
376 public String replaceExportLinksToLayouts(
377 PortletDataContext portletDataContext,
378 StagedModel entityStagedModel, String content)
379 throws Exception;
380
381
387 @Deprecated
388 public String replaceImportContentReferences(
389 PortletDataContext portletDataContext, Element entityElement,
390 String content, boolean importReferencedContent)
391 throws Exception;
392
393
399 @Deprecated
400 public String replaceImportContentReferences(
401 PortletDataContext portletDataContext,
402 StagedModel entityStagedModel, String content)
403 throws Exception;
404
405
408 @Deprecated
409 public String replaceImportDLReferences(
410 PortletDataContext portletDataContext, Element entityElement,
411 String content, boolean importReferencedContent)
412 throws Exception;
413
414
417 @Deprecated
418 public String replaceImportDLReferences(
419 PortletDataContext portletDataContext,
420 StagedModel entityStagedModel, String content)
421 throws Exception;
422
423
426 @Deprecated
427 public String replaceImportLayoutReferences(
428 PortletDataContext portletDataContext, String content)
429 throws Exception;
430
431
434 @Deprecated
435 public String replaceImportLayoutReferences(
436 PortletDataContext portletDataContext, String content,
437 boolean importReferencedContent)
438 throws Exception;
439
440
443 @Deprecated
444 public String replaceImportLinksToLayouts(
445 PortletDataContext portletDataContext, String content)
446 throws Exception;
447
448
451 @Deprecated
452 public String replaceImportLinksToLayouts(
453 PortletDataContext portletDataContext, String content,
454 boolean importReferencedContent)
455 throws Exception;
456
457
463 @Deprecated
464 public void updateExportPortletPreferencesClassPKs(
465 PortletDataContext portletDataContext, Portlet portlet,
466 PortletPreferences portletPreferences, String key, String className)
467 throws Exception;
468
469
474 @Deprecated
475 public void updateExportPortletPreferencesClassPKs(
476 PortletDataContext portletDataContext, Portlet portlet,
477 PortletPreferences portletPreferences, String key, String className,
478 Element rootElement)
479 throws Exception;
480
481
486 @Deprecated
487 public void updateImportPortletPreferencesClassPKs(
488 PortletDataContext portletDataContext,
489 PortletPreferences portletPreferences, String key, Class<?> clazz,
490 long companyGroupId)
491 throws Exception;
492
493
497 @Deprecated
498 public MissingReferences validateMissingReferences(
499 long userId, long groupId, Map<String, String[]> parameterMap,
500 File file)
501 throws Exception;
502
503 public MissingReferences validateMissingReferences(
504 final PortletDataContext portletDataContext)
505 throws Exception;
506
507 public void writeManifestSummary(
508 Document document, ManifestSummary manifestSummary);
509
510 }