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