001
014
015 package com.liferay.exportimport.kernel.lar;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.exception.PortalException;
020 import com.liferay.portal.kernel.model.Layout;
021 import com.liferay.portal.kernel.model.Portlet;
022 import com.liferay.portal.kernel.model.StagedModel;
023 import com.liferay.portal.kernel.repository.model.FileEntry;
024 import com.liferay.portal.kernel.theme.ThemeDisplay;
025 import com.liferay.portal.kernel.util.DateRange;
026 import com.liferay.portal.kernel.xml.Document;
027 import com.liferay.portal.kernel.xml.Element;
028 import com.liferay.portal.kernel.zip.ZipWriter;
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
161 @Deprecated
162 public Layout getExportableLayout(ThemeDisplay themeDisplay)
163 throws PortalException;
164
165 public String getExportableRootPortletId(long companyId, String portletId)
166 throws Exception;
167
168
172 @Deprecated
173 public boolean[] getExportPortletControls(
174 long companyId, String portletId,
175 Map<String, String[]> parameterMap)
176 throws Exception;
177
178
182 @Deprecated
183 public boolean[] getExportPortletControls(
184 long companyId, String portletId,
185 Map<String, String[]> parameterMap, String type)
186 throws Exception;
187
188 public Map<String, Boolean> getExportPortletControlsMap(
189 long companyId, String portletId,
190 Map<String, String[]> parameterMap)
191 throws Exception;
192
193 public Map<String, Boolean> getExportPortletControlsMap(
194 long companyId, String portletId,
195 Map<String, String[]> parameterMap, String type)
196 throws Exception;
197
198
203 @Deprecated
204 public boolean[] getImportPortletControls(
205 long companyId, String portletId,
206 Map<String, String[]> parameterMap, Element portletDataElement)
207 throws Exception;
208
209
214 @Deprecated
215 public boolean[] getImportPortletControls(
216 long companyId, String portletId,
217 Map<String, String[]> parameterMap, Element portletDataElement,
218 ManifestSummary manifestSummary)
219 throws Exception;
220
221 public Map<String, Boolean> getImportPortletControlsMap(
222 long companyId, String portletId,
223 Map<String, String[]> parameterMap, Element portletDataElement,
224 ManifestSummary manifestSummary)
225 throws Exception;
226
227 public Map<Long, Boolean> getLayoutIdMap(PortletRequest portletRequest)
228 throws PortalException;
229
230 public long[] getLayoutIds(List<Layout> layouts);
231
232 public long[] getLayoutIds(Map<Long, Boolean> layoutIdMap)
233 throws PortalException;
234
235 public long[] getLayoutIds(
236 Map<Long, Boolean> layoutIdMap, long targetGroupId)
237 throws PortalException;
238
239 public long[] getLayoutIds(PortletRequest portletRequest)
240 throws PortalException;
241
242 public long[] getLayoutIds(
243 PortletRequest portletRequest, long targetGroupId)
244 throws PortalException;
245
246 public ZipWriter getLayoutSetZipWriter(long groupId);
247
248
252 @Deprecated
253 public ManifestSummary getManifestSummary(
254 long userId, long groupId, Map<String, String[]> parameterMap,
255 File file)
256 throws Exception;
257
258 public ManifestSummary getManifestSummary(
259 long userId, long groupId, Map<String, String[]> parameterMap,
260 FileEntry fileEntry)
261 throws Exception;
262
263 public ManifestSummary getManifestSummary(
264 PortletDataContext portletDataContext)
265 throws Exception;
266
267 public List<Layout> getMissingParentLayouts(Layout layout, long liveGroupId)
268 throws PortalException;
269
270 public long getModelDeletionCount(
271 final PortletDataContext portletDataContext,
272 final StagedModelType stagedModelType)
273 throws PortalException;
274
275 public ZipWriter getPortletZipWriter(String portletId);
276
277 public String getSelectedLayoutsJSON(
278 long groupId, boolean privateLayout, String selectedNodes);
279
280 public FileEntry getTempFileEntry(
281 long groupId, long userId, String folderName)
282 throws PortalException;
283
284 public UserIdStrategy getUserIdStrategy(long userId, String userIdStrategy)
285 throws PortalException;
286
287 public boolean isReferenceWithinExportScope(
288 PortletDataContext portletDataContext, StagedModel stagedModel);
289
290
296 @Deprecated
297 public String replaceExportContentReferences(
298 PortletDataContext portletDataContext,
299 StagedModel entityStagedModel, Element entityElement,
300 String content, boolean exportReferencedContent)
301 throws Exception;
302
303
309 @Deprecated
310 public String replaceExportContentReferences(
311 PortletDataContext portletDataContext,
312 StagedModel entityStagedModel, String content,
313 boolean exportReferencedContent)
314 throws Exception;
315
316
322 @Deprecated
323 public String replaceExportContentReferences(
324 PortletDataContext portletDataContext,
325 StagedModel entityStagedModel, String content,
326 boolean exportReferencedContent, boolean escapeContent)
327 throws Exception;
328
329
332 @Deprecated
333 public String replaceExportDLReferences(
334 PortletDataContext portletDataContext,
335 StagedModel entityStagedModel, Element entityElement,
336 String content, boolean exportReferencedContent)
337 throws Exception;
338
339
342 @Deprecated
343 public String replaceExportDLReferences(
344 PortletDataContext portletDataContext,
345 StagedModel entityStagedModel, String content,
346 boolean exportReferencedContent)
347 throws Exception;
348
349
352 @Deprecated
353 public String replaceExportLayoutReferences(
354 PortletDataContext portletDataContext, String content)
355 throws Exception;
356
357
360 @Deprecated
361 public String replaceExportLayoutReferences(
362 PortletDataContext portletDataContext, String content,
363 boolean exportReferencedContent)
364 throws Exception;
365
366
369 @Deprecated
370 public String replaceExportLinksToLayouts(
371 PortletDataContext portletDataContext,
372 StagedModel entityStagedModel, Element entityElement,
373 String content, boolean exportReferencedContent)
374 throws Exception;
375
376
379 @Deprecated
380 public String replaceExportLinksToLayouts(
381 PortletDataContext portletDataContext,
382 StagedModel entityStagedModel, String content)
383 throws Exception;
384
385
391 @Deprecated
392 public String replaceImportContentReferences(
393 PortletDataContext portletDataContext, Element entityElement,
394 String content, boolean importReferencedContent)
395 throws Exception;
396
397
403 @Deprecated
404 public String replaceImportContentReferences(
405 PortletDataContext portletDataContext,
406 StagedModel entityStagedModel, String content)
407 throws Exception;
408
409
412 @Deprecated
413 public String replaceImportDLReferences(
414 PortletDataContext portletDataContext, Element entityElement,
415 String content, boolean importReferencedContent)
416 throws Exception;
417
418
421 @Deprecated
422 public String replaceImportDLReferences(
423 PortletDataContext portletDataContext,
424 StagedModel entityStagedModel, String content)
425 throws Exception;
426
427
430 @Deprecated
431 public String replaceImportLayoutReferences(
432 PortletDataContext portletDataContext, String content)
433 throws Exception;
434
435
438 @Deprecated
439 public String replaceImportLayoutReferences(
440 PortletDataContext portletDataContext, String content,
441 boolean importReferencedContent)
442 throws Exception;
443
444
447 @Deprecated
448 public String replaceImportLinksToLayouts(
449 PortletDataContext portletDataContext, String content)
450 throws Exception;
451
452
455 @Deprecated
456 public String replaceImportLinksToLayouts(
457 PortletDataContext portletDataContext, String content,
458 boolean importReferencedContent)
459 throws Exception;
460
461
467 @Deprecated
468 public void updateExportPortletPreferencesClassPKs(
469 PortletDataContext portletDataContext, Portlet portlet,
470 PortletPreferences portletPreferences, String key, String className)
471 throws Exception;
472
473
478 @Deprecated
479 public void updateExportPortletPreferencesClassPKs(
480 PortletDataContext portletDataContext, Portlet portlet,
481 PortletPreferences portletPreferences, String key, String className,
482 Element rootElement)
483 throws Exception;
484
485
490 @Deprecated
491 public void updateImportPortletPreferencesClassPKs(
492 PortletDataContext portletDataContext,
493 PortletPreferences portletPreferences, String key, Class<?> clazz,
494 long companyGroupId)
495 throws Exception;
496
497
501 @Deprecated
502 public MissingReferences validateMissingReferences(
503 long userId, long groupId, Map<String, String[]> parameterMap,
504 File file)
505 throws Exception;
506
507 public MissingReferences validateMissingReferences(
508 final PortletDataContext portletDataContext)
509 throws Exception;
510
511 public void writeManifestSummary(
512 Document document, ManifestSummary manifestSummary);
513
514 }