001
014
015 package com.liferay.exportimport.kernel.staging;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.exportimport.kernel.lar.MissingReference;
020 import com.liferay.exportimport.kernel.lar.PortletDataContext;
021 import com.liferay.exportimport.kernel.model.ExportImportConfiguration;
022 import com.liferay.portal.kernel.exception.PortalException;
023 import com.liferay.portal.kernel.json.JSONArray;
024 import com.liferay.portal.kernel.json.JSONObject;
025 import com.liferay.portal.kernel.model.Group;
026 import com.liferay.portal.kernel.model.Layout;
027 import com.liferay.portal.kernel.model.LayoutRevision;
028 import com.liferay.portal.kernel.model.Portlet;
029 import com.liferay.portal.kernel.model.User;
030 import com.liferay.portal.kernel.service.ServiceContext;
031 import com.liferay.portal.kernel.util.UnicodeProperties;
032 import com.liferay.portal.kernel.workflow.WorkflowTask;
033 import com.liferay.portal.kernel.xml.Element;
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 long copyFromLive(PortletRequest portletRequest)
082 throws PortalException;
083
084 public long copyFromLive(PortletRequest portletRequest, Portlet portlet)
085 throws PortalException;
086
087
091 @Deprecated
092 public long copyPortlet(
093 PortletRequest portletRequest, long sourceGroupId,
094 long targetGroupId, long sourcePlid, long targetPlid,
095 String portletId)
096 throws PortalException;
097
098 public long copyRemoteLayouts(
099 ExportImportConfiguration exportImportConfiguration)
100 throws PortalException;
101
102 public long copyRemoteLayouts(long exportImportConfigurationId)
103 throws PortalException;
104
105 public long 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 long 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 long 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 public JSONArray getErrorMessagesJSONArray(
153 Locale locale, Map<String, MissingReference> missingReferences);
154
155
160 @Deprecated
161 public JSONArray getErrorMessagesJSONArray(
162 Locale locale, Map<String, MissingReference> missingReferences,
163 Map<String, Serializable> contextMap);
164
165 public JSONObject getExceptionMessagesJSONObject(
166 Locale locale, Exception e,
167 ExportImportConfiguration exportImportConfiguration);
168
169
174 @Deprecated
175 public JSONObject getExceptionMessagesJSONObject(
176 Locale locale, Exception e, Map<String, Serializable> contextMap);
177
178 public Group getLiveGroup(long groupId);
179
180 public long getLiveGroupId(long groupId);
181
182
187 @Deprecated
188 public List<Layout> getMissingParentLayouts(Layout layout, long liveGroupId)
189 throws PortalException;
190
191 public long getRecentLayoutRevisionId(
192 HttpServletRequest request, long layoutSetBranchId, long plid)
193 throws PortalException;
194
195 public long getRecentLayoutRevisionId(
196 User user, long layoutSetBranchId, long plid)
197 throws PortalException;
198
199 public long getRecentLayoutSetBranchId(
200 HttpServletRequest request, long layoutSetId);
201
202 public long getRecentLayoutSetBranchId(User user, long layoutSetId);
203
204 public String getRemoteSiteURL(Group stagingGroup, boolean privateLayout)
205 throws PortalException;
206
207 public String getSchedulerGroupName(String destinationName, long groupId);
208
209 public String getStagedPortletId(String portletId);
210
211 public long[] getStagingAndLiveGroupIds(long groupId)
212 throws PortalException;
213
214 public Group getStagingGroup(long groupId);
215
216
221 @Deprecated
222 public Map<String, String[]> getStagingParameters();
223
224
229 @Deprecated
230 public Map<String, String[]> getStagingParameters(
231 PortletRequest portletRequest);
232
233 public JSONArray getWarningMessagesJSONArray(
234 Locale locale, Map<String, MissingReference> missingReferences);
235
236
241 @Deprecated
242 public JSONArray getWarningMessagesJSONArray(
243 Locale locale, Map<String, MissingReference> missingReferences,
244 Map<String, Serializable> contextMap);
245
246 public WorkflowTask getWorkflowTask(
247 long userId, LayoutRevision layoutRevision)
248 throws PortalException;
249
250 public boolean hasWorkflowTask(long userId, LayoutRevision layoutRevision)
251 throws PortalException;
252
253 public boolean isGroupAccessible(Group group, Group fromGroup);
254
255 public boolean isGroupAccessible(long groupId, long fromGroupId)
256 throws PortalException;
257
258 public boolean isIncomplete(Layout layout, long layoutSetBranchId);
259
260
265 @Deprecated
266 public void lockGroup(long userId, long groupId) throws PortalException;
267
268 public long publishLayout(
269 long userId, long plid, long liveGroupId, boolean includeChildren)
270 throws PortalException;
271
272 public long publishLayouts(
273 long userId, ExportImportConfiguration exportImportConfiguration)
274 throws PortalException;
275
276 public long publishLayouts(long userId, long exportImportConfigurationId)
277 throws PortalException;
278
279 public long publishLayouts(
280 long userId, long sourceGroupId, long targetGroupId,
281 boolean privateLayout, long[] layoutIds,
282 Map<String, String[]> parameterMap)
283 throws PortalException;
284
285
289 @Deprecated
290 public long publishLayouts(
291 long userId, long sourceGroupId, long targetGroupId,
292 boolean privateLayout, long[] layoutIds,
293 Map<String, String[]> parameterMap, Date startDate, Date endDate)
294 throws PortalException;
295
296 public long publishLayouts(
297 long userId, long sourceGroupId, long targetGroupId,
298 boolean privateLayout, long[] layoutIds, String name,
299 Map<String, String[]> parameterMap)
300 throws PortalException;
301
302
306 @Deprecated
307 public long publishLayouts(
308 long userId, long sourceGroupId, long targetGroupId,
309 boolean privateLayout, Map<Long, Boolean> layoutIdMap,
310 Map<String, String[]> parameterMap, Date startDate, Date endDate)
311 throws PortalException;
312
313 public long publishLayouts(
314 long userId, long sourceGroupId, long targetGroupId,
315 boolean privateLayout, Map<String, String[]> parameterMap)
316 throws PortalException;
317
318
322 @Deprecated
323 public long publishLayouts(
324 long userId, long sourceGroupId, long targetGroupId,
325 boolean privateLayout, Map<String, String[]> parameterMap,
326 Date startDate, Date endDate)
327 throws PortalException;
328
329 public long publishPortlet(
330 long userId, ExportImportConfiguration exportImportConfiguration)
331 throws PortalException;
332
333 public long publishPortlet(long userId, long exportImportConfigurationId)
334 throws PortalException;
335
336 public long publishPortlet(
337 long userId, long sourceGroupId, long targetGroupId,
338 long sourcePlid, long targetPlid, String portletId,
339 Map<String, String[]> parameterMap)
340 throws PortalException;
341
342 public long publishToLive(PortletRequest portletRequest)
343 throws PortalException;
344
345 public long publishToLive(PortletRequest portletRequest, Portlet portlet)
346 throws PortalException;
347
348 public long publishToRemote(PortletRequest portletRequest)
349 throws PortalException;
350
351 public void scheduleCopyFromLive(PortletRequest portletRequest)
352 throws PortalException;
353
354 public void schedulePublishToLive(PortletRequest portletRequest)
355 throws PortalException;
356
357 public void schedulePublishToRemote(PortletRequest portletRequest)
358 throws PortalException;
359
360 public void setRecentLayoutBranchId(
361 HttpServletRequest request, long layoutSetBranchId, long plid,
362 long layoutBranchId)
363 throws PortalException;
364
365 public void setRecentLayoutBranchId(
366 User user, long layoutSetBranchId, long plid, long layoutBranchId)
367 throws PortalException;
368
369 public void setRecentLayoutRevisionId(
370 HttpServletRequest request, long layoutSetBranchId, long plid,
371 long layoutRevisionId)
372 throws PortalException;
373
374 public void setRecentLayoutRevisionId(
375 User user, long layoutSetBranchId, long plid, long layoutRevisionId)
376 throws PortalException;
377
378 public void setRecentLayoutSetBranchId(
379 HttpServletRequest request, long layoutSetId,
380 long layoutSetBranchId)
381 throws PortalException;
382
383 public void setRecentLayoutSetBranchId(
384 User user, long layoutSetId, long layoutSetBranchId)
385 throws PortalException;
386
387 public String stripProtocolFromRemoteAddress(String remoteAddress);
388
389
394 @Deprecated
395 public void unlockGroup(long groupId);
396
397 public void unscheduleCopyFromLive(PortletRequest portletRequest)
398 throws PortalException;
399
400 public void unschedulePublishToLive(PortletRequest portletRequest)
401 throws PortalException;
402
403 public void unschedulePublishToRemote(PortletRequest portletRequest)
404 throws PortalException;
405
406 public void updateLastImportSettings(
407 Element layoutElement, Layout layout,
408 PortletDataContext portletDataContext)
409 throws PortalException;
410
411
417 @Deprecated
418 public void updateLastPublishDate(
419 long sourceGroupId, boolean privateLayout, Date lastPublishDate)
420 throws PortalException;
421
422
428 @Deprecated
429 public void updateLastPublishDate(
430 String portletId, PortletPreferences portletPreferences,
431 Date lastPublishDate)
432 throws PortalException;
433
434 public void updateStaging(PortletRequest portletRequest, Group liveGroup)
435 throws PortalException;
436
437 public void validateRemote(
438 long groupId, String remoteAddress, int remotePort,
439 String remotePathContext, boolean secureConnection,
440 long remoteGroupId)
441 throws PortalException;
442
443
447 @Deprecated
448 public void validateRemote(
449 String remoteAddress, int remotePort, String remotePathContext,
450 boolean secureConnection, long remoteGroupId)
451 throws PortalException;
452
453 }