001
014
015 package com.liferay.portal.kernel.staging;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.exception.SystemException;
019 import com.liferay.portal.kernel.lar.PortletDataContext;
020 import com.liferay.portal.kernel.workflow.WorkflowTask;
021 import com.liferay.portal.kernel.xml.Element;
022 import com.liferay.portal.model.Group;
023 import com.liferay.portal.model.Layout;
024 import com.liferay.portal.model.LayoutRevision;
025 import com.liferay.portal.model.Portlet;
026 import com.liferay.portal.model.User;
027 import com.liferay.portal.service.ServiceContext;
028
029 import java.util.Date;
030 import java.util.List;
031 import java.util.Map;
032
033 import javax.portlet.PortletRequest;
034
035 import javax.servlet.http.HttpServletRequest;
036
037
040 public interface Staging {
041
042 public String buildRemoteURL(
043 String remoteAddress, int remotePort, String remotePathContext,
044 boolean secureConnection, long remoteGroupId, boolean privateLayout);
045
046 public void copyFromLive(PortletRequest PortletRequest) throws Exception;
047
048 public void copyFromLive(PortletRequest PortletRequest, Portlet portlet)
049 throws Exception;
050
051 public void copyPortlet(
052 PortletRequest PortletRequest, long sourceGroupId,
053 long targetGroupId, long sourcePlid, long targetPlid,
054 String portletId)
055 throws Exception;
056
057 public void copyRemoteLayouts(
058 long sourceGroupId, boolean privateLayout,
059 Map<Long, Boolean> layoutIdMap, Map<String, String[]> parameterMap,
060 String remoteAddress, int remotePort, String remotePathContext,
061 boolean secureConnection, long remoteGroupId,
062 boolean remotePrivateLayout, Date startDate, Date endDate)
063 throws Exception;
064
065 public void deleteLastImportSettings(Group liveGroup, boolean privateLayout)
066 throws Exception;
067
068 public void deleteRecentLayoutRevisionId(
069 HttpServletRequest request, long layoutSetBranchId, long plid)
070 throws SystemException;
071
072 public void deleteRecentLayoutRevisionId(
073 User user, long layoutSetBranchId, long plid)
074 throws SystemException;
075
076 public void disableStaging(
077 Group scopeGroup, Group liveGroup, ServiceContext serviceContext)
078 throws Exception;
079
080 public void disableStaging(
081 PortletRequest portletRequest, Group scopeGroup, Group liveGroup,
082 ServiceContext serviceContext)
083 throws Exception;
084
085 public void enableLocalStaging(
086 long userId, Group scopeGroup, Group liveGroup,
087 boolean branchingPublic, boolean branchingPrivate,
088 ServiceContext serviceContext)
089 throws Exception;
090
091 public void enableRemoteStaging(
092 long userId, Group scopeGroup, Group liveGroup,
093 boolean branchingPublic, boolean branchingPrivate,
094 String remoteAddress, int remotePort, String remotePathContext,
095 boolean secureConnection, long remoteGroupId,
096 ServiceContext serviceContext)
097 throws Exception;
098
099 public Group getLiveGroup(long groupId)
100 throws PortalException, SystemException;
101
102 public long getLiveGroupId(long groupId)
103 throws PortalException, SystemException;
104
105 public List<Layout> getMissingParentLayouts(Layout layout, long liveGroupId)
106 throws Exception;
107
108 public long getRecentLayoutRevisionId(
109 HttpServletRequest request, long layoutSetBranchId, long plid)
110 throws PortalException, SystemException;
111
112 public long getRecentLayoutRevisionId(
113 User user, long layoutSetBranchId, long plid)
114 throws PortalException, SystemException;
115
116 public long getRecentLayoutSetBranchId(
117 HttpServletRequest request, long layoutSetId);
118
119 public long getRecentLayoutSetBranchId(User user, long layoutSetId)
120 throws SystemException;
121
122 public String getSchedulerGroupName(String destinationName, long groupId);
123
124 public Map<String, String[]> getStagingParameters();
125
126 public Map<String, String[]> getStagingParameters(
127 PortletRequest PortletRequest);
128
129 public WorkflowTask getWorkflowTask(
130 long userId, LayoutRevision layoutRevision)
131 throws PortalException, SystemException;
132
133 public boolean hasWorkflowTask(long userId, LayoutRevision layoutRevision)
134 throws PortalException, SystemException;
135
136 public boolean isIncomplete(Layout layout, long layoutSetBranchId);
137
138 public void publishLayout(
139 long userId, long plid, long liveGroupId, boolean includeChildren)
140 throws Exception;
141
142 public void publishLayouts(
143 long userId, long sourceGroupId, long targetGroupId,
144 boolean privateLayout, long[] layoutIds,
145 Map<String, String[]> parameterMap, Date startDate, Date endDate)
146 throws Exception;
147
148 public void publishLayouts(
149 long userId, long sourceGroupId, long targetGroupId,
150 boolean privateLayout, Map<Long, Boolean> layoutIdMap,
151 Map<String, String[]> parameterMap, Date startDate, Date endDate)
152 throws Exception;
153
154 public void publishLayouts(
155 long userId, long sourceGroupId, long targetGroupId,
156 boolean privateLayout, Map<String, String[]> parameterMap,
157 Date startDate, Date endDate)
158 throws Exception;
159
160 public void publishToLive(PortletRequest PortletRequest) throws Exception;
161
162 public void publishToLive(PortletRequest PortletRequest, Portlet portlet)
163 throws Exception;
164
165 public void publishToRemote(PortletRequest PortletRequest) throws Exception;
166
167 public void scheduleCopyFromLive(PortletRequest PortletRequest)
168 throws Exception;
169
170 public void schedulePublishToLive(PortletRequest PortletRequest)
171 throws Exception;
172
173 public void schedulePublishToRemote(PortletRequest PortletRequest)
174 throws Exception;
175
176 public void setRecentLayoutBranchId(
177 HttpServletRequest request, long layoutSetBranchId, long plid,
178 long layoutBranchId)
179 throws SystemException;
180
181 public void setRecentLayoutBranchId(
182 User user, long layoutSetBranchId, long plid, long layoutBranchId)
183 throws SystemException;
184
185 public void setRecentLayoutRevisionId(
186 HttpServletRequest request, long layoutSetBranchId, long plid,
187 long layoutRevisionId)
188 throws SystemException;
189
190 public void setRecentLayoutRevisionId(
191 User user, long layoutSetBranchId, long plid, long layoutRevisionId)
192 throws SystemException;
193
194 public void setRecentLayoutSetBranchId(
195 HttpServletRequest request, long layoutSetId, long layoutSetBranchId);
196
197 public void setRecentLayoutSetBranchId(
198 User user, long layoutSetId, long layoutSetBranchId)
199 throws SystemException;
200
201 public void unscheduleCopyFromLive(PortletRequest PortletRequest)
202 throws Exception;
203
204 public void unschedulePublishToLive(PortletRequest PortletRequest)
205 throws Exception;
206
207 public void unschedulePublishToRemote(PortletRequest PortletRequest)
208 throws Exception;
209
210 public void updateLastImportSettings(
211 Element layoutElement, Layout layout,
212 PortletDataContext portletDataContext)
213 throws Exception;
214
215 public void updateStaging(PortletRequest PortletRequest, Group liveGroup)
216 throws Exception;
217
218 }