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 deleteLastImportSettings(
164                            Group liveGroup, boolean privateLayout)
165                    throws PortalException {
166    
167                    _staging.deleteLastImportSettings(liveGroup, privateLayout);
168            }
169    
170            public static void deleteRecentLayoutRevisionId(
171                    HttpServletRequest request, long layoutSetBranchId, long plid) {
172    
173                    _staging.deleteRecentLayoutRevisionId(request, layoutSetBranchId, plid);
174            }
175    
176            public static void deleteRecentLayoutRevisionId(
177                    long userId, long layoutSetBranchId, long plid) {
178    
179                    _staging.deleteRecentLayoutRevisionId(userId, layoutSetBranchId, plid);
180            }
181    
182            /**
183             * @deprecated As of 7.0.0, replaced by {@link
184             *             #deleteRecentLayoutRevisionId(long, long, long)}
185             */
186            @Deprecated
187            public static void deleteRecentLayoutRevisionId(
188                    User user, long layoutSetBranchId, long plid) {
189    
190                    _staging.deleteRecentLayoutRevisionId(user, layoutSetBranchId, plid);
191            }
192    
193            /**
194             * @deprecated As of 6.2.0, replaced by {@link
195             *             com.liferay.portlet.exportimport.service.StagingLocalService#disableStaging(
196             *             Group, ServiceContext)}
197             */
198            @Deprecated
199            public static void disableStaging(
200                            Group scopeGroup, Group liveGroup, ServiceContext serviceContext)
201                    throws Exception {
202    
203                    _staging.disableStaging(scopeGroup, liveGroup, serviceContext);
204            }
205    
206            /**
207             * @deprecated As of 6.2.0, replaced by {@link
208             *             com.liferay.portlet.exportimport.service.StagingLocalService#disableStaging(
209             *             Group, ServiceContext)}
210             */
211            @Deprecated
212            public static void disableStaging(
213                            Group liveGroup, ServiceContext serviceContext)
214                    throws Exception {
215    
216                    _staging.disableStaging(liveGroup, serviceContext);
217            }
218    
219            /**
220             * @deprecated As of 6.2.0, replaced by {@link
221             *             com.liferay.portlet.exportimport.service.StagingLocalService#disableStaging(
222             *             PortletRequest, Group, ServiceContext)}
223             */
224            @Deprecated
225            public static void disableStaging(
226                            PortletRequest portletRequest, Group scopeGroup, Group liveGroup,
227                            ServiceContext serviceContext)
228                    throws Exception {
229    
230                    _staging.disableStaging(
231                            portletRequest, scopeGroup, liveGroup, serviceContext);
232            }
233    
234            /**
235             * @deprecated As of 6.2.0, replaced by {@link
236             *             com.liferay.portlet.exportimport.service.StagingLocalService#disableStaging(
237             *             PortletRequest, Group, ServiceContext)}
238             */
239            @Deprecated
240            public static void disableStaging(
241                            PortletRequest portletRequest, Group liveGroup,
242                            ServiceContext serviceContext)
243                    throws Exception {
244    
245                    _staging.disableStaging(portletRequest, liveGroup, serviceContext);
246            }
247    
248            /**
249             * @deprecated As of 6.2.0, replaced by {@link
250             *             com.liferay.portlet.exportimport.service.StagingLocalService#enableLocalStaging(
251             *             long, Group, boolean, boolean, ServiceContext)}
252             */
253            @Deprecated
254            public static void enableLocalStaging(
255                            long userId, Group scopeGroup, Group liveGroup,
256                            boolean branchingPublic, boolean branchingPrivate,
257                            ServiceContext serviceContext)
258                    throws Exception {
259    
260                    _staging.enableLocalStaging(
261                            userId, scopeGroup, liveGroup, branchingPublic, branchingPrivate,
262                            serviceContext);
263            }
264    
265            /**
266             * @deprecated As of 6.2.0, replaced by {@link
267             *             com.liferay.portlet.exportimport.service.StagingLocalService#enableRemoteStaging(
268             *             long, Group, boolean, boolean, String, int, String, boolean,
269             *             long, ServiceContext)}
270             */
271            @Deprecated
272            public static void enableRemoteStaging(
273                            long userId, Group scopeGroup, Group liveGroup,
274                            boolean branchingPublic, boolean branchingPrivate,
275                            String remoteAddress, int remotePort, String remotePathContext,
276                            boolean secureConnection, long remoteGroupId,
277                            ServiceContext serviceContext)
278                    throws Exception {
279    
280                    _staging.enableRemoteStaging(
281                            userId, scopeGroup, liveGroup, branchingPublic, branchingPrivate,
282                            remoteAddress, remotePort, remotePathContext, secureConnection,
283                            remoteGroupId, serviceContext);
284            }
285    
286            public static JSONArray getErrorMessagesJSONArray(
287                    Locale locale, Map<String, MissingReference> missingReferences) {
288    
289                    return _staging.getErrorMessagesJSONArray(locale, missingReferences);
290            }
291    
292            /**
293             * @deprecated As of 7.0.0, replaced by {@link
294             *             #getErrorMessagesJSONArray(Locale, Map<String,
295             *             MissingReference>)}
296             */
297            @Deprecated
298            public static JSONArray getErrorMessagesJSONArray(
299                    Locale locale, Map<String, MissingReference> missingReferences,
300                    Map<String, Serializable> contextMap) {
301    
302                    return _staging.getErrorMessagesJSONArray(
303                            locale, missingReferences, contextMap);
304            }
305    
306            public static JSONObject getExceptionMessagesJSONObject(
307                    Locale locale, Exception e,
308                    ExportImportConfiguration exportImportConfiguration) {
309    
310                    return _staging.getExceptionMessagesJSONObject(
311                            locale, e, exportImportConfiguration);
312            }
313    
314            /**
315             * @deprecated As of 7.0.0, replaced by {@link
316             *             #getExceptionMessagesJSONObject(Locale, Exception,
317             *             ExportImportConfiguration)}
318             */
319            @Deprecated
320            public static JSONObject getExceptionMessagesJSONObject(
321                    Locale locale, Exception e, Map<String, Serializable> contextMap) {
322    
323                    return _staging.getExceptionMessagesJSONObject(locale, e, contextMap);
324            }
325    
326            public static Group getLiveGroup(long groupId) {
327                    return _staging.getLiveGroup(groupId);
328            }
329    
330            public static long getLiveGroupId(long groupId) {
331                    return _staging.getLiveGroupId(groupId);
332            }
333    
334            /**
335             * @deprecated As of 7.0.0, moved to {@link
336             *             com.liferay.portlet.exportimport.lar.ExportImportHelperUtil#getMissingParentLayouts(
337             *             Layout, long)}
338             */
339            @Deprecated
340            public static List<Layout> getMissingParentLayouts(
341                            Layout layout, long liveGroupId)
342                    throws Exception {
343    
344                    return _staging.getMissingParentLayouts(layout, liveGroupId);
345            }
346    
347            public static long getRecentLayoutRevisionId(
348                            HttpServletRequest request, long layoutSetBranchId, long plid)
349                    throws PortalException {
350    
351                    return _staging.getRecentLayoutRevisionId(
352                            request, layoutSetBranchId, plid);
353            }
354    
355            public static long getRecentLayoutRevisionId(
356                            User user, long layoutSetBranchId, long plid)
357                    throws PortalException {
358    
359                    return _staging.getRecentLayoutRevisionId(
360                            user, layoutSetBranchId, plid);
361            }
362    
363            public static long getRecentLayoutSetBranchId(
364                    HttpServletRequest request, long layoutSetId) {
365    
366                    return _staging.getRecentLayoutSetBranchId(request, layoutSetId);
367            }
368    
369            public static long getRecentLayoutSetBranchId(User user, long layoutSetId) {
370                    return _staging.getRecentLayoutSetBranchId(user, layoutSetId);
371            }
372    
373            public static String getSchedulerGroupName(
374                    String destinationName, long groupId) {
375    
376                    return _staging.getSchedulerGroupName(destinationName, groupId);
377            }
378    
379            public static String getStagedPortletId(String portletId) {
380                    return _staging.getStagedPortletId(portletId);
381            }
382    
383            public static Group getStagingGroup(long groupId) {
384                    return _staging.getStagingGroup(groupId);
385            }
386    
387            /**
388             * @deprecated As of 7.0.0, replaced by {@link
389             *             com.liferay.portlet.exportimport.configuration.ExportImportConfigurationParameterMapFactory#buildParameterMap(
390             *             )}
391             */
392            @Deprecated
393            public static Map<String, String[]> getStagingParameters() {
394                    return _staging.getStagingParameters();
395            }
396    
397            /**
398             * @deprecated As of 7.0.0, replaced by {@link
399             *             com.liferay.portlet.exportimport.configuration.ExportImportConfigurationParameterMapFactory#buildParameterMap(
400             *             PortletRequest)}
401             */
402            @Deprecated
403            public static Map<String, String[]> getStagingParameters(
404                    PortletRequest PortletRequest) {
405    
406                    return _staging.getStagingParameters(PortletRequest);
407            }
408    
409            public static JSONArray getWarningMessagesJSONArray(
410                    Locale locale, Map<String, MissingReference> missingReferences) {
411    
412                    return _staging.getWarningMessagesJSONArray(locale, missingReferences);
413            }
414    
415            /**
416             * @deprecated As of 7.0.0, replaced by {@link
417             *             #getWarningMessagesJSONArray(Locale, Map<String,
418             *             MissingReference>)}
419             */
420            @Deprecated
421            public static JSONArray getWarningMessagesJSONArray(
422                    Locale locale, Map<String, MissingReference> missingReferences,
423                    Map<String, Serializable> contextMap) {
424    
425                    return _staging.getWarningMessagesJSONArray(
426                            locale, missingReferences, contextMap);
427            }
428    
429            public static WorkflowTask getWorkflowTask(
430                            long userId, LayoutRevision layoutRevision)
431                    throws PortalException {
432    
433                    return _staging.getWorkflowTask(userId, layoutRevision);
434            }
435    
436            public static boolean hasWorkflowTask(
437                            long userId, LayoutRevision layoutRevision)
438                    throws PortalException {
439    
440                    return _staging.hasWorkflowTask(userId, layoutRevision);
441            }
442    
443            public static boolean isIncomplete(Layout layout, long layoutSetBranchId) {
444                    return _staging.isIncomplete(layout, layoutSetBranchId);
445            }
446    
447            /**
448             * @deprecated As of 7.0.0, see {@link
449             *             com.liferay.portal.kernel.backgroundtask.BackgroundTaskExecutor#getIsolationLevel(
450             *             )}
451             */
452            @Deprecated
453            public static void lockGroup(long userId, long groupId)
454                    throws PortalException {
455    
456                    _staging.lockGroup(userId, groupId);
457            }
458    
459            public static void publishLayout(
460                            long userId, long plid, long liveGroupId, boolean includeChildren)
461                    throws PortalException {
462    
463                    _staging.publishLayout(userId, plid, liveGroupId, includeChildren);
464            }
465    
466            public static void publishLayouts(
467                            long userId, ExportImportConfiguration exportImportConfiguration)
468                    throws PortalException {
469    
470                    _staging.publishLayouts(userId, exportImportConfiguration);
471            }
472    
473            public static void publishLayouts(
474                            long userId, long exportImportConfigurationId)
475                    throws PortalException {
476    
477                    _staging.publishLayouts(userId, exportImportConfigurationId);
478            }
479    
480            public static void publishLayouts(
481                            long userId, long sourceGroupId, long targetGroupId,
482                            boolean privateLayout, long[] layoutIds,
483                            Map<String, String[]> parameterMap)
484                    throws PortalException {
485    
486                    _staging.publishLayouts(
487                            userId, sourceGroupId, targetGroupId, privateLayout, layoutIds,
488                            parameterMap);
489            }
490    
491            /**
492             * @deprecated As of 7.0.0, replaced by {@link #publishLayouts(long, long,
493             *             long, boolean, long[], Map)}
494             */
495            @Deprecated
496            public static void publishLayouts(
497                            long userId, long sourceGroupId, long targetGroupId,
498                            boolean privateLayout, long[] layoutIds,
499                            Map<String, String[]> parameterMap, Date startDate, Date endDate)
500                    throws PortalException {
501    
502                    _staging.publishLayouts(
503                            userId, sourceGroupId, targetGroupId, privateLayout, layoutIds,
504                            parameterMap, startDate, endDate);
505            }
506    
507            /**
508             * @deprecated As of 7.0.0, replaced by {@link #publishLayouts(long, long,
509             *             long, boolean, long[], Map)}
510             */
511            @Deprecated
512            public static void publishLayouts(
513                            long userId, long sourceGroupId, long targetGroupId,
514                            boolean privateLayout, Map<Long, Boolean> layoutIdMap,
515                            Map<String, String[]> parameterMap, Date startDate, Date endDate)
516                    throws PortalException {
517    
518                    _staging.publishLayouts(
519                            userId, sourceGroupId, targetGroupId, privateLayout, layoutIdMap,
520                            parameterMap, startDate, endDate);
521            }
522    
523            public static void publishLayouts(
524                            long userId, long sourceGroupId, long targetGroupId,
525                            boolean privateLayout, Map<String, String[]> parameterMap)
526                    throws PortalException {
527    
528                    _staging.publishLayouts(
529                            userId, sourceGroupId, targetGroupId, privateLayout, parameterMap);
530            }
531    
532            /**
533             * @deprecated As of 7.0.0, replaced by {@link #publishLayouts(long, long,
534             *             long, boolean, Map)}
535             */
536            @Deprecated
537            public static void publishLayouts(
538                            long userId, long sourceGroupId, long targetGroupId,
539                            boolean privateLayout, Map<String, String[]> parameterMap,
540                            Date startDate, Date endDate)
541                    throws PortalException {
542    
543                    _staging.publishLayouts(
544                            userId, sourceGroupId, targetGroupId, privateLayout, parameterMap,
545                            startDate, endDate);
546            }
547    
548            public static void publishPortlet(
549                            long userId, ExportImportConfiguration exportImportConfiguration)
550                    throws PortalException {
551    
552                    _staging.publishPortlet(userId, exportImportConfiguration);
553            }
554    
555            public static void publishPortlet(
556                            long userId, long exportImportConfigurationId)
557                    throws PortalException {
558    
559                    _staging.publishPortlet(userId, exportImportConfigurationId);
560            }
561    
562            public static void publishPortlet(
563                            long userId, long sourceGroupId, long targetGroupId,
564                            long sourcePlid, long targetPlid, String portletId,
565                            Map<String, String[]> parameterMap)
566                    throws PortalException {
567    
568                    _staging.publishPortlet(
569                            userId, sourceGroupId, targetGroupId, sourcePlid, targetPlid,
570                            portletId, parameterMap);
571            }
572    
573            public static void publishToLive(PortletRequest PortletRequest)
574                    throws PortalException {
575    
576                    _staging.publishToLive(PortletRequest);
577            }
578    
579            public static void publishToLive(
580                            PortletRequest PortletRequest, Portlet portlet)
581                    throws PortalException {
582    
583                    _staging.publishToLive(PortletRequest, portlet);
584            }
585    
586            public static void publishToRemote(PortletRequest PortletRequest)
587                    throws PortalException {
588    
589                    _staging.publishToRemote(PortletRequest);
590            }
591    
592            public static void scheduleCopyFromLive(PortletRequest PortletRequest)
593                    throws PortalException {
594    
595                    _staging.scheduleCopyFromLive(PortletRequest);
596            }
597    
598            public static void schedulePublishToLive(PortletRequest PortletRequest)
599                    throws PortalException {
600    
601                    _staging.schedulePublishToLive(PortletRequest);
602            }
603    
604            public static void schedulePublishToRemote(PortletRequest PortletRequest)
605                    throws PortalException {
606    
607                    _staging.schedulePublishToRemote(PortletRequest);
608            }
609    
610            public static void setRecentLayoutBranchId(
611                    HttpServletRequest request, long layoutSetBranchId, long plid,
612                    long layoutBranchId) {
613    
614                    _staging.setRecentLayoutBranchId(
615                            request, layoutSetBranchId, plid, layoutBranchId);
616            }
617    
618            public static void setRecentLayoutBranchId(
619                    User user, long layoutSetBranchId, long plid, long layoutBranchId) {
620    
621                    _staging.setRecentLayoutBranchId(
622                            user, layoutSetBranchId, plid, layoutBranchId);
623            }
624    
625            public static void setRecentLayoutRevisionId(
626                    HttpServletRequest request, long layoutSetBranchId, long plid,
627                    long layoutRevisionId) {
628    
629                    _staging.setRecentLayoutRevisionId(
630                            request, layoutSetBranchId, plid, layoutRevisionId);
631            }
632    
633            public static void setRecentLayoutRevisionId(
634                    User user, long layoutSetBranchId, long plid, long layoutRevisionId) {
635    
636                    _staging.setRecentLayoutRevisionId(
637                            user, layoutSetBranchId, plid, layoutRevisionId);
638            }
639    
640            public static void setRecentLayoutSetBranchId(
641                    HttpServletRequest request, long layoutSetId, long layoutSetBranchId) {
642    
643                    _staging.setRecentLayoutSetBranchId(
644                            request, layoutSetId, layoutSetBranchId);
645            }
646    
647            public static void setRecentLayoutSetBranchId(
648                    User user, long layoutSetId, long layoutSetBranchId) {
649    
650                    _staging.setRecentLayoutSetBranchId(
651                            user, layoutSetId, layoutSetBranchId);
652            }
653    
654            public static String stripProtocolFromRemoteAddress(String remoteAddress) {
655                    return _staging.stripProtocolFromRemoteAddress(remoteAddress);
656            }
657    
658            /**
659             * @deprecated As of 7.0.0, see {@link
660             *             com.liferay.portal.kernel.backgroundtask.BackgroundTaskExecutor#getIsolationLevel(
661             *             )}
662             */
663            @Deprecated
664            public static void unlockGroup(long groupId) {
665                    _staging.unlockGroup(groupId);
666            }
667    
668            public static void unscheduleCopyFromLive(PortletRequest PortletRequest)
669                    throws PortalException {
670    
671                    _staging.unscheduleCopyFromLive(PortletRequest);
672            }
673    
674            public static void unschedulePublishToLive(PortletRequest PortletRequest)
675                    throws PortalException {
676    
677                    _staging.unschedulePublishToLive(PortletRequest);
678            }
679    
680            public static void unschedulePublishToRemote(PortletRequest PortletRequest)
681                    throws PortalException {
682    
683                    _staging.unschedulePublishToRemote(PortletRequest);
684            }
685    
686            public static void updateLastImportSettings(
687                            Element layoutElement, Layout layout,
688                            PortletDataContext portletDataContext)
689                    throws PortalException {
690    
691                    _staging.updateLastImportSettings(
692                            layoutElement, layout, portletDataContext);
693            }
694    
695            /**
696             * @deprecated As of 7.0.0, replaced by {@link
697             *             com.liferay.portlet.exportimport.lar.ExportImportDateUtil#updateLastPublishDate(
698             *             long, boolean, com.liferay.portal.kernel.util.DateRange,
699             *             Date)}
700             */
701            @Deprecated
702            public static void updateLastPublishDate(
703                            long sourceGroupId, boolean privateLayout, Date lastPublishDate)
704                    throws PortalException {
705    
706                    _staging.updateLastPublishDate(
707                            sourceGroupId, privateLayout, lastPublishDate);
708            }
709    
710            /**
711             * @deprecated As of 7.0.0, replaced by {@link
712             *             com.liferay.portlet.exportimport.lar.ExportImportDateUtil#updateLastPublishDate(
713             *             String, PortletPreferences,
714             *             com.liferay.portal.kernel.util.DateRange, Date)}
715             */
716            @Deprecated
717            public static void updateLastPublishDate(
718                            String portletId, PortletPreferences portletPreferences,
719                            Date lastPublishDate)
720                    throws PortalException {
721    
722                    _staging.updateLastPublishDate(
723                            portletId, portletPreferences, lastPublishDate);
724            }
725    
726            public static void updateStaging(
727                            PortletRequest PortletRequest, Group liveGroup)
728                    throws PortalException {
729    
730                    _staging.updateStaging(PortletRequest, liveGroup);
731            }
732    
733            public static void validateRemote(
734                            long groupId, String remoteAddress, int remotePort,
735                            String remotePathContext, boolean secureConnection,
736                            long remoteGroupId)
737                    throws PortalException {
738    
739                    _staging.validateRemote(
740                            groupId, remoteAddress, remotePort, remotePathContext,
741                            secureConnection, remoteGroupId);
742            }
743    
744            /**
745             * @deprecated As of 7.0.0, replaced by {@link #validateRemote(long, String,
746             *             int, String, boolean, long)}
747             */
748            @Deprecated
749            public static void validateRemote(
750                            String remoteAddress, int remotePort, String remotePathContext,
751                            boolean secureConnection, long remoteGroupId)
752                    throws PortalException {
753    
754                    _staging.validateRemote(
755                            remoteAddress, remotePort, remotePathContext, secureConnection,
756                            remoteGroupId);
757            }
758    
759            private static final Staging _staging =
760                    ProxyFactory.newServiceTrackedInstance(Staging.class);
761    
762    }