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, long remoteGroupId, boolean privateLayout);
056
057 public String buildRemoteURL(UnicodeProperties typeSettingsProperties);
058
059
065 @Deprecated
066 public void checkDefaultLayoutSetBranches(
067 long userId, Group liveGroup, boolean branchingPublic,
068 boolean branchingPrivate, boolean remote,
069 ServiceContext serviceContext)
070 throws PortalException;
071
072 public void copyFromLive(PortletRequest PortletRequest)
073 throws PortalException;
074
075 public void copyFromLive(PortletRequest PortletRequest, Portlet portlet)
076 throws PortalException;
077
078
082 @Deprecated
083 public void copyPortlet(
084 PortletRequest PortletRequest, long sourceGroupId,
085 long targetGroupId, long sourcePlid, long targetPlid,
086 String portletId)
087 throws PortalException;
088
089 public void copyRemoteLayouts(
090 ExportImportConfiguration exportImportConfiguration)
091 throws PortalException;
092
093 public void copyRemoteLayouts(long exportImportConfigurationId)
094 throws PortalException;
095
096 public void copyRemoteLayouts(
097 long sourceGroupId, boolean privateLayout,
098 Map<Long, Boolean> layoutIdMap, Map<String, String[]> parameterMap,
099 String remoteAddress, int remotePort, String remotePathContext,
100 boolean secureConnection, long remoteGroupId,
101 boolean remotePrivateLayout)
102 throws PortalException;
103
104
109 @Deprecated
110 public void copyRemoteLayouts(
111 long sourceGroupId, boolean privateLayout,
112 Map<Long, Boolean> layoutIdMap, Map<String, String[]> parameterMap,
113 String remoteAddress, int remotePort, String remotePathContext,
114 boolean secureConnection, long remoteGroupId,
115 boolean remotePrivateLayout, Date startDate, Date endDate)
116 throws PortalException;
117
118 public void deleteLastImportSettings(Group liveGroup, boolean privateLayout)
119 throws PortalException;
120
121 public void deleteRecentLayoutRevisionId(
122 HttpServletRequest request, long layoutSetBranchId, long plid);
123
124 public void deleteRecentLayoutRevisionId(
125 long userId, long layoutSetBranchId, long plid);
126
127
131 @Deprecated
132 public void deleteRecentLayoutRevisionId(
133 User user, long layoutSetBranchId, long plid);
134
135
140 @Deprecated
141 public void disableStaging(
142 Group scopeGroup, Group liveGroup, ServiceContext serviceContext)
143 throws Exception;
144
145
150 @Deprecated
151 public void disableStaging(Group liveGroup, ServiceContext serviceContext)
152 throws Exception;
153
154
159 @Deprecated
160 public void disableStaging(
161 PortletRequest portletRequest, Group scopeGroup, Group liveGroup,
162 ServiceContext serviceContext)
163 throws Exception;
164
165
170 @Deprecated
171 public void disableStaging(
172 PortletRequest portletRequest, Group liveGroup,
173 ServiceContext serviceContext)
174 throws Exception;
175
176
181 @Deprecated
182 public void enableLocalStaging(
183 long userId, Group scopeGroup, Group liveGroup,
184 boolean branchingPublic, boolean branchingPrivate,
185 ServiceContext serviceContext)
186 throws Exception;
187
188
194 @Deprecated
195 public void enableRemoteStaging(
196 long userId, Group scopeGroup, Group liveGroup,
197 boolean branchingPublic, boolean branchingPrivate,
198 String remoteAddress, int remotePort, String remotePathContext,
199 boolean secureConnection, long remoteGroupId,
200 ServiceContext serviceContext)
201 throws Exception;
202
203 public JSONArray getErrorMessagesJSONArray(
204 Locale locale, Map<String, MissingReference> missingReferences);
205
206
211 @Deprecated
212 public JSONArray getErrorMessagesJSONArray(
213 Locale locale, Map<String, MissingReference> missingReferences,
214 Map<String, Serializable> contextMap);
215
216 public JSONObject getExceptionMessagesJSONObject(
217 Locale locale, Exception e,
218 ExportImportConfiguration exportImportConfiguration);
219
220
225 @Deprecated
226 public JSONObject getExceptionMessagesJSONObject(
227 Locale locale, Exception e, Map<String, Serializable> contextMap);
228
229 public Group getLiveGroup(long groupId);
230
231 public long getLiveGroupId(long groupId);
232
233
238 @Deprecated
239 public List<Layout> getMissingParentLayouts(Layout layout, long liveGroupId)
240 throws PortalException;
241
242 public long getRecentLayoutRevisionId(
243 HttpServletRequest request, long layoutSetBranchId, long plid)
244 throws PortalException;
245
246 public long getRecentLayoutRevisionId(
247 User user, long layoutSetBranchId, long plid)
248 throws PortalException;
249
250 public long getRecentLayoutSetBranchId(
251 HttpServletRequest request, long layoutSetId);
252
253 public long getRecentLayoutSetBranchId(User user, long layoutSetId);
254
255 public String getSchedulerGroupName(String destinationName, long groupId);
256
257 public String getStagedPortletId(String portletId);
258
259 public Group getStagingGroup(long groupId);
260
261
266 @Deprecated
267 public Map<String, String[]> getStagingParameters();
268
269
274 @Deprecated
275 public Map<String, String[]> getStagingParameters(
276 PortletRequest PortletRequest);
277
278 public JSONArray getWarningMessagesJSONArray(
279 Locale locale, Map<String, MissingReference> missingReferences);
280
281
286 @Deprecated
287 public JSONArray getWarningMessagesJSONArray(
288 Locale locale, Map<String, MissingReference> missingReferences,
289 Map<String, Serializable> contextMap);
290
291 public WorkflowTask getWorkflowTask(
292 long userId, LayoutRevision layoutRevision)
293 throws PortalException;
294
295 public boolean hasWorkflowTask(long userId, LayoutRevision layoutRevision)
296 throws PortalException;
297
298 public boolean isIncomplete(Layout layout, long layoutSetBranchId);
299
300
305 @Deprecated
306 public void lockGroup(long userId, long groupId) throws PortalException;
307
308 public void publishLayout(
309 long userId, long plid, long liveGroupId, boolean includeChildren)
310 throws PortalException;
311
312 public void publishLayouts(
313 long userId, ExportImportConfiguration exportImportConfiguration)
314 throws PortalException;
315
316 public void publishLayouts(long userId, long exportImportConfigurationId)
317 throws PortalException;
318
319 public void publishLayouts(
320 long userId, long sourceGroupId, long targetGroupId,
321 boolean privateLayout, long[] layoutIds,
322 Map<String, String[]> parameterMap)
323 throws PortalException;
324
325
329 @Deprecated
330 public void publishLayouts(
331 long userId, long sourceGroupId, long targetGroupId,
332 boolean privateLayout, long[] layoutIds,
333 Map<String, String[]> parameterMap, Date startDate, Date endDate)
334 throws PortalException;
335
336
340 @Deprecated
341 public void publishLayouts(
342 long userId, long sourceGroupId, long targetGroupId,
343 boolean privateLayout, Map<Long, Boolean> layoutIdMap,
344 Map<String, String[]> parameterMap, Date startDate, Date endDate)
345 throws PortalException;
346
347 public void publishLayouts(
348 long userId, long sourceGroupId, long targetGroupId,
349 boolean privateLayout, Map<String, String[]> parameterMap)
350 throws PortalException;
351
352
356 @Deprecated
357 public void publishLayouts(
358 long userId, long sourceGroupId, long targetGroupId,
359 boolean privateLayout, Map<String, String[]> parameterMap,
360 Date startDate, Date endDate)
361 throws PortalException;
362
363 public void publishPortlet(
364 long userId, ExportImportConfiguration exportImportConfiguration)
365 throws PortalException;
366
367 public void publishPortlet(long userId, long exportImportConfigurationId)
368 throws PortalException;
369
370 public void publishPortlet(
371 long userId, long sourceGroupId, long targetGroupId,
372 long sourcePlid, long targetPlid, String portletId,
373 Map<String, String[]> parameterMap)
374 throws PortalException;
375
376 public void publishToLive(PortletRequest PortletRequest)
377 throws PortalException;
378
379 public void publishToLive(PortletRequest PortletRequest, Portlet portlet)
380 throws PortalException;
381
382 public void publishToRemote(PortletRequest PortletRequest)
383 throws PortalException;
384
385 public void scheduleCopyFromLive(PortletRequest PortletRequest)
386 throws PortalException;
387
388 public void schedulePublishToLive(PortletRequest PortletRequest)
389 throws PortalException;
390
391 public void schedulePublishToRemote(PortletRequest PortletRequest)
392 throws PortalException;
393
394 public void setRecentLayoutBranchId(
395 HttpServletRequest request, long layoutSetBranchId, long plid,
396 long layoutBranchId);
397
398 public void setRecentLayoutBranchId(
399 User user, long layoutSetBranchId, long plid, long layoutBranchId);
400
401 public void setRecentLayoutRevisionId(
402 HttpServletRequest request, long layoutSetBranchId, long plid,
403 long layoutRevisionId);
404
405 public void setRecentLayoutRevisionId(
406 User user, long layoutSetBranchId, long plid, long layoutRevisionId);
407
408 public void setRecentLayoutSetBranchId(
409 HttpServletRequest request, long layoutSetId, long layoutSetBranchId);
410
411 public void setRecentLayoutSetBranchId(
412 User user, long layoutSetId, long layoutSetBranchId);
413
414 public String stripProtocolFromRemoteAddress(String remoteAddress);
415
416
421 @Deprecated
422 public void unlockGroup(long groupId);
423
424 public void unscheduleCopyFromLive(PortletRequest PortletRequest)
425 throws PortalException;
426
427 public void unschedulePublishToLive(PortletRequest PortletRequest)
428 throws PortalException;
429
430 public void unschedulePublishToRemote(PortletRequest PortletRequest)
431 throws PortalException;
432
433 public void updateLastImportSettings(
434 Element layoutElement, Layout layout,
435 PortletDataContext portletDataContext)
436 throws PortalException;
437
438
444 @Deprecated
445 public void updateLastPublishDate(
446 long sourceGroupId, boolean privateLayout, Date lastPublishDate)
447 throws PortalException;
448
449
455 @Deprecated
456 public void updateLastPublishDate(
457 String portletId, PortletPreferences portletPreferences,
458 Date lastPublishDate)
459 throws PortalException;
460
461 public void updateStaging(PortletRequest PortletRequest, Group liveGroup)
462 throws PortalException;
463
464 public void validateRemote(
465 long groupId, String remoteAddress, int remotePort,
466 String remotePathContext, boolean secureConnection,
467 long remoteGroupId)
468 throws PortalException;
469
470
474 @Deprecated
475 public void validateRemote(
476 String remoteAddress, int remotePort, String remotePathContext,
477 boolean secureConnection, long remoteGroupId)
478 throws PortalException;
479
480 }