001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.kernel.staging;
016    
017    import com.liferay.portal.model.Layout;
018    import com.liferay.portal.model.Portlet;
019    
020    import java.util.Date;
021    import java.util.List;
022    import java.util.Map;
023    
024    import javax.portlet.PortletRequest;
025    
026    /**
027     * @author Raymond Augé
028     */
029    public interface Staging {
030    
031            public void copyFromLive(PortletRequest PortletRequest) throws Exception;
032    
033            public void copyFromLive(PortletRequest PortletRequest, Portlet portlet)
034                    throws Exception;
035    
036            public void copyPortlet(
037                            PortletRequest PortletRequest, long sourceGroupId,
038                            long targetGroupId, long sourcePlid, long targetPlid,
039                            String portletId)
040                    throws Exception;
041    
042            public void copyRemoteLayouts(
043                            long sourceGroupId, boolean privateLayout,
044                            Map<Long, Boolean> layoutIdMap,
045                            Map<String, String[]> exportParameterMap, String remoteAddress,
046                            int remotePort, boolean secureConnection, long remoteGroupId,
047                            boolean remotePrivateLayout,
048                            Map<String, String[]> importParameterMap, Date startDate,
049                            Date endDate)
050                    throws Exception;
051    
052            public List<Layout> getMissingParentLayouts(Layout layout, long liveGroupId)
053                    throws Exception;
054    
055            public String getSchedulerGroupName(String destinationName, long groupId);
056    
057            public Map<String, String[]> getStagingParameters();
058    
059            public Map<String, String[]> getStagingParameters(
060                    PortletRequest PortletRequest);
061    
062            public void publishLayout(
063                            long plid, long liveGroupId, boolean includeChildren)
064                    throws Exception;
065    
066            public void publishLayouts(
067                            long sourceGroupId, long targetGroupId, boolean privateLayout,
068                            long[] layoutIds, Map<String, String[]> parameterMap,
069                            Date startDate, Date endDate)
070                    throws Exception;
071    
072            public void publishLayouts(
073                            long sourceGroupId, long targetGroupId, boolean privateLayout,
074                            Map<Long, Boolean> layoutIdMap, Map<String, String[]> parameterMap,
075                            Date startDate, Date endDate)
076                    throws Exception;
077    
078            public void publishLayouts(
079                            long sourceGroupId, long targetGroupId, boolean privateLayout,
080                            Map<String, String[]> parameterMap, Date startDate, Date endDate)
081                    throws Exception;
082    
083            public void publishToLive(PortletRequest PortletRequest) throws Exception;
084    
085            public void publishToLive(PortletRequest PortletRequest, Portlet portlet)
086                    throws Exception;
087    
088            public void publishToRemote(PortletRequest PortletRequest) throws Exception;
089    
090            public void scheduleCopyFromLive(PortletRequest PortletRequest)
091                    throws Exception;
092    
093            public void schedulePublishToLive(PortletRequest PortletRequest)
094                    throws Exception;
095    
096            public void schedulePublishToRemote(PortletRequest PortletRequest)
097                    throws Exception;
098    
099            public void unscheduleCopyFromLive(PortletRequest PortletRequest)
100                    throws Exception;
101    
102            public void unschedulePublishToLive(PortletRequest PortletRequest)
103                    throws Exception;
104    
105            public void unschedulePublishToRemote(PortletRequest PortletRequest)
106                    throws Exception;
107    
108            public void updateStaging(PortletRequest PortletRequest) throws Exception;
109    
110    }