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 Map<String, Serializable> contextMap);
206
207 public JSONObject getExceptionMessagesJSONObject(
208 Locale locale, Exception e, Map<String, Serializable> contextMap);
209
210 public Group getLiveGroup(long groupId);
211
212 public long getLiveGroupId(long groupId);
213
214
219 @Deprecated
220 public List<Layout> getMissingParentLayouts(Layout layout, long liveGroupId)
221 throws PortalException;
222
223 public long getRecentLayoutRevisionId(
224 HttpServletRequest request, long layoutSetBranchId, long plid)
225 throws PortalException;
226
227 public long getRecentLayoutRevisionId(
228 User user, long layoutSetBranchId, long plid)
229 throws PortalException;
230
231 public long getRecentLayoutSetBranchId(
232 HttpServletRequest request, long layoutSetId);
233
234 public long getRecentLayoutSetBranchId(User user, long layoutSetId);
235
236 public String getSchedulerGroupName(String destinationName, long groupId);
237
238 public String getStagedPortletId(String portletId);
239
240 public Group getStagingGroup(long groupId);
241
242
247 @Deprecated
248 public Map<String, String[]> getStagingParameters();
249
250
255 @Deprecated
256 public Map<String, String[]> getStagingParameters(
257 PortletRequest PortletRequest);
258
259 public JSONArray getWarningMessagesJSONArray(
260 Locale locale, Map<String, MissingReference> missingReferences,
261 Map<String, Serializable> contextMap);
262
263 public WorkflowTask getWorkflowTask(
264 long userId, LayoutRevision layoutRevision)
265 throws PortalException;
266
267 public boolean hasWorkflowTask(long userId, LayoutRevision layoutRevision)
268 throws PortalException;
269
270 public boolean isIncomplete(Layout layout, long layoutSetBranchId);
271
272
277 @Deprecated
278 public void lockGroup(long userId, long groupId) throws PortalException;
279
280 public void publishLayout(
281 long userId, long plid, long liveGroupId, boolean includeChildren)
282 throws PortalException;
283
284 public void publishLayouts(
285 long userId, ExportImportConfiguration exportImportConfiguration)
286 throws PortalException;
287
288 public void publishLayouts(long userId, long exportImportConfigurationId)
289 throws PortalException;
290
291 public void publishLayouts(
292 long userId, long sourceGroupId, long targetGroupId,
293 boolean privateLayout, long[] layoutIds,
294 Map<String, String[]> parameterMap)
295 throws PortalException;
296
297
301 @Deprecated
302 public void publishLayouts(
303 long userId, long sourceGroupId, long targetGroupId,
304 boolean privateLayout, long[] layoutIds,
305 Map<String, String[]> parameterMap, Date startDate, Date endDate)
306 throws PortalException;
307
308
312 @Deprecated
313 public void publishLayouts(
314 long userId, long sourceGroupId, long targetGroupId,
315 boolean privateLayout, Map<Long, Boolean> layoutIdMap,
316 Map<String, String[]> parameterMap, Date startDate, Date endDate)
317 throws PortalException;
318
319 public void publishLayouts(
320 long userId, long sourceGroupId, long targetGroupId,
321 boolean privateLayout, Map<String, String[]> parameterMap)
322 throws PortalException;
323
324
328 @Deprecated
329 public void publishLayouts(
330 long userId, long sourceGroupId, long targetGroupId,
331 boolean privateLayout, Map<String, String[]> parameterMap,
332 Date startDate, Date endDate)
333 throws PortalException;
334
335 public void publishPortlet(
336 long userId, ExportImportConfiguration exportImportConfiguration)
337 throws PortalException;
338
339 public void publishPortlet(long userId, long exportImportConfigurationId)
340 throws PortalException;
341
342 public void publishPortlet(
343 long userId, long sourceGroupId, long targetGroupId,
344 long sourcePlid, long targetPlid, String portletId,
345 Map<String, String[]> parameterMap)
346 throws PortalException;
347
348 public void publishToLive(PortletRequest PortletRequest)
349 throws PortalException;
350
351 public void publishToLive(PortletRequest PortletRequest, Portlet portlet)
352 throws PortalException;
353
354 public void publishToRemote(PortletRequest PortletRequest)
355 throws PortalException;
356
357 public void scheduleCopyFromLive(PortletRequest PortletRequest)
358 throws PortalException;
359
360 public void schedulePublishToLive(PortletRequest PortletRequest)
361 throws PortalException;
362
363 public void schedulePublishToRemote(PortletRequest PortletRequest)
364 throws PortalException;
365
366 public void setRecentLayoutBranchId(
367 HttpServletRequest request, long layoutSetBranchId, long plid,
368 long layoutBranchId);
369
370 public void setRecentLayoutBranchId(
371 User user, long layoutSetBranchId, long plid, long layoutBranchId);
372
373 public void setRecentLayoutRevisionId(
374 HttpServletRequest request, long layoutSetBranchId, long plid,
375 long layoutRevisionId);
376
377 public void setRecentLayoutRevisionId(
378 User user, long layoutSetBranchId, long plid, long layoutRevisionId);
379
380 public void setRecentLayoutSetBranchId(
381 HttpServletRequest request, long layoutSetId, long layoutSetBranchId);
382
383 public void setRecentLayoutSetBranchId(
384 User user, long layoutSetId, long layoutSetBranchId);
385
386 public String stripProtocolFromRemoteAddress(String remoteAddress);
387
388
393 @Deprecated
394 public void unlockGroup(long groupId);
395
396 public void unscheduleCopyFromLive(PortletRequest PortletRequest)
397 throws PortalException;
398
399 public void unschedulePublishToLive(PortletRequest PortletRequest)
400 throws PortalException;
401
402 public void unschedulePublishToRemote(PortletRequest PortletRequest)
403 throws PortalException;
404
405 public void updateLastImportSettings(
406 Element layoutElement, Layout layout,
407 PortletDataContext portletDataContext)
408 throws PortalException;
409
410
416 @Deprecated
417 public void updateLastPublishDate(
418 long sourceGroupId, boolean privateLayout, Date lastPublishDate)
419 throws PortalException;
420
421
427 @Deprecated
428 public void updateLastPublishDate(
429 String portletId, PortletPreferences portletPreferences,
430 Date lastPublishDate)
431 throws PortalException;
432
433 public void updateStaging(PortletRequest PortletRequest, Group liveGroup)
434 throws PortalException;
435
436 public void validateRemote(
437 long groupId, String remoteAddress, int remotePort,
438 String remotePathContext, boolean secureConnection,
439 long remoteGroupId)
440 throws PortalException;
441
442
446 @Deprecated
447 public void validateRemote(
448 String remoteAddress, int remotePort, String remotePathContext,
449 boolean secureConnection, long remoteGroupId)
450 throws PortalException;
451
452 }