001    /**
002     * Copyright (c) 2000-2011 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, Map<String, String[]> parameterMap,
045                            String remoteAddress, int remotePort, boolean secureConnection,
046                            long remoteGroupId, boolean remotePrivateLayout, Date startDate,
047                            Date endDate)
048                    throws Exception;
049    
050            public List<Layout> getMissingParentLayouts(Layout layout, long liveGroupId)
051                    throws Exception;
052    
053            public String getSchedulerGroupName(String destinationName, long groupId);
054    
055            public Map<String, String[]> getStagingParameters();
056    
057            public Map<String, String[]> getStagingParameters(
058                    PortletRequest PortletRequest);
059    
060            public void publishLayout(
061                            long plid, long liveGroupId, boolean includeChildren)
062                    throws Exception;
063    
064            public void publishLayouts(
065                            long sourceGroupId, long targetGroupId, boolean privateLayout,
066                            long[] layoutIds, Map<String, String[]> parameterMap,
067                            Date startDate, Date endDate)
068                    throws Exception;
069    
070            public void publishLayouts(
071                            long sourceGroupId, long targetGroupId, boolean privateLayout,
072                            Map<Long, Boolean> layoutIdMap, Map<String, String[]> parameterMap,
073                            Date startDate, Date endDate)
074                    throws Exception;
075    
076            public void publishLayouts(
077                            long sourceGroupId, long targetGroupId, boolean privateLayout,
078                            Map<String, String[]> parameterMap, Date startDate, Date endDate)
079                    throws Exception;
080    
081            public void publishToLive(PortletRequest PortletRequest) throws Exception;
082    
083            public void publishToLive(PortletRequest PortletRequest, Portlet portlet)
084                    throws Exception;
085    
086            public void publishToRemote(PortletRequest PortletRequest) throws Exception;
087    
088            public void scheduleCopyFromLive(PortletRequest PortletRequest)
089                    throws Exception;
090    
091            public void schedulePublishToLive(PortletRequest PortletRequest)
092                    throws Exception;
093    
094            public void schedulePublishToRemote(PortletRequest PortletRequest)
095                    throws Exception;
096    
097            public void unscheduleCopyFromLive(PortletRequest PortletRequest)
098                    throws Exception;
099    
100            public void unschedulePublishToLive(PortletRequest PortletRequest)
101                    throws Exception;
102    
103            public void unschedulePublishToRemote(PortletRequest PortletRequest)
104                    throws Exception;
105    
106            public void updateStaging(PortletRequest PortletRequest) throws Exception;
107    
108    }