001
014
015 package com.liferay.portlet.exportimport.staging;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.exception.PortalException;
020 import com.liferay.portal.kernel.json.JSONArray;
021 import com.liferay.portal.kernel.json.JSONObject;
022 import com.liferay.portal.kernel.util.UnicodeProperties;
023 import com.liferay.portal.kernel.workflow.WorkflowTask;
024 import com.liferay.portal.kernel.xml.Element;
025 import com.liferay.portal.model.Group;
026 import com.liferay.portal.model.Layout;
027 import com.liferay.portal.model.LayoutRevision;
028 import com.liferay.portal.model.Portlet;
029 import com.liferay.portal.model.User;
030 import com.liferay.portal.service.ServiceContext;
031 import com.liferay.portlet.exportimport.lar.MissingReference;
032 import com.liferay.portlet.exportimport.lar.PortletDataContext;
033 import com.liferay.portlet.exportimport.model.ExportImportConfiguration;
034
035 import java.io.Serializable;
036
037 import java.util.Date;
038 import java.util.List;
039 import java.util.Locale;
040 import java.util.Map;
041
042 import javax.portlet.PortletPreferences;
043 import javax.portlet.PortletRequest;
044
045 import javax.servlet.http.HttpServletRequest;
046
047
050 @ProviderType
051 public interface Staging {
052
053 public String buildRemoteURL(
054 String remoteAddress, int remotePort, String remotePathContext,
055 boolean secureConnection);
056
057
061 @Deprecated
062 public String buildRemoteURL(
063 String remoteAddress, int remotePort, String remotePathContext,
064 boolean secureConnection, long remoteGroupId, boolean privateLayout);
065
066 public String buildRemoteURL(UnicodeProperties typeSettingsProperties);
067
068
074 @Deprecated
075 public void checkDefaultLayoutSetBranches(
076 long userId, Group liveGroup, boolean branchingPublic,
077 boolean branchingPrivate, boolean remote,
078 ServiceContext serviceContext)
079 throws PortalException;
080
081 public void copyFromLive(PortletRequest PortletRequest)
082 throws PortalException;
083
084 public void copyFromLive(PortletRequest PortletRequest, Portlet portlet)
085 throws PortalException;
086
087
091 @Deprecated
092 public void copyPortlet(
093 PortletRequest PortletRequest, long sourceGroupId,
094 long targetGroupId, long sourcePlid, long targetPlid,
095 String portletId)
096 throws PortalException;
097
098 public void copyRemoteLayouts(
099 ExportImportConfiguration exportImportConfiguration)
100 throws PortalException;
101
102 public void copyRemoteLayouts(long exportImportConfigurationId)
103 throws PortalException;
104
105 public void copyRemoteLayouts(
106 long sourceGroupId, boolean privateLayout,
107 Map<Long, Boolean> layoutIdMap, Map<String, String[]> parameterMap,
108 String remoteAddress, int remotePort, String remotePathContext,
109 boolean secureConnection, long remoteGroupId,
110 boolean remotePrivateLayout)
111 throws PortalException;
112
113
118 @Deprecated
119 public void copyRemoteLayouts(
120 long sourceGroupId, boolean privateLayout,
121 Map<Long, Boolean> layoutIdMap, Map<String, String[]> parameterMap,
122 String remoteAddress, int remotePort, String remotePathContext,
123 boolean secureConnection, long remoteGroupId,
124 boolean remotePrivateLayout, Date startDate, Date endDate)
125 throws PortalException;
126
127 public void copyRemoteLayouts(
128 long sourceGroupId, boolean privateLayout,
129 Map<Long, Boolean> layoutIdMap, String name,
130 Map<String, String[]> parameterMap, String remoteAddress,
131 int remotePort, String remotePathContext, boolean secureConnection,
132 long remoteGroupId, boolean remotePrivateLayout)
133 throws PortalException;
134
135 public void deleteLastImportSettings(Group liveGroup, boolean privateLayout)
136 throws PortalException;
137
138 public void deleteRecentLayoutRevisionId(
139 HttpServletRequest request, long layoutSetBranchId, long plid);
140
141 public void deleteRecentLayoutRevisionId(
142 long userId, long layoutSetBranchId, long plid);
143
144
148 @Deprecated
149 public void deleteRecentLayoutRevisionId(
150 User user, long layoutSetBranchId, long plid);
151
152
157 @Deprecated
158 public void disableStaging(
159 Group scopeGroup, Group liveGroup, ServiceContext serviceContext)
160 throws Exception;
161
162
167 @Deprecated
168 public void disableStaging(Group liveGroup, ServiceContext serviceContext)
169 throws Exception;
170
171
176 @Deprecated
177 public void disableStaging(
178 PortletRequest portletRequest, Group scopeGroup, Group liveGroup,
179 ServiceContext serviceContext)
180 throws Exception;
181
182
187 @Deprecated
188 public void disableStaging(
189 PortletRequest portletRequest, Group liveGroup,
190 ServiceContext serviceContext)
191 throws Exception;
192
193
198 @Deprecated
199 public void enableLocalStaging(
200 long userId, Group scopeGroup, Group liveGroup,
201 boolean branchingPublic, boolean branchingPrivate,
202 ServiceContext serviceContext)
203 throws Exception;
204
205
211 @Deprecated
212 public void enableRemoteStaging(
213 long userId, Group scopeGroup, Group liveGroup,
214 boolean branchingPublic, boolean branchingPrivate,
215 String remoteAddress, int remotePort, String remotePathContext,
216 boolean secureConnection, long remoteGroupId,
217 ServiceContext serviceContext)
218 throws Exception;
219
220 public JSONArray getErrorMessagesJSONArray(
221 Locale locale, Map<String, MissingReference> missingReferences);
222
223
228 @Deprecated
229 public JSONArray getErrorMessagesJSONArray(
230 Locale locale, Map<String, MissingReference> missingReferences,
231 Map<String, Serializable> contextMap);
232
233 public JSONObject getExceptionMessagesJSONObject(
234 Locale locale, Exception e,
235 ExportImportConfiguration exportImportConfiguration);
236
237
242 @Deprecated
243 public JSONObject getExceptionMessagesJSONObject(
244 Locale locale, Exception e, Map<String, Serializable> contextMap);
245
246 public Group getLiveGroup(long groupId);
247
248 public long getLiveGroupId(long groupId);
249
250
255 @Deprecated
256 public List<Layout> getMissingParentLayouts(Layout layout, long liveGroupId)
257 throws PortalException;
258
259 public long getRecentLayoutRevisionId(
260 HttpServletRequest request, long layoutSetBranchId, long plid)
261 throws PortalException;
262
263 public long getRecentLayoutRevisionId(
264 User user, long layoutSetBranchId, long plid)
265 throws PortalException;
266
267 public long getRecentLayoutSetBranchId(
268 HttpServletRequest request, long layoutSetId);
269
270 public long getRecentLayoutSetBranchId(User user, long layoutSetId);
271
272 public String getRemoteSiteURL(Group stagingGroup, boolean privateLayout)
273 throws PortalException;
274
275 public String getSchedulerGroupName(String destinationName, long groupId);
276
277 public String getStagedPortletId(String portletId);
278
279 public long[] getStagingAndLiveGroupIds(long groupId)
280 throws PortalException;
281
282 public Group getStagingGroup(long groupId);
283
284
289 @Deprecated
290 public Map<String, String[]> getStagingParameters();
291
292
297 @Deprecated
298 public Map<String, String[]> getStagingParameters(
299 PortletRequest PortletRequest);
300
301 public JSONArray getWarningMessagesJSONArray(
302 Locale locale, Map<String, MissingReference> missingReferences);
303
304
309 @Deprecated
310 public JSONArray getWarningMessagesJSONArray(
311 Locale locale, Map<String, MissingReference> missingReferences,
312 Map<String, Serializable> contextMap);
313
314 public WorkflowTask getWorkflowTask(
315 long userId, LayoutRevision layoutRevision)
316 throws PortalException;
317
318 public boolean hasWorkflowTask(long userId, LayoutRevision layoutRevision)
319 throws PortalException;
320
321 public boolean isIncomplete(Layout layout, long layoutSetBranchId);
322
323
328 @Deprecated
329 public void lockGroup(long userId, long groupId) throws PortalException;
330
331 public void publishLayout(
332 long userId, long plid, long liveGroupId, boolean includeChildren)
333 throws PortalException;
334
335 public void publishLayouts(
336 long userId, ExportImportConfiguration exportImportConfiguration)
337 throws PortalException;
338
339 public void publishLayouts(long userId, long exportImportConfigurationId)
340 throws PortalException;
341
342 public void publishLayouts(
343 long userId, long sourceGroupId, long targetGroupId,
344 boolean privateLayout, long[] layoutIds,
345 Map<String, String[]> parameterMap)
346 throws PortalException;
347
348
352 @Deprecated
353 public void publishLayouts(
354 long userId, long sourceGroupId, long targetGroupId,
355 boolean privateLayout, long[] layoutIds,
356 Map<String, String[]> parameterMap, Date startDate, Date endDate)
357 throws PortalException;
358
359 public void publishLayouts(
360 long userId, long sourceGroupId, long targetGroupId,
361 boolean privateLayout, long[] layoutIds, String name,
362 Map<String, String[]> parameterMap)
363 throws PortalException;
364
365
369 @Deprecated
370 public void publishLayouts(
371 long userId, long sourceGroupId, long targetGroupId,
372 boolean privateLayout, Map<Long, Boolean> layoutIdMap,
373 Map<String, String[]> parameterMap, Date startDate, Date endDate)
374 throws PortalException;
375
376 public void publishLayouts(
377 long userId, long sourceGroupId, long targetGroupId,
378 boolean privateLayout, Map<String, String[]> parameterMap)
379 throws PortalException;
380
381
385 @Deprecated
386 public void publishLayouts(
387 long userId, long sourceGroupId, long targetGroupId,
388 boolean privateLayout, Map<String, String[]> parameterMap,
389 Date startDate, Date endDate)
390 throws PortalException;
391
392 public void publishPortlet(
393 long userId, ExportImportConfiguration exportImportConfiguration)
394 throws PortalException;
395
396 public void publishPortlet(long userId, long exportImportConfigurationId)
397 throws PortalException;
398
399 public void publishPortlet(
400 long userId, long sourceGroupId, long targetGroupId,
401 long sourcePlid, long targetPlid, String portletId,
402 Map<String, String[]> parameterMap)
403 throws PortalException;
404
405 public void publishToLive(PortletRequest PortletRequest)
406 throws PortalException;
407
408 public void publishToLive(PortletRequest PortletRequest, Portlet portlet)
409 throws PortalException;
410
411 public void publishToRemote(PortletRequest PortletRequest)
412 throws PortalException;
413
414 public void scheduleCopyFromLive(PortletRequest PortletRequest)
415 throws PortalException;
416
417 public void schedulePublishToLive(PortletRequest PortletRequest)
418 throws PortalException;
419
420 public void schedulePublishToRemote(PortletRequest PortletRequest)
421 throws PortalException;
422
423 public void setRecentLayoutBranchId(
424 HttpServletRequest request, long layoutSetBranchId, long plid,
425 long layoutBranchId)
426 throws PortalException;
427
428 public void setRecentLayoutBranchId(
429 User user, long layoutSetBranchId, long plid, long layoutBranchId)
430 throws PortalException;
431
432 public void setRecentLayoutRevisionId(
433 HttpServletRequest request, long layoutSetBranchId, long plid,
434 long layoutRevisionId)
435 throws PortalException;
436
437 public void setRecentLayoutRevisionId(
438 User user, long layoutSetBranchId, long plid, long layoutRevisionId)
439 throws PortalException;
440
441 public void setRecentLayoutSetBranchId(
442 HttpServletRequest request, long layoutSetId,
443 long layoutSetBranchId)
444 throws PortalException;
445
446 public void setRecentLayoutSetBranchId(
447 User user, long layoutSetId, long layoutSetBranchId)
448 throws PortalException;
449
450 public String stripProtocolFromRemoteAddress(String remoteAddress);
451
452
457 @Deprecated
458 public void unlockGroup(long groupId);
459
460 public void unscheduleCopyFromLive(PortletRequest PortletRequest)
461 throws PortalException;
462
463 public void unschedulePublishToLive(PortletRequest PortletRequest)
464 throws PortalException;
465
466 public void unschedulePublishToRemote(PortletRequest PortletRequest)
467 throws PortalException;
468
469 public void updateLastImportSettings(
470 Element layoutElement, Layout layout,
471 PortletDataContext portletDataContext)
472 throws PortalException;
473
474
480 @Deprecated
481 public void updateLastPublishDate(
482 long sourceGroupId, boolean privateLayout, Date lastPublishDate)
483 throws PortalException;
484
485
491 @Deprecated
492 public void updateLastPublishDate(
493 String portletId, PortletPreferences portletPreferences,
494 Date lastPublishDate)
495 throws PortalException;
496
497 public void updateStaging(PortletRequest PortletRequest, Group liveGroup)
498 throws PortalException;
499
500 public void validateRemote(
501 long groupId, String remoteAddress, int remotePort,
502 String remotePathContext, boolean secureConnection,
503 long remoteGroupId)
504 throws PortalException;
505
506
510 @Deprecated
511 public void validateRemote(
512 String remoteAddress, int remotePort, String remotePathContext,
513 boolean secureConnection, long remoteGroupId)
514 throws PortalException;
515
516 }