1
14
15 package com.liferay.portal.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class LayoutLocalServiceUtil {
42 public static com.liferay.portal.model.Layout addLayout(
43 com.liferay.portal.model.Layout layout)
44 throws com.liferay.portal.SystemException {
45 return getService().addLayout(layout);
46 }
47
48 public static com.liferay.portal.model.Layout createLayout(long plid) {
49 return getService().createLayout(plid);
50 }
51
52 public static void deleteLayout(long plid)
53 throws com.liferay.portal.PortalException,
54 com.liferay.portal.SystemException {
55 getService().deleteLayout(plid);
56 }
57
58 public static void deleteLayout(com.liferay.portal.model.Layout layout)
59 throws com.liferay.portal.SystemException {
60 getService().deleteLayout(layout);
61 }
62
63 @SuppressWarnings("rawtypes")
64 public static java.util.List dynamicQuery(
65 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66 throws com.liferay.portal.SystemException {
67 return getService().dynamicQuery(dynamicQuery);
68 }
69
70 @SuppressWarnings("rawtypes")
71 public static java.util.List dynamicQuery(
72 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73 int end) throws com.liferay.portal.SystemException {
74 return getService().dynamicQuery(dynamicQuery, start, end);
75 }
76
77 @SuppressWarnings("rawtypes")
78 public static java.util.List dynamicQuery(
79 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80 int end,
81 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82 throws com.liferay.portal.SystemException {
83 return getService()
84 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85 }
86
87 public static int dynamicQueryCount(
88 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89 throws com.liferay.portal.SystemException {
90 return getService().dynamicQueryCount(dynamicQuery);
91 }
92
93 public static com.liferay.portal.model.Layout getLayout(long plid)
94 throws com.liferay.portal.PortalException,
95 com.liferay.portal.SystemException {
96 return getService().getLayout(plid);
97 }
98
99 public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
100 int start, int end) throws com.liferay.portal.SystemException {
101 return getService().getLayouts(start, end);
102 }
103
104 public static int getLayoutsCount()
105 throws com.liferay.portal.SystemException {
106 return getService().getLayoutsCount();
107 }
108
109 public static com.liferay.portal.model.Layout updateLayout(
110 com.liferay.portal.model.Layout layout)
111 throws com.liferay.portal.SystemException {
112 return getService().updateLayout(layout);
113 }
114
115 public static com.liferay.portal.model.Layout updateLayout(
116 com.liferay.portal.model.Layout layout, boolean merge)
117 throws com.liferay.portal.SystemException {
118 return getService().updateLayout(layout, merge);
119 }
120
121 public static com.liferay.portal.model.Layout addLayout(long userId,
122 long groupId, boolean privateLayout, long parentLayoutId,
123 java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
124 java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
125 java.lang.String description, java.lang.String type, boolean hidden,
126 java.lang.String friendlyURL)
127 throws com.liferay.portal.PortalException,
128 com.liferay.portal.SystemException {
129 return getService()
130 .addLayout(userId, groupId, privateLayout, parentLayoutId,
131 localeNamesMap, localeTitlesMap, description, type, hidden,
132 friendlyURL);
133 }
134
135 public static com.liferay.portal.model.Layout addLayout(long userId,
136 long groupId, boolean privateLayout, long parentLayoutId,
137 java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
138 java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
139 java.lang.String description, java.lang.String type, boolean hidden,
140 java.lang.String friendlyURL, long dlFolderId)
141 throws com.liferay.portal.PortalException,
142 com.liferay.portal.SystemException {
143 return getService()
144 .addLayout(userId, groupId, privateLayout, parentLayoutId,
145 localeNamesMap, localeTitlesMap, description, type, hidden,
146 friendlyURL, dlFolderId);
147 }
148
149 public static com.liferay.portal.model.Layout addLayout(long userId,
150 long groupId, boolean privateLayout, long parentLayoutId,
151 java.lang.String name, java.lang.String title,
152 java.lang.String description, java.lang.String type, boolean hidden,
153 java.lang.String friendlyURL)
154 throws com.liferay.portal.PortalException,
155 com.liferay.portal.SystemException {
156 return getService()
157 .addLayout(userId, groupId, privateLayout, parentLayoutId,
158 name, title, description, type, hidden, friendlyURL);
159 }
160
161 public static com.liferay.portal.model.Layout addLayout(long userId,
162 long groupId, boolean privateLayout, long parentLayoutId,
163 java.lang.String name, java.lang.String title,
164 java.lang.String description, java.lang.String type, boolean hidden,
165 java.lang.String friendlyURL, long dlFolderId)
166 throws com.liferay.portal.PortalException,
167 com.liferay.portal.SystemException {
168 return getService()
169 .addLayout(userId, groupId, privateLayout, parentLayoutId,
170 name, title, description, type, hidden, friendlyURL, dlFolderId);
171 }
172
173 public static void deleteLayout(com.liferay.portal.model.Layout layout,
174 boolean updateLayoutSet)
175 throws com.liferay.portal.PortalException,
176 com.liferay.portal.SystemException {
177 getService().deleteLayout(layout, updateLayoutSet);
178 }
179
180 public static void deleteLayout(long groupId, boolean privateLayout,
181 long layoutId)
182 throws com.liferay.portal.PortalException,
183 com.liferay.portal.SystemException {
184 getService().deleteLayout(groupId, privateLayout, layoutId);
185 }
186
187 public static void deleteLayouts(long groupId, boolean privateLayout)
188 throws com.liferay.portal.PortalException,
189 com.liferay.portal.SystemException {
190 getService().deleteLayouts(groupId, privateLayout);
191 }
192
193 public static byte[] exportLayouts(long groupId, boolean privateLayout,
194 long[] layoutIds,
195 java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
196 java.util.Date startDate, java.util.Date endDate)
197 throws com.liferay.portal.PortalException,
198 com.liferay.portal.SystemException {
199 return getService()
200 .exportLayouts(groupId, privateLayout, layoutIds,
201 parameterMap, startDate, endDate);
202 }
203
204 public static byte[] exportLayouts(long groupId, boolean privateLayout,
205 java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
206 java.util.Date startDate, java.util.Date endDate)
207 throws com.liferay.portal.PortalException,
208 com.liferay.portal.SystemException {
209 return getService()
210 .exportLayouts(groupId, privateLayout, parameterMap,
211 startDate, endDate);
212 }
213
214 public static java.io.File exportLayoutsAsFile(long groupId,
215 boolean privateLayout, long[] layoutIds,
216 java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
217 java.util.Date startDate, java.util.Date endDate)
218 throws com.liferay.portal.PortalException,
219 com.liferay.portal.SystemException {
220 return getService()
221 .exportLayoutsAsFile(groupId, privateLayout, layoutIds,
222 parameterMap, startDate, endDate);
223 }
224
225 public static byte[] exportPortletInfo(long plid, long groupId,
226 java.lang.String portletId,
227 java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
228 java.util.Date startDate, java.util.Date endDate)
229 throws com.liferay.portal.PortalException,
230 com.liferay.portal.SystemException {
231 return getService()
232 .exportPortletInfo(plid, groupId, portletId, parameterMap,
233 startDate, endDate);
234 }
235
236 public static java.io.File exportPortletInfoAsFile(long plid, long groupId,
237 java.lang.String portletId,
238 java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
239 java.util.Date startDate, java.util.Date endDate)
240 throws com.liferay.portal.PortalException,
241 com.liferay.portal.SystemException {
242 return getService()
243 .exportPortletInfoAsFile(plid, groupId, portletId,
244 parameterMap, startDate, endDate);
245 }
246
247 public static long getDefaultPlid(long groupId)
248 throws com.liferay.portal.SystemException {
249 return getService().getDefaultPlid(groupId);
250 }
251
252 public static long getDefaultPlid(long groupId, boolean privateLayout)
253 throws com.liferay.portal.SystemException {
254 return getService().getDefaultPlid(groupId, privateLayout);
255 }
256
257 public static long getDefaultPlid(long groupId, boolean privateLayout,
258 java.lang.String portletId) throws com.liferay.portal.SystemException {
259 return getService().getDefaultPlid(groupId, privateLayout, portletId);
260 }
261
262 public static com.liferay.portal.model.Layout getDLFolderLayout(
263 long dlFolderId)
264 throws com.liferay.portal.PortalException,
265 com.liferay.portal.SystemException {
266 return getService().getDLFolderLayout(dlFolderId);
267 }
268
269 public static com.liferay.portal.model.Layout getFriendlyURLLayout(
270 long groupId, boolean privateLayout, java.lang.String friendlyURL)
271 throws com.liferay.portal.PortalException,
272 com.liferay.portal.SystemException {
273 return getService()
274 .getFriendlyURLLayout(groupId, privateLayout, friendlyURL);
275 }
276
277 public static com.liferay.portal.model.Layout getLayout(long groupId,
278 boolean privateLayout, long layoutId)
279 throws com.liferay.portal.PortalException,
280 com.liferay.portal.SystemException {
281 return getService().getLayout(groupId, privateLayout, layoutId);
282 }
283
284 public static com.liferay.portal.model.Layout getLayoutByIconImageId(
285 long iconImageId)
286 throws com.liferay.portal.PortalException,
287 com.liferay.portal.SystemException {
288 return getService().getLayoutByIconImageId(iconImageId);
289 }
290
291 public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
292 long groupId, boolean privateLayout)
293 throws com.liferay.portal.SystemException {
294 return getService().getLayouts(groupId, privateLayout);
295 }
296
297 public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
298 long groupId, boolean privateLayout, long parentLayoutId)
299 throws com.liferay.portal.SystemException {
300 return getService().getLayouts(groupId, privateLayout, parentLayoutId);
301 }
302
303 public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
304 long groupId, boolean privateLayout, long parentLayoutId, int start,
305 int end) throws com.liferay.portal.SystemException {
306 return getService()
307 .getLayouts(groupId, privateLayout, parentLayoutId, start,
308 end);
309 }
310
311 public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
312 long groupId, boolean privateLayout, long[] layoutIds)
313 throws com.liferay.portal.PortalException,
314 com.liferay.portal.SystemException {
315 return getService().getLayouts(groupId, privateLayout, layoutIds);
316 }
317
318 public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
319 long groupId, boolean privateLayout, java.lang.String type)
320 throws com.liferay.portal.SystemException {
321 return getService().getLayouts(groupId, privateLayout, type);
322 }
323
324 public static com.liferay.portal.model.LayoutReference[] getLayouts(
325 long companyId, java.lang.String portletId,
326 java.lang.String preferencesKey, java.lang.String preferencesValue)
327 throws com.liferay.portal.SystemException {
328 return getService()
329 .getLayouts(companyId, portletId, preferencesKey,
330 preferencesValue);
331 }
332
333 public static long getNextLayoutId(long groupId, boolean privateLayout)
334 throws com.liferay.portal.SystemException {
335 return getService().getNextLayoutId(groupId, privateLayout);
336 }
337
338 public static java.util.List<com.liferay.portal.model.Layout> getNullFriendlyURLLayouts()
339 throws com.liferay.portal.SystemException {
340 return getService().getNullFriendlyURLLayouts();
341 }
342
343 public static void importLayouts(long userId, long groupId,
344 boolean privateLayout,
345 java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
346 byte[] bytes)
347 throws com.liferay.portal.PortalException,
348 com.liferay.portal.SystemException {
349 getService()
350 .importLayouts(userId, groupId, privateLayout, parameterMap, bytes);
351 }
352
353 public static void importLayouts(long userId, long groupId,
354 boolean privateLayout,
355 java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
356 java.io.File file)
357 throws com.liferay.portal.PortalException,
358 com.liferay.portal.SystemException {
359 getService()
360 .importLayouts(userId, groupId, privateLayout, parameterMap, file);
361 }
362
363 public static void importLayouts(long userId, long groupId,
364 boolean privateLayout,
365 java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
366 java.io.InputStream is)
367 throws com.liferay.portal.PortalException,
368 com.liferay.portal.SystemException {
369 getService()
370 .importLayouts(userId, groupId, privateLayout, parameterMap, is);
371 }
372
373 public static void importPortletInfo(long userId, long plid, long groupId,
374 java.lang.String portletId,
375 java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
376 java.io.File file)
377 throws com.liferay.portal.PortalException,
378 com.liferay.portal.SystemException {
379 getService()
380 .importPortletInfo(userId, plid, groupId, portletId, parameterMap,
381 file);
382 }
383
384 public static void importPortletInfo(long userId, long plid, long groupId,
385 java.lang.String portletId,
386 java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
387 java.io.InputStream is)
388 throws com.liferay.portal.PortalException,
389 com.liferay.portal.SystemException {
390 getService()
391 .importPortletInfo(userId, plid, groupId, portletId, parameterMap,
392 is);
393 }
394
395 public static void setLayouts(long groupId, boolean privateLayout,
396 long parentLayoutId, long[] layoutIds)
397 throws com.liferay.portal.PortalException,
398 com.liferay.portal.SystemException {
399 getService()
400 .setLayouts(groupId, privateLayout, parentLayoutId, layoutIds);
401 }
402
403 public static com.liferay.portal.model.Layout updateFriendlyURL(long plid,
404 java.lang.String friendlyURL)
405 throws com.liferay.portal.PortalException,
406 com.liferay.portal.SystemException {
407 return getService().updateFriendlyURL(plid, friendlyURL);
408 }
409
410 public static com.liferay.portal.model.Layout updateLayout(long groupId,
411 boolean privateLayout, long layoutId, long parentLayoutId,
412 java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
413 java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
414 java.lang.String description, java.lang.String type, boolean hidden,
415 java.lang.String friendlyURL)
416 throws com.liferay.portal.PortalException,
417 com.liferay.portal.SystemException {
418 return getService()
419 .updateLayout(groupId, privateLayout, layoutId,
420 parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
421 hidden, friendlyURL);
422 }
423
424 public static com.liferay.portal.model.Layout updateLayout(long groupId,
425 boolean privateLayout, long layoutId, long parentLayoutId,
426 java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
427 java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
428 java.lang.String description, java.lang.String type, boolean hidden,
429 java.lang.String friendlyURL, java.lang.Boolean iconImage,
430 byte[] iconBytes)
431 throws com.liferay.portal.PortalException,
432 com.liferay.portal.SystemException {
433 return getService()
434 .updateLayout(groupId, privateLayout, layoutId,
435 parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
436 hidden, friendlyURL, iconImage, iconBytes);
437 }
438
439 public static com.liferay.portal.model.Layout updateLayout(long groupId,
440 boolean privateLayout, long layoutId, java.lang.String typeSettings)
441 throws com.liferay.portal.PortalException,
442 com.liferay.portal.SystemException {
443 return getService()
444 .updateLayout(groupId, privateLayout, layoutId, typeSettings);
445 }
446
447 public static com.liferay.portal.model.Layout updateLookAndFeel(
448 long groupId, boolean privateLayout, long layoutId,
449 java.lang.String themeId, java.lang.String colorSchemeId,
450 java.lang.String css, boolean wapTheme)
451 throws com.liferay.portal.PortalException,
452 com.liferay.portal.SystemException {
453 return getService()
454 .updateLookAndFeel(groupId, privateLayout, layoutId,
455 themeId, colorSchemeId, css, wapTheme);
456 }
457
458 public static com.liferay.portal.model.Layout updateName(
459 com.liferay.portal.model.Layout layout, java.lang.String name,
460 java.lang.String languageId)
461 throws com.liferay.portal.PortalException,
462 com.liferay.portal.SystemException {
463 return getService().updateName(layout, name, languageId);
464 }
465
466 public static com.liferay.portal.model.Layout updateName(long groupId,
467 boolean privateLayout, long layoutId, java.lang.String name,
468 java.lang.String languageId)
469 throws com.liferay.portal.PortalException,
470 com.liferay.portal.SystemException {
471 return getService()
472 .updateName(groupId, privateLayout, layoutId, name,
473 languageId);
474 }
475
476 public static com.liferay.portal.model.Layout updateName(long plid,
477 java.lang.String name, java.lang.String languageId)
478 throws com.liferay.portal.PortalException,
479 com.liferay.portal.SystemException {
480 return getService().updateName(plid, name, languageId);
481 }
482
483 public static com.liferay.portal.model.Layout updateParentLayoutId(
484 long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
485 throws com.liferay.portal.PortalException,
486 com.liferay.portal.SystemException {
487 return getService()
488 .updateParentLayoutId(groupId, privateLayout, layoutId,
489 parentLayoutId);
490 }
491
492 public static com.liferay.portal.model.Layout updateParentLayoutId(
493 long plid, long parentPlid)
494 throws com.liferay.portal.PortalException,
495 com.liferay.portal.SystemException {
496 return getService().updateParentLayoutId(plid, parentPlid);
497 }
498
499 public static com.liferay.portal.model.Layout updatePriority(
500 com.liferay.portal.model.Layout layout, int priority)
501 throws com.liferay.portal.SystemException {
502 return getService().updatePriority(layout, priority);
503 }
504
505 public static com.liferay.portal.model.Layout updatePriority(long groupId,
506 boolean privateLayout, long layoutId, int priority)
507 throws com.liferay.portal.PortalException,
508 com.liferay.portal.SystemException {
509 return getService()
510 .updatePriority(groupId, privateLayout, layoutId, priority);
511 }
512
513 public static com.liferay.portal.model.Layout updatePriority(long plid,
514 int priority)
515 throws com.liferay.portal.PortalException,
516 com.liferay.portal.SystemException {
517 return getService().updatePriority(plid, priority);
518 }
519
520 public static LayoutLocalService getService() {
521 if (_service == null) {
522 _service = (LayoutLocalService)PortalBeanLocatorUtil.locate(LayoutLocalService.class.getName());
523
524 ReferenceRegistry.registerReference(LayoutLocalServiceUtil.class,
525 "_service");
526 MethodCache.remove(LayoutLocalService.class);
527 }
528
529 return _service;
530 }
531
532 public void setService(LayoutLocalService service) {
533 MethodCache.remove(LayoutLocalService.class);
534
535 _service = service;
536
537 ReferenceRegistry.registerReference(LayoutLocalServiceUtil.class,
538 "_service");
539 MethodCache.remove(LayoutLocalService.class);
540 }
541
542 private static LayoutLocalService _service;
543 }