1
22
23 package com.liferay.portal.service;
24
25
26
46 public class LayoutServiceUtil {
47 public static com.liferay.portal.model.Layout addLayout(long groupId,
48 boolean privateLayout, long parentLayoutId, java.lang.String name,
49 java.lang.String title, java.lang.String description,
50 java.lang.String type, boolean hidden, java.lang.String friendlyURL)
51 throws com.liferay.portal.PortalException,
52 com.liferay.portal.SystemException, java.rmi.RemoteException {
53 return getService()
54 .addLayout(groupId, privateLayout, parentLayoutId, name,
55 title, description, type, hidden, friendlyURL);
56 }
57
58 public static com.liferay.portal.model.Layout addLayout(long groupId,
59 boolean privateLayout, long parentLayoutId,
60 java.util.Map<java.util.Locale, String> localeNamesMap,
61 java.util.Map<java.util.Locale, String> localeTitlesMap,
62 java.lang.String description, java.lang.String type, boolean hidden,
63 java.lang.String friendlyURL)
64 throws com.liferay.portal.PortalException,
65 com.liferay.portal.SystemException, java.rmi.RemoteException {
66 return getService()
67 .addLayout(groupId, privateLayout, parentLayoutId,
68 localeNamesMap, localeTitlesMap, description, type, hidden,
69 friendlyURL);
70 }
71
72 public static void deleteLayout(long plid)
73 throws com.liferay.portal.PortalException,
74 com.liferay.portal.SystemException, java.rmi.RemoteException {
75 getService().deleteLayout(plid);
76 }
77
78 public static void deleteLayout(long groupId, boolean privateLayout,
79 long layoutId)
80 throws com.liferay.portal.PortalException,
81 com.liferay.portal.SystemException, java.rmi.RemoteException {
82 getService().deleteLayout(groupId, privateLayout, layoutId);
83 }
84
85 public static java.lang.String getLayoutName(long groupId,
86 boolean privateLayout, long layoutId, java.lang.String languageId)
87 throws com.liferay.portal.PortalException,
88 com.liferay.portal.SystemException, java.rmi.RemoteException {
89 return getService()
90 .getLayoutName(groupId, privateLayout, layoutId, languageId);
91 }
92
93 public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
94 long companyId, java.lang.String portletId, java.lang.String prefsKey,
95 java.lang.String prefsValue)
96 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
97 return getService()
98 .getLayoutReferences(companyId, portletId, prefsKey,
99 prefsValue);
100 }
101
102 public static byte[] exportLayouts(long groupId, boolean privateLayout,
103 java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
104 java.util.Date endDate)
105 throws com.liferay.portal.PortalException,
106 com.liferay.portal.SystemException, java.rmi.RemoteException {
107 return getService()
108 .exportLayouts(groupId, privateLayout, parameterMap,
109 startDate, endDate);
110 }
111
112 public static byte[] exportLayouts(long groupId, boolean privateLayout,
113 long[] layoutIds, java.util.Map<String, String[]> parameterMap,
114 java.util.Date startDate, java.util.Date endDate)
115 throws com.liferay.portal.PortalException,
116 com.liferay.portal.SystemException, java.rmi.RemoteException {
117 return getService()
118 .exportLayouts(groupId, privateLayout, layoutIds,
119 parameterMap, startDate, endDate);
120 }
121
122 public static com.liferay.portal.kernel.io.FileCacheOutputStream exportLayoutsAsStream(
123 long groupId, boolean privateLayout, long[] layoutIds,
124 java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
125 java.util.Date endDate)
126 throws com.liferay.portal.PortalException,
127 com.liferay.portal.SystemException, java.rmi.RemoteException {
128 return getService()
129 .exportLayoutsAsStream(groupId, privateLayout, layoutIds,
130 parameterMap, startDate, endDate);
131 }
132
133 public static byte[] exportPortletInfo(long plid, long groupId,
134 java.lang.String portletId,
135 java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
136 java.util.Date endDate)
137 throws com.liferay.portal.PortalException,
138 com.liferay.portal.SystemException, java.rmi.RemoteException {
139 return getService()
140 .exportPortletInfo(plid, groupId, portletId, parameterMap,
141 startDate, endDate);
142 }
143
144 public static com.liferay.portal.kernel.io.FileCacheOutputStream exportPortletInfoAsStream(
145 long plid, long groupId, java.lang.String portletId,
146 java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
147 java.util.Date endDate)
148 throws com.liferay.portal.PortalException,
149 com.liferay.portal.SystemException, java.rmi.RemoteException {
150 return getService()
151 .exportPortletInfoAsStream(plid, groupId, portletId,
152 parameterMap, startDate, endDate);
153 }
154
155 public static void importLayouts(long groupId, boolean privateLayout,
156 java.util.Map<String, String[]> parameterMap, java.io.File file)
157 throws com.liferay.portal.PortalException,
158 com.liferay.portal.SystemException, java.rmi.RemoteException {
159 getService().importLayouts(groupId, privateLayout, parameterMap, file);
160 }
161
162 public static void importLayouts(long groupId, boolean privateLayout,
163 java.util.Map<String, String[]> parameterMap, byte[] bytes)
164 throws com.liferay.portal.PortalException,
165 com.liferay.portal.SystemException, java.rmi.RemoteException {
166 getService().importLayouts(groupId, privateLayout, parameterMap, bytes);
167 }
168
169 public static void importLayouts(long groupId, boolean privateLayout,
170 java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
171 throws com.liferay.portal.PortalException,
172 com.liferay.portal.SystemException, java.rmi.RemoteException {
173 getService().importLayouts(groupId, privateLayout, parameterMap, is);
174 }
175
176 public static void importPortletInfo(long plid, long groupId,
177 java.lang.String portletId,
178 java.util.Map<String, String[]> parameterMap, java.io.File file)
179 throws com.liferay.portal.PortalException,
180 com.liferay.portal.SystemException, java.rmi.RemoteException {
181 getService()
182 .importPortletInfo(plid, groupId, portletId, parameterMap, file);
183 }
184
185 public static void importPortletInfo(long plid, long groupId,
186 java.lang.String portletId,
187 java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
188 throws com.liferay.portal.PortalException,
189 com.liferay.portal.SystemException, java.rmi.RemoteException {
190 getService()
191 .importPortletInfo(plid, groupId, portletId, parameterMap, is);
192 }
193
194 public static void schedulePublishToLive(long sourceGroupId,
195 long targetGroupId, boolean privateLayout,
196 java.util.Map<Long, Boolean> layoutIdMap,
197 java.util.Map<String, String[]> parameterMap, java.lang.String scope,
198 java.util.Date startDate, java.util.Date endDate,
199 java.lang.String groupName, java.lang.String cronText,
200 java.util.Date schedulerStartDate, java.util.Date schedulerEndDate,
201 java.lang.String description)
202 throws com.liferay.portal.PortalException,
203 com.liferay.portal.SystemException, java.rmi.RemoteException {
204 getService()
205 .schedulePublishToLive(sourceGroupId, targetGroupId, privateLayout,
206 layoutIdMap, parameterMap, scope, startDate, endDate, groupName,
207 cronText, schedulerStartDate, schedulerEndDate, description);
208 }
209
210 public static void schedulePublishToRemote(long sourceGroupId,
211 boolean privateLayout, java.util.Map<Long, Boolean> layoutIdMap,
212 java.util.Map<String, String[]> parameterMap,
213 java.lang.String remoteAddress, int remotePort,
214 boolean secureConnection, long remoteGroupId,
215 boolean remotePrivateLayout, java.util.Date startDate,
216 java.util.Date endDate, java.lang.String groupName,
217 java.lang.String cronText, java.util.Date schedulerStartDate,
218 java.util.Date schedulerEndDate, java.lang.String description)
219 throws com.liferay.portal.PortalException,
220 com.liferay.portal.SystemException, java.rmi.RemoteException {
221 getService()
222 .schedulePublishToRemote(sourceGroupId, privateLayout, layoutIdMap,
223 parameterMap, remoteAddress, remotePort, secureConnection,
224 remoteGroupId, remotePrivateLayout, startDate, endDate, groupName,
225 cronText, schedulerStartDate, schedulerEndDate, description);
226 }
227
228 public static void setLayouts(long groupId, boolean privateLayout,
229 long parentLayoutId, long[] layoutIds)
230 throws com.liferay.portal.PortalException,
231 com.liferay.portal.SystemException, java.rmi.RemoteException {
232 getService()
233 .setLayouts(groupId, privateLayout, parentLayoutId, layoutIds);
234 }
235
236 public static void unschedulePublishToLive(long groupId,
237 java.lang.String jobName, java.lang.String groupName)
238 throws com.liferay.portal.PortalException,
239 com.liferay.portal.SystemException, java.rmi.RemoteException {
240 getService().unschedulePublishToLive(groupId, jobName, groupName);
241 }
242
243 public static void unschedulePublishToRemote(long groupId,
244 java.lang.String jobName, java.lang.String groupName)
245 throws com.liferay.portal.PortalException,
246 com.liferay.portal.SystemException, java.rmi.RemoteException {
247 getService().unschedulePublishToRemote(groupId, jobName, groupName);
248 }
249
250 public static com.liferay.portal.model.Layout updateLayout(long groupId,
251 boolean privateLayout, long layoutId, long parentLayoutId,
252 java.util.Map<java.util.Locale, String> localeNamesMap,
253 java.util.Map<java.util.Locale, String> localeTitlesMap,
254 java.lang.String description, java.lang.String type, boolean hidden,
255 java.lang.String friendlyURL)
256 throws com.liferay.portal.PortalException,
257 com.liferay.portal.SystemException, java.rmi.RemoteException {
258 return getService()
259 .updateLayout(groupId, privateLayout, layoutId,
260 parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
261 hidden, friendlyURL);
262 }
263
264 public static com.liferay.portal.model.Layout updateLayout(long groupId,
265 boolean privateLayout, long layoutId, long parentLayoutId,
266 java.util.Map<java.util.Locale, String> localeNamesMap,
267 java.util.Map<java.util.Locale, String> localeTitlesMap,
268 java.lang.String description, java.lang.String type, boolean hidden,
269 java.lang.String friendlyURL, java.lang.Boolean iconImage,
270 byte[] iconBytes)
271 throws com.liferay.portal.PortalException,
272 com.liferay.portal.SystemException, java.rmi.RemoteException {
273 return getService()
274 .updateLayout(groupId, privateLayout, layoutId,
275 parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
276 hidden, friendlyURL, iconImage, iconBytes);
277 }
278
279 public static com.liferay.portal.model.Layout updateLayout(long groupId,
280 boolean privateLayout, long layoutId, java.lang.String typeSettings)
281 throws com.liferay.portal.PortalException,
282 com.liferay.portal.SystemException, java.rmi.RemoteException {
283 return getService()
284 .updateLayout(groupId, privateLayout, layoutId, typeSettings);
285 }
286
287 public static com.liferay.portal.model.Layout updateLookAndFeel(
288 long groupId, boolean privateLayout, long layoutId,
289 java.lang.String themeId, java.lang.String colorSchemeId,
290 java.lang.String css, boolean wapTheme)
291 throws com.liferay.portal.PortalException,
292 com.liferay.portal.SystemException, java.rmi.RemoteException {
293 return getService()
294 .updateLookAndFeel(groupId, privateLayout, layoutId,
295 themeId, colorSchemeId, css, wapTheme);
296 }
297
298 public static com.liferay.portal.model.Layout updateName(long plid,
299 java.lang.String name, java.lang.String languageId)
300 throws com.liferay.portal.PortalException,
301 com.liferay.portal.SystemException, java.rmi.RemoteException {
302 return getService().updateName(plid, name, languageId);
303 }
304
305 public static com.liferay.portal.model.Layout updateName(long groupId,
306 boolean privateLayout, long layoutId, java.lang.String name,
307 java.lang.String languageId)
308 throws com.liferay.portal.PortalException,
309 com.liferay.portal.SystemException, java.rmi.RemoteException {
310 return getService()
311 .updateName(groupId, privateLayout, layoutId, name,
312 languageId);
313 }
314
315 public static com.liferay.portal.model.Layout updateParentLayoutId(
316 long plid, long parentPlid)
317 throws com.liferay.portal.PortalException,
318 com.liferay.portal.SystemException, java.rmi.RemoteException {
319 return getService().updateParentLayoutId(plid, parentPlid);
320 }
321
322 public static com.liferay.portal.model.Layout updateParentLayoutId(
323 long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
324 throws com.liferay.portal.PortalException,
325 com.liferay.portal.SystemException, java.rmi.RemoteException {
326 return getService()
327 .updateParentLayoutId(groupId, privateLayout, layoutId,
328 parentLayoutId);
329 }
330
331 public static com.liferay.portal.model.Layout updatePriority(long plid,
332 int priority)
333 throws com.liferay.portal.PortalException,
334 com.liferay.portal.SystemException, java.rmi.RemoteException {
335 return getService().updatePriority(plid, priority);
336 }
337
338 public static com.liferay.portal.model.Layout updatePriority(long groupId,
339 boolean privateLayout, long layoutId, int priority)
340 throws com.liferay.portal.PortalException,
341 com.liferay.portal.SystemException, java.rmi.RemoteException {
342 return getService()
343 .updatePriority(groupId, privateLayout, layoutId, priority);
344 }
345
346 public static LayoutService getService() {
347 if (_service == null) {
348 throw new RuntimeException("LayoutService is not set");
349 }
350
351 return _service;
352 }
353
354 public void setService(LayoutService service) {
355 _service = service;
356 }
357
358 private static LayoutService _service;
359 }