001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
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.ProxyFactory;
023    import com.liferay.portal.kernel.util.UnicodeProperties;
024    import com.liferay.portal.kernel.workflow.WorkflowTask;
025    import com.liferay.portal.kernel.xml.Element;
026    import com.liferay.portal.model.Group;
027    import com.liferay.portal.model.Layout;
028    import com.liferay.portal.model.LayoutRevision;
029    import com.liferay.portal.model.Portlet;
030    import com.liferay.portal.model.User;
031    import com.liferay.portal.service.ServiceContext;
032    import com.liferay.portlet.exportimport.lar.MissingReference;
033    import com.liferay.portlet.exportimport.lar.PortletDataContext;
034    import com.liferay.portlet.exportimport.model.ExportImportConfiguration;
035    
036    import java.io.Serializable;
037    
038    import java.util.Date;
039    import java.util.List;
040    import java.util.Locale;
041    import java.util.Map;
042    
043    import javax.portlet.PortletPreferences;
044    import javax.portlet.PortletRequest;
045    
046    import javax.servlet.http.HttpServletRequest;
047    
048    /**
049     * @author Raymond Aug??
050     */
051    @ProviderType
052    public class StagingUtil {
053    
054            public static String buildRemoteURL(
055                    String remoteAddress, int remotePort, String remotePathContext,
056                    boolean secureConnection, long remoteGroupId, boolean privateLayout) {
057    
058                    return _staging.buildRemoteURL(
059                            remoteAddress, remotePort, remotePathContext, secureConnection,
060                            remoteGroupId, privateLayout);
061            }
062    
063            public static String buildRemoteURL(
064                    UnicodeProperties typeSettingsProperties) {
065    
066                    return _staging.buildRemoteURL(typeSettingsProperties);
067            }
068    
069            /**
070             * @deprecated As of 7.0.0, replaced by {@link
071             *             com.liferay.portlet.exportimport.service.StagingLocalServiceUtil#
072             *             checkDefaultLayoutSetBranches(long, Group, boolean, boolean,
073             *             boolean, ServiceContext)}
074             */
075            @Deprecated
076            public static void checkDefaultLayoutSetBranches(
077                            long userId, Group liveGroup, boolean branchingPublic,
078                            boolean branchingPrivate, boolean remote,
079                            ServiceContext serviceContext)
080                    throws PortalException {
081    
082                    _staging.checkDefaultLayoutSetBranches(
083                            userId, liveGroup, branchingPublic, branchingPrivate, remote,
084                            serviceContext);
085            }
086    
087            public static void copyFromLive(PortletRequest PortletRequest)
088                    throws PortalException {
089    
090                    _staging.copyFromLive(PortletRequest);
091            }
092    
093            public static void copyFromLive(
094                            PortletRequest PortletRequest, Portlet portlet)
095                    throws PortalException {
096    
097                    _staging.copyFromLive(PortletRequest, portlet);
098            }
099    
100            /**
101             * @deprecated As of 7.0.0, replaced by {@link #publishPortlet(long, long,
102             *             long, long, long, String, Map)}
103             */
104            @Deprecated
105            public static void copyPortlet(
106                            PortletRequest PortletRequest, long sourceGroupId,
107                            long targetGroupId, long sourcePlid, long targetPlid,
108                            String portletId)
109                    throws PortalException {
110    
111                    _staging.copyPortlet(
112                            PortletRequest, sourceGroupId, targetGroupId, sourcePlid,
113                            targetPlid, portletId);
114            }
115    
116            public static void copyRemoteLayouts(
117                            ExportImportConfiguration exportImportConfiguration)
118                    throws PortalException {
119    
120                    _staging.copyRemoteLayouts(exportImportConfiguration);
121            }
122    
123            public static void copyRemoteLayouts(long exportImportConfigurationId)
124                    throws PortalException {
125    
126                    _staging.copyRemoteLayouts(exportImportConfigurationId);
127            }
128    
129            public static void copyRemoteLayouts(
130                            long sourceGroupId, boolean privateLayout,
131                            Map<Long, Boolean> layoutIdMap, Map<String, String[]> parameterMap,
132                            String remoteAddress, int remotePort, String remotePathContext,
133                            boolean secureConnection, long remoteGroupId,
134                            boolean remotePrivateLayout)
135                    throws PortalException {
136    
137                    _staging.copyRemoteLayouts(
138                            sourceGroupId, privateLayout, layoutIdMap, parameterMap,
139                            remoteAddress, remotePort, remotePathContext, secureConnection,
140                            remoteGroupId, remotePrivateLayout);
141            }
142    
143            /**
144             * @deprecated As of 7.0.0, replaced by {@link #copyRemoteLayouts(long,
145             *             boolean, Map, Map, String, int, String, boolean, long,
146             *             boolean)}
147             */
148            @Deprecated
149            public static void copyRemoteLayouts(
150                            long sourceGroupId, boolean privateLayout,
151                            Map<Long, Boolean> layoutIdMap, Map<String, String[]> parameterMap,
152                            String remoteAddress, int remotePort, String remotePathContext,
153                            boolean secureConnection, long remoteGroupId,
154                            boolean remotePrivateLayout, Date startDate, Date endDate)
155                    throws PortalException {
156    
157                    _staging.copyRemoteLayouts(
158                            sourceGroupId, privateLayout, layoutIdMap, parameterMap,
159                            remoteAddress, remotePort, remotePathContext, secureConnection,
160                            remoteGroupId, remotePrivateLayout, startDate, endDate);
161            }
162    
163            public static void copyRemoteLayouts(
164                            long sourceGroupId, boolean privateLayout,
165                            Map<Long, Boolean> layoutIdMap, String name,
166                            Map<String, String[]> parameterMap, String remoteAddress,
167                            int remotePort, String remotePathContext, boolean secureConnection,
168                            long remoteGroupId, boolean remotePrivateLayout)
169                    throws PortalException {
170    
171                    _staging.copyRemoteLayouts(
172                            sourceGroupId, privateLayout, layoutIdMap, name, parameterMap,
173                            remoteAddress, remotePort, remotePathContext, secureConnection,
174                            remoteGroupId, remotePrivateLayout);
175            }
176    
177            public static void deleteLastImportSettings(
178                            Group liveGroup, boolean privateLayout)
179                    throws PortalException {
180    
181                    _staging.deleteLastImportSettings(liveGroup, privateLayout);
182            }
183    
184            public static void deleteRecentLayoutRevisionId(
185                    HttpServletRequest request, long layoutSetBranchId, long plid) {
186    
187                    _staging.deleteRecentLayoutRevisionId(request, layoutSetBranchId, plid);
188            }
189    
190            public static void deleteRecentLayoutRevisionId(
191                    long userId, long layoutSetBranchId, long plid) {
192    
193                    _staging.deleteRecentLayoutRevisionId(userId, layoutSetBranchId, plid);
194            }
195    
196            /**
197             * @deprecated As of 7.0.0, replaced by {@link
198             *             #deleteRecentLayoutRevisionId(long, long, long)}
199             */
200            @Deprecated
201            public static void deleteRecentLayoutRevisionId(
202                    User user, long layoutSetBranchId, long plid) {
203    
204                    _staging.deleteRecentLayoutRevisionId(user, layoutSetBranchId, plid);
205            }
206    
207            /**
208             * @deprecated As of 6.2.0, replaced by {@link
209             *             com.liferay.portlet.exportimport.service.StagingLocalService#disableStaging(
210             *             Group, ServiceContext)}
211             */
212            @Deprecated
213            public static void disableStaging(
214                            Group scopeGroup, Group liveGroup, ServiceContext serviceContext)
215                    throws Exception {
216    
217                    _staging.disableStaging(scopeGroup, liveGroup, serviceContext);
218            }
219    
220            /**
221             * @deprecated As of 6.2.0, replaced by {@link
222             *             com.liferay.portlet.exportimport.service.StagingLocalService#disableStaging(
223             *             Group, ServiceContext)}
224             */
225            @Deprecated
226            public static void disableStaging(
227                            Group liveGroup, ServiceContext serviceContext)
228                    throws Exception {
229    
230                    _staging.disableStaging(liveGroup, serviceContext);
231            }
232    
233            /**
234             * @deprecated As of 6.2.0, replaced by {@link
235             *             com.liferay.portlet.exportimport.service.StagingLocalService#disableStaging(
236             *             PortletRequest, Group, ServiceContext)}
237             */
238            @Deprecated
239            public static void disableStaging(
240                            PortletRequest portletRequest, Group scopeGroup, Group liveGroup,
241                            ServiceContext serviceContext)
242                    throws Exception {
243    
244                    _staging.disableStaging(
245                            portletRequest, scopeGroup, liveGroup, serviceContext);
246            }
247    
248            /**
249             * @deprecated As of 6.2.0, replaced by {@link
250             *             com.liferay.portlet.exportimport.service.StagingLocalService#disableStaging(
251             *             PortletRequest, Group, ServiceContext)}
252             */
253            @Deprecated
254            public static void disableStaging(
255                            PortletRequest portletRequest, Group liveGroup,
256                            ServiceContext serviceContext)
257                    throws Exception {
258    
259                    _staging.disableStaging(portletRequest, liveGroup, serviceContext);
260            }
261    
262            /**
263             * @deprecated As of 6.2.0, replaced by {@link
264             *             com.liferay.portlet.exportimport.service.StagingLocalService#enableLocalStaging(
265             *             long, Group, boolean, boolean, ServiceContext)}
266             */
267            @Deprecated
268            public static void enableLocalStaging(
269                            long userId, Group scopeGroup, Group liveGroup,
270                            boolean branchingPublic, boolean branchingPrivate,
271                            ServiceContext serviceContext)
272                    throws Exception {
273    
274                    _staging.enableLocalStaging(
275                            userId, scopeGroup, liveGroup, branchingPublic, branchingPrivate,
276                            serviceContext);
277            }
278    
279            /**
280             * @deprecated As of 6.2.0, replaced by {@link
281             *             com.liferay.portlet.exportimport.service.StagingLocalService#enableRemoteStaging(
282             *             long, Group, boolean, boolean, String, int, String, boolean,
283             *             long, ServiceContext)}
284             */
285            @Deprecated
286            public static void enableRemoteStaging(
287                            long userId, Group scopeGroup, Group liveGroup,
288                            boolean branchingPublic, boolean branchingPrivate,
289                            String remoteAddress, int remotePort, String remotePathContext,
290                            boolean secureConnection, long remoteGroupId,
291                            ServiceContext serviceContext)
292                    throws Exception {
293    
294                    _staging.enableRemoteStaging(
295                            userId, scopeGroup, liveGroup, branchingPublic, branchingPrivate,
296                            remoteAddress, remotePort, remotePathContext, secureConnection,
297                            remoteGroupId, serviceContext);
298            }
299    
300            public static JSONArray getErrorMessagesJSONArray(
301                    Locale locale, Map<String, MissingReference> missingReferences) {
302    
303                    return _staging.getErrorMessagesJSONArray(locale, missingReferences);
304            }
305    
306            /**
307             * @deprecated As of 7.0.0, replaced by {@link
308             *             #getErrorMessagesJSONArray(Locale, Map<String,
309             *             MissingReference>)}
310             */
311            @Deprecated
312            public static JSONArray getErrorMessagesJSONArray(
313                    Locale locale, Map<String, MissingReference> missingReferences,
314                    Map<String, Serializable> contextMap) {
315    
316                    return _staging.getErrorMessagesJSONArray(
317                            locale, missingReferences, contextMap);
318            }
319    
320            public static JSONObject getExceptionMessagesJSONObject(
321                    Locale locale, Exception e,
322                    ExportImportConfiguration exportImportConfiguration) {
323    
324                    return _staging.getExceptionMessagesJSONObject(
325                            locale, e, exportImportConfiguration);
326            }
327    
328            /**
329             * @deprecated As of 7.0.0, replaced by {@link
330             *             #getExceptionMessagesJSONObject(Locale, Exception,
331             *             ExportImportConfiguration)}
332             */
333            @Deprecated
334            public static JSONObject getExceptionMessagesJSONObject(
335                    Locale locale, Exception e, Map<String, Serializable> contextMap) {
336    
337                    return _staging.getExceptionMessagesJSONObject(locale, e, contextMap);
338            }
339    
340            public static Group getLiveGroup(long groupId) {
341                    return _staging.getLiveGroup(groupId);
342            }
343    
344            public static long getLiveGroupId(long groupId) {
345                    return _staging.getLiveGroupId(groupId);
346            }
347    
348            /**
349             * @deprecated As of 7.0.0, moved to {@link
350             *             com.liferay.portlet.exportimport.lar.ExportImportHelperUtil#getMissingParentLayouts(
351             *             Layout, long)}
352             */
353            @Deprecated
354            public static List<Layout> getMissingParentLayouts(
355                            Layout layout, long liveGroupId)
356                    throws Exception {
357    
358                    return _staging.getMissingParentLayouts(layout, liveGroupId);
359            }
360    
361            public static long getRecentLayoutRevisionId(
362                            HttpServletRequest request, long layoutSetBranchId, long plid)
363                    throws PortalException {
364    
365                    return _staging.getRecentLayoutRevisionId(
366                            request, layoutSetBranchId, plid);
367            }
368    
369            public static long getRecentLayoutRevisionId(
370                            User user, long layoutSetBranchId, long plid)
371                    throws PortalException {
372    
373                    return _staging.getRecentLayoutRevisionId(
374                            user, layoutSetBranchId, plid);
375            }
376    
377            public static long getRecentLayoutSetBranchId(
378                    HttpServletRequest request, long layoutSetId) {
379    
380                    return _staging.getRecentLayoutSetBranchId(request, layoutSetId);
381            }
382    
383            public static long getRecentLayoutSetBranchId(User user, long layoutSetId) {
384                    return _staging.getRecentLayoutSetBranchId(user, layoutSetId);
385            }
386    
387            public static String getSchedulerGroupName(
388                    String destinationName, long groupId) {
389    
390                    return _staging.getSchedulerGroupName(destinationName, groupId);
391            }
392    
393            public static String getStagedPortletId(String portletId) {
394                    return _staging.getStagedPortletId(portletId);
395            }
396    
397            public static long[] getStagingAndLiveGroupIds(long groupId)
398                    throws PortalException {
399    
400                    return _staging.getStagingAndLiveGroupIds(groupId);
401            }
402    
403            public static Group getStagingGroup(long groupId) {
404                    return _staging.getStagingGroup(groupId);
405            }
406    
407            /**
408             * @deprecated As of 7.0.0, replaced by {@link
409             *             com.liferay.portlet.exportimport.configuration.ExportImportConfigurationParameterMapFactory#buildParameterMap(
410             *             )}
411             */
412            @Deprecated
413            public static Map<String, String[]> getStagingParameters() {
414                    return _staging.getStagingParameters();
415            }
416    
417            /**
418             * @deprecated As of 7.0.0, replaced by {@link
419             *             com.liferay.portlet.exportimport.configuration.ExportImportConfigurationParameterMapFactory#buildParameterMap(
420             *             PortletRequest)}
421             */
422            @Deprecated
423            public static Map<String, String[]> getStagingParameters(
424                    PortletRequest PortletRequest) {
425    
426                    return _staging.getStagingParameters(PortletRequest);
427            }
428    
429            public static JSONArray getWarningMessagesJSONArray(
430                    Locale locale, Map<String, MissingReference> missingReferences) {
431    
432                    return _staging.getWarningMessagesJSONArray(locale, missingReferences);
433            }
434    
435            /**
436             * @deprecated As of 7.0.0, replaced by {@link
437             *             #getWarningMessagesJSONArray(Locale, Map<String,
438             *             MissingReference>)}
439             */
440            @Deprecated
441            public static JSONArray getWarningMessagesJSONArray(
442                    Locale locale, Map<String, MissingReference> missingReferences,
443                    Map<String, Serializable> contextMap) {
444    
445                    return _staging.getWarningMessagesJSONArray(
446                            locale, missingReferences, contextMap);
447            }
448    
449            public static WorkflowTask getWorkflowTask(
450                            long userId, LayoutRevision layoutRevision)
451                    throws PortalException {
452    
453                    return _staging.getWorkflowTask(userId, layoutRevision);
454            }
455    
456            public static boolean hasWorkflowTask(
457                            long userId, LayoutRevision layoutRevision)
458                    throws PortalException {
459    
460                    return _staging.hasWorkflowTask(userId, layoutRevision);
461            }
462    
463            public static boolean isIncomplete(Layout layout, long layoutSetBranchId) {
464                    return _staging.isIncomplete(layout, layoutSetBranchId);
465            }
466    
467            /**
468             * @deprecated As of 7.0.0, see {@link
469             *             com.liferay.portal.kernel.backgroundtask.BackgroundTaskExecutor#getIsolationLevel(
470             *             )}
471             */
472            @Deprecated
473            public static void lockGroup(long userId, long groupId)
474                    throws PortalException {
475    
476                    _staging.lockGroup(userId, groupId);
477            }
478    
479            public static void publishLayout(
480                            long userId, long plid, long liveGroupId, boolean includeChildren)
481                    throws PortalException {
482    
483                    _staging.publishLayout(userId, plid, liveGroupId, includeChildren);
484            }
485    
486            public static void publishLayouts(
487                            long userId, ExportImportConfiguration exportImportConfiguration)
488                    throws PortalException {
489    
490                    _staging.publishLayouts(userId, exportImportConfiguration);
491            }
492    
493            public static void publishLayouts(
494                            long userId, long exportImportConfigurationId)
495                    throws PortalException {
496    
497                    _staging.publishLayouts(userId, exportImportConfigurationId);
498            }
499    
500            public static void publishLayouts(
501                            long userId, long sourceGroupId, long targetGroupId,
502                            boolean privateLayout, long[] layoutIds,
503                            Map<String, String[]> parameterMap)
504                    throws PortalException {
505    
506                    _staging.publishLayouts(
507                            userId, sourceGroupId, targetGroupId, privateLayout, layoutIds,
508                            parameterMap);
509            }
510    
511            /**
512             * @deprecated As of 7.0.0, replaced by {@link #publishLayouts(long, long,
513             *             long, boolean, long[], Map)}
514             */
515            @Deprecated
516            public static void publishLayouts(
517                            long userId, long sourceGroupId, long targetGroupId,
518                            boolean privateLayout, long[] layoutIds,
519                            Map<String, String[]> parameterMap, Date startDate, Date endDate)
520                    throws PortalException {
521    
522                    _staging.publishLayouts(
523                            userId, sourceGroupId, targetGroupId, privateLayout, layoutIds,
524                            parameterMap, startDate, endDate);
525            }
526    
527            public static void publishLayouts(
528                            long userId, long sourceGroupId, long targetGroupId,
529                            boolean privateLayout, long[] layoutIds, String name,
530                            Map<String, String[]> parameterMap)
531                    throws PortalException {
532    
533                    _staging.publishLayouts(
534                            userId, sourceGroupId, targetGroupId, privateLayout, layoutIds,
535                            name, parameterMap);
536            }
537    
538            /**
539             * @deprecated As of 7.0.0, replaced by {@link #publishLayouts(long, long,
540             *             long, boolean, long[], Map)}
541             */
542            @Deprecated
543            public static void publishLayouts(
544                            long userId, long sourceGroupId, long targetGroupId,
545                            boolean privateLayout, Map<Long, Boolean> layoutIdMap,
546                            Map<String, String[]> parameterMap, Date startDate, Date endDate)
547                    throws PortalException {
548    
549                    _staging.publishLayouts(
550                            userId, sourceGroupId, targetGroupId, privateLayout, layoutIdMap,
551                            parameterMap, startDate, endDate);
552            }
553    
554            public static void publishLayouts(
555                            long userId, long sourceGroupId, long targetGroupId,
556                            boolean privateLayout, Map<String, String[]> parameterMap)
557                    throws PortalException {
558    
559                    _staging.publishLayouts(
560                            userId, sourceGroupId, targetGroupId, privateLayout, parameterMap);
561            }
562    
563            /**
564             * @deprecated As of 7.0.0, replaced by {@link #publishLayouts(long, long,
565             *             long, boolean, Map)}
566             */
567            @Deprecated
568            public static void publishLayouts(
569                            long userId, long sourceGroupId, long targetGroupId,
570                            boolean privateLayout, Map<String, String[]> parameterMap,
571                            Date startDate, Date endDate)
572                    throws PortalException {
573    
574                    _staging.publishLayouts(
575                            userId, sourceGroupId, targetGroupId, privateLayout, parameterMap,
576                            startDate, endDate);
577            }
578    
579            public static void publishPortlet(
580                            long userId, ExportImportConfiguration exportImportConfiguration)
581                    throws PortalException {
582    
583                    _staging.publishPortlet(userId, exportImportConfiguration);
584            }
585    
586            public static void publishPortlet(
587                            long userId, long exportImportConfigurationId)
588                    throws PortalException {
589    
590                    _staging.publishPortlet(userId, exportImportConfigurationId);
591            }
592    
593            public static void publishPortlet(
594                            long userId, long sourceGroupId, long targetGroupId,
595                            long sourcePlid, long targetPlid, String portletId,
596                            Map<String, String[]> parameterMap)
597                    throws PortalException {
598    
599                    _staging.publishPortlet(
600                            userId, sourceGroupId, targetGroupId, sourcePlid, targetPlid,
601                            portletId, parameterMap);
602            }
603    
604            public static void publishToLive(PortletRequest PortletRequest)
605                    throws PortalException {
606    
607                    _staging.publishToLive(PortletRequest);
608            }
609    
610            public static void publishToLive(
611                            PortletRequest PortletRequest, Portlet portlet)
612                    throws PortalException {
613    
614                    _staging.publishToLive(PortletRequest, portlet);
615            }
616    
617            public static void publishToRemote(PortletRequest PortletRequest)
618                    throws PortalException {
619    
620                    _staging.publishToRemote(PortletRequest);
621            }
622    
623            public static void scheduleCopyFromLive(PortletRequest PortletRequest)
624                    throws PortalException {
625    
626                    _staging.scheduleCopyFromLive(PortletRequest);
627            }
628    
629            public static void schedulePublishToLive(PortletRequest PortletRequest)
630                    throws PortalException {
631    
632                    _staging.schedulePublishToLive(PortletRequest);
633            }
634    
635            public static void schedulePublishToRemote(PortletRequest PortletRequest)
636                    throws PortalException {
637    
638                    _staging.schedulePublishToRemote(PortletRequest);
639            }
640    
641            public static void setRecentLayoutBranchId(
642                            HttpServletRequest request, long layoutSetBranchId, long plid,
643                            long layoutBranchId)
644                    throws PortalException {
645    
646                    _staging.setRecentLayoutBranchId(
647                            request, layoutSetBranchId, plid, layoutBranchId);
648            }
649    
650            public static void setRecentLayoutBranchId(
651                            User user, long layoutSetBranchId, long plid, long layoutBranchId)
652                    throws PortalException {
653    
654                    _staging.setRecentLayoutBranchId(
655                            user, layoutSetBranchId, plid, layoutBranchId);
656            }
657    
658            public static void setRecentLayoutRevisionId(
659                            HttpServletRequest request, long layoutSetBranchId, long plid,
660                            long layoutRevisionId)
661                    throws PortalException {
662    
663                    _staging.setRecentLayoutRevisionId(
664                            request, layoutSetBranchId, plid, layoutRevisionId);
665            }
666    
667            public static void setRecentLayoutRevisionId(
668                            User user, long layoutSetBranchId, long plid, long layoutRevisionId)
669                    throws PortalException {
670    
671                    _staging.setRecentLayoutRevisionId(
672                            user, layoutSetBranchId, plid, layoutRevisionId);
673            }
674    
675            public static void setRecentLayoutSetBranchId(
676                            HttpServletRequest request, long layoutSetId,
677                            long layoutSetBranchId)
678                    throws PortalException {
679    
680                    _staging.setRecentLayoutSetBranchId(
681                            request, layoutSetId, layoutSetBranchId);
682            }
683    
684            public static void setRecentLayoutSetBranchId(
685                            User user, long layoutSetId, long layoutSetBranchId)
686                    throws PortalException {
687    
688                    _staging.setRecentLayoutSetBranchId(
689                            user, layoutSetId, layoutSetBranchId);
690            }
691    
692            public static String stripProtocolFromRemoteAddress(String remoteAddress) {
693                    return _staging.stripProtocolFromRemoteAddress(remoteAddress);
694            }
695    
696            /**
697             * @deprecated As of 7.0.0, see {@link
698             *             com.liferay.portal.kernel.backgroundtask.BackgroundTaskExecutor#getIsolationLevel(
699             *             )}
700             */
701            @Deprecated
702            public static void unlockGroup(long groupId) {
703                    _staging.unlockGroup(groupId);
704            }
705    
706            public static void unscheduleCopyFromLive(PortletRequest PortletRequest)
707                    throws PortalException {
708    
709                    _staging.unscheduleCopyFromLive(PortletRequest);
710            }
711    
712            public static void unschedulePublishToLive(PortletRequest PortletRequest)
713                    throws PortalException {
714    
715                    _staging.unschedulePublishToLive(PortletRequest);
716            }
717    
718            public static void unschedulePublishToRemote(PortletRequest PortletRequest)
719                    throws PortalException {
720    
721                    _staging.unschedulePublishToRemote(PortletRequest);
722            }
723    
724            public static void updateLastImportSettings(
725                            Element layoutElement, Layout layout,
726                            PortletDataContext portletDataContext)
727                    throws PortalException {
728    
729                    _staging.updateLastImportSettings(
730                            layoutElement, layout, portletDataContext);
731            }
732    
733            /**
734             * @deprecated As of 7.0.0, replaced by {@link
735             *             com.liferay.portlet.exportimport.lar.ExportImportDateUtil#updateLastPublishDate(
736             *             long, boolean, com.liferay.portal.kernel.util.DateRange,
737             *             Date)}
738             */
739            @Deprecated
740            public static void updateLastPublishDate(
741                            long sourceGroupId, boolean privateLayout, Date lastPublishDate)
742                    throws PortalException {
743    
744                    _staging.updateLastPublishDate(
745                            sourceGroupId, privateLayout, lastPublishDate);
746            }
747    
748            /**
749             * @deprecated As of 7.0.0, replaced by {@link
750             *             com.liferay.portlet.exportimport.lar.ExportImportDateUtil#updateLastPublishDate(
751             *             String, PortletPreferences,
752             *             com.liferay.portal.kernel.util.DateRange, Date)}
753             */
754            @Deprecated
755            public static void updateLastPublishDate(
756                            String portletId, PortletPreferences portletPreferences,
757                            Date lastPublishDate)
758                    throws PortalException {
759    
760                    _staging.updateLastPublishDate(
761                            portletId, portletPreferences, lastPublishDate);
762            }
763    
764            public static void updateStaging(
765                            PortletRequest PortletRequest, Group liveGroup)
766                    throws PortalException {
767    
768                    _staging.updateStaging(PortletRequest, liveGroup);
769            }
770    
771            public static void validateRemote(
772                            long groupId, String remoteAddress, int remotePort,
773                            String remotePathContext, boolean secureConnection,
774                            long remoteGroupId)
775                    throws PortalException {
776    
777                    _staging.validateRemote(
778                            groupId, remoteAddress, remotePort, remotePathContext,
779                            secureConnection, remoteGroupId);
780            }
781    
782            /**
783             * @deprecated As of 7.0.0, replaced by {@link #validateRemote(long, String,
784             *             int, String, boolean, long)}
785             */
786            @Deprecated
787            public static void validateRemote(
788                            String remoteAddress, int remotePort, String remotePathContext,
789                            boolean secureConnection, long remoteGroupId)
790                    throws PortalException {
791    
792                    _staging.validateRemote(
793                            remoteAddress, remotePort, remotePathContext, secureConnection,
794                            remoteGroupId);
795            }
796    
797            private static final Staging _staging =
798                    ProxyFactory.newServiceTrackedInstance(Staging.class);
799    
800    }