001
014
015 package com.liferay.portlet.wiki.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class WikiPageLocalServiceUtil {
035
040
041
048 public static com.liferay.portlet.wiki.model.WikiPage addWikiPage(
049 com.liferay.portlet.wiki.model.WikiPage wikiPage)
050 throws com.liferay.portal.kernel.exception.SystemException {
051 return getService().addWikiPage(wikiPage);
052 }
053
054
060 public static com.liferay.portlet.wiki.model.WikiPage createWikiPage(
061 long pageId) {
062 return getService().createWikiPage(pageId);
063 }
064
065
072 public static void deleteWikiPage(long pageId)
073 throws com.liferay.portal.kernel.exception.PortalException,
074 com.liferay.portal.kernel.exception.SystemException {
075 getService().deleteWikiPage(pageId);
076 }
077
078
084 public static void deleteWikiPage(
085 com.liferay.portlet.wiki.model.WikiPage wikiPage)
086 throws com.liferay.portal.kernel.exception.SystemException {
087 getService().deleteWikiPage(wikiPage);
088 }
089
090
097 @SuppressWarnings("rawtypes")
098 public static java.util.List dynamicQuery(
099 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
100 throws com.liferay.portal.kernel.exception.SystemException {
101 return getService().dynamicQuery(dynamicQuery);
102 }
103
104
117 @SuppressWarnings("rawtypes")
118 public static java.util.List dynamicQuery(
119 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120 int end) throws com.liferay.portal.kernel.exception.SystemException {
121 return getService().dynamicQuery(dynamicQuery, start, end);
122 }
123
124
138 @SuppressWarnings("rawtypes")
139 public static java.util.List dynamicQuery(
140 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141 int end,
142 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143 throws com.liferay.portal.kernel.exception.SystemException {
144 return getService()
145 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
146 }
147
148
155 public static long dynamicQueryCount(
156 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
157 throws com.liferay.portal.kernel.exception.SystemException {
158 return getService().dynamicQueryCount(dynamicQuery);
159 }
160
161
169 public static com.liferay.portlet.wiki.model.WikiPage getWikiPage(
170 long pageId)
171 throws com.liferay.portal.kernel.exception.PortalException,
172 com.liferay.portal.kernel.exception.SystemException {
173 return getService().getWikiPage(pageId);
174 }
175
176 public static com.liferay.portal.model.PersistedModel getPersistedModel(
177 java.io.Serializable primaryKeyObj)
178 throws com.liferay.portal.kernel.exception.PortalException,
179 com.liferay.portal.kernel.exception.SystemException {
180 return getService().getPersistedModel(primaryKeyObj);
181 }
182
183
192 public static com.liferay.portlet.wiki.model.WikiPage getWikiPageByUuidAndGroupId(
193 java.lang.String uuid, long groupId)
194 throws com.liferay.portal.kernel.exception.PortalException,
195 com.liferay.portal.kernel.exception.SystemException {
196 return getService().getWikiPageByUuidAndGroupId(uuid, groupId);
197 }
198
199
211 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getWikiPages(
212 int start, int end)
213 throws com.liferay.portal.kernel.exception.SystemException {
214 return getService().getWikiPages(start, end);
215 }
216
217
223 public static int getWikiPagesCount()
224 throws com.liferay.portal.kernel.exception.SystemException {
225 return getService().getWikiPagesCount();
226 }
227
228
235 public static com.liferay.portlet.wiki.model.WikiPage updateWikiPage(
236 com.liferay.portlet.wiki.model.WikiPage wikiPage)
237 throws com.liferay.portal.kernel.exception.SystemException {
238 return getService().updateWikiPage(wikiPage);
239 }
240
241
249 public static com.liferay.portlet.wiki.model.WikiPage updateWikiPage(
250 com.liferay.portlet.wiki.model.WikiPage wikiPage, boolean merge)
251 throws com.liferay.portal.kernel.exception.SystemException {
252 return getService().updateWikiPage(wikiPage, merge);
253 }
254
255
260 public static java.lang.String getBeanIdentifier() {
261 return getService().getBeanIdentifier();
262 }
263
264
269 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
270 getService().setBeanIdentifier(beanIdentifier);
271 }
272
273 public static com.liferay.portlet.wiki.model.WikiPage addPage(long userId,
274 long nodeId, java.lang.String title, double version,
275 java.lang.String content, java.lang.String summary, boolean minorEdit,
276 java.lang.String format, boolean head, java.lang.String parentTitle,
277 java.lang.String redirectTitle,
278 com.liferay.portal.service.ServiceContext serviceContext)
279 throws com.liferay.portal.kernel.exception.PortalException,
280 com.liferay.portal.kernel.exception.SystemException {
281 return getService()
282 .addPage(userId, nodeId, title, version, content, summary,
283 minorEdit, format, head, parentTitle, redirectTitle, serviceContext);
284 }
285
286 public static com.liferay.portlet.wiki.model.WikiPage addPage(long userId,
287 long nodeId, java.lang.String title, java.lang.String content,
288 java.lang.String summary, boolean minorEdit,
289 com.liferay.portal.service.ServiceContext serviceContext)
290 throws com.liferay.portal.kernel.exception.PortalException,
291 com.liferay.portal.kernel.exception.SystemException {
292 return getService()
293 .addPage(userId, nodeId, title, content, summary, minorEdit,
294 serviceContext);
295 }
296
297 public static void addPageAttachment(long companyId,
298 java.lang.String dirName, java.util.Date modifiedDate,
299 java.lang.String fileName, java.io.InputStream inputStream)
300 throws com.liferay.portal.kernel.exception.PortalException,
301 com.liferay.portal.kernel.exception.SystemException {
302 getService()
303 .addPageAttachment(companyId, dirName, modifiedDate, fileName,
304 inputStream);
305 }
306
307 public static void addPageAttachments(long userId, long nodeId,
308 java.lang.String title,
309 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files)
310 throws com.liferay.portal.kernel.exception.PortalException,
311 com.liferay.portal.kernel.exception.SystemException {
312 getService().addPageAttachments(userId, nodeId, title, files);
313 }
314
315
318 public static void addPageAttachments(long nodeId, java.lang.String title,
319 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files)
320 throws com.liferay.portal.kernel.exception.PortalException,
321 com.liferay.portal.kernel.exception.SystemException {
322 getService().addPageAttachments(nodeId, title, files);
323 }
324
325 public static void addPageResources(long nodeId, java.lang.String title,
326 boolean addCommunityPermissions, boolean addGuestPermissions)
327 throws com.liferay.portal.kernel.exception.PortalException,
328 com.liferay.portal.kernel.exception.SystemException {
329 getService()
330 .addPageResources(nodeId, title, addCommunityPermissions,
331 addGuestPermissions);
332 }
333
334 public static void addPageResources(long nodeId, java.lang.String title,
335 java.lang.String[] communityPermissions,
336 java.lang.String[] guestPermissions)
337 throws com.liferay.portal.kernel.exception.PortalException,
338 com.liferay.portal.kernel.exception.SystemException {
339 getService()
340 .addPageResources(nodeId, title, communityPermissions,
341 guestPermissions);
342 }
343
344 public static void addPageResources(
345 com.liferay.portlet.wiki.model.WikiPage page,
346 boolean addCommunityPermissions, boolean addGuestPermissions)
347 throws com.liferay.portal.kernel.exception.PortalException,
348 com.liferay.portal.kernel.exception.SystemException {
349 getService()
350 .addPageResources(page, addCommunityPermissions, addGuestPermissions);
351 }
352
353 public static void addPageResources(
354 com.liferay.portlet.wiki.model.WikiPage page,
355 java.lang.String[] communityPermissions,
356 java.lang.String[] guestPermissions)
357 throws com.liferay.portal.kernel.exception.PortalException,
358 com.liferay.portal.kernel.exception.SystemException {
359 getService()
360 .addPageResources(page, communityPermissions, guestPermissions);
361 }
362
363 public static void changeParent(long userId, long nodeId,
364 java.lang.String title, java.lang.String newParentTitle,
365 com.liferay.portal.service.ServiceContext serviceContext)
366 throws com.liferay.portal.kernel.exception.PortalException,
367 com.liferay.portal.kernel.exception.SystemException {
368 getService()
369 .changeParent(userId, nodeId, title, newParentTitle, serviceContext);
370 }
371
372 public static void deletePage(long nodeId, java.lang.String title)
373 throws com.liferay.portal.kernel.exception.PortalException,
374 com.liferay.portal.kernel.exception.SystemException {
375 getService().deletePage(nodeId, title);
376 }
377
378 public static void deletePage(long nodeId, java.lang.String title,
379 double version)
380 throws com.liferay.portal.kernel.exception.PortalException,
381 com.liferay.portal.kernel.exception.SystemException {
382 getService().deletePage(nodeId, title, version);
383 }
384
385 public static void deletePage(com.liferay.portlet.wiki.model.WikiPage page)
386 throws com.liferay.portal.kernel.exception.PortalException,
387 com.liferay.portal.kernel.exception.SystemException {
388 getService().deletePage(page);
389 }
390
391 public static void deletePageAttachment(long nodeId,
392 java.lang.String title, java.lang.String fileName)
393 throws com.liferay.portal.kernel.exception.PortalException,
394 com.liferay.portal.kernel.exception.SystemException {
395 getService().deletePageAttachment(nodeId, title, fileName);
396 }
397
398 public static void deletePages(long nodeId)
399 throws com.liferay.portal.kernel.exception.PortalException,
400 com.liferay.portal.kernel.exception.SystemException {
401 getService().deletePages(nodeId);
402 }
403
404 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getChildren(
405 long nodeId, boolean head, java.lang.String parentTitle)
406 throws com.liferay.portal.kernel.exception.SystemException {
407 return getService().getChildren(nodeId, head, parentTitle);
408 }
409
410 public static com.liferay.portlet.wiki.model.WikiPage getDraftPage(
411 long nodeId, java.lang.String title)
412 throws com.liferay.portal.kernel.exception.PortalException,
413 com.liferay.portal.kernel.exception.SystemException {
414 return getService().getDraftPage(nodeId, title);
415 }
416
417 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getIncomingLinks(
418 long nodeId, java.lang.String title)
419 throws com.liferay.portal.kernel.exception.PortalException,
420 com.liferay.portal.kernel.exception.SystemException {
421 return getService().getIncomingLinks(nodeId, title);
422 }
423
424 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNoAssetPages()
425 throws com.liferay.portal.kernel.exception.SystemException {
426 return getService().getNoAssetPages();
427 }
428
429 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getOrphans(
430 long nodeId)
431 throws com.liferay.portal.kernel.exception.PortalException,
432 com.liferay.portal.kernel.exception.SystemException {
433 return getService().getOrphans(nodeId);
434 }
435
436 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getOutgoingLinks(
437 long nodeId, java.lang.String title)
438 throws com.liferay.portal.kernel.exception.PortalException,
439 com.liferay.portal.kernel.exception.SystemException {
440 return getService().getOutgoingLinks(nodeId, title);
441 }
442
443 public static com.liferay.portlet.wiki.model.WikiPage getPage(
444 long resourcePrimKey)
445 throws com.liferay.portal.kernel.exception.PortalException,
446 com.liferay.portal.kernel.exception.SystemException {
447 return getService().getPage(resourcePrimKey);
448 }
449
450 public static com.liferay.portlet.wiki.model.WikiPage getPage(
451 long resourcePrimKey, java.lang.Boolean head)
452 throws com.liferay.portal.kernel.exception.PortalException,
453 com.liferay.portal.kernel.exception.SystemException {
454 return getService().getPage(resourcePrimKey, head);
455 }
456
457 public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
458 java.lang.String title)
459 throws com.liferay.portal.kernel.exception.PortalException,
460 com.liferay.portal.kernel.exception.SystemException {
461 return getService().getPage(nodeId, title);
462 }
463
464 public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
465 java.lang.String title, java.lang.Boolean head)
466 throws com.liferay.portal.kernel.exception.PortalException,
467 com.liferay.portal.kernel.exception.SystemException {
468 return getService().getPage(nodeId, title, head);
469 }
470
471 public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
472 java.lang.String title, double version)
473 throws com.liferay.portal.kernel.exception.PortalException,
474 com.liferay.portal.kernel.exception.SystemException {
475 return getService().getPage(nodeId, title, version);
476 }
477
478 public static com.liferay.portlet.wiki.model.WikiPage getPageByPageId(
479 long pageId)
480 throws com.liferay.portal.kernel.exception.PortalException,
481 com.liferay.portal.kernel.exception.SystemException {
482 return getService().getPageByPageId(pageId);
483 }
484
485 public static com.liferay.portlet.wiki.model.WikiPageDisplay getPageDisplay(
486 long nodeId, java.lang.String title,
487 javax.portlet.PortletURL viewPageURL,
488 javax.portlet.PortletURL editPageURL,
489 java.lang.String attachmentURLPrefix)
490 throws com.liferay.portal.kernel.exception.PortalException,
491 com.liferay.portal.kernel.exception.SystemException {
492 return getService()
493 .getPageDisplay(nodeId, title, viewPageURL, editPageURL,
494 attachmentURLPrefix);
495 }
496
497 public static com.liferay.portlet.wiki.model.WikiPageDisplay getPageDisplay(
498 com.liferay.portlet.wiki.model.WikiPage page,
499 javax.portlet.PortletURL viewPageURL,
500 javax.portlet.PortletURL editPageURL,
501 java.lang.String attachmentURLPrefix)
502 throws com.liferay.portal.kernel.exception.PortalException,
503 com.liferay.portal.kernel.exception.SystemException {
504 return getService()
505 .getPageDisplay(page, viewPageURL, editPageURL,
506 attachmentURLPrefix);
507 }
508
509 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
510 long nodeId, boolean head, int start, int end)
511 throws com.liferay.portal.kernel.exception.SystemException {
512 return getService().getPages(nodeId, head, start, end);
513 }
514
515 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
516 long nodeId, boolean head, int start, int end,
517 com.liferay.portal.kernel.util.OrderByComparator obc)
518 throws com.liferay.portal.kernel.exception.SystemException {
519 return getService().getPages(nodeId, head, start, end, obc);
520 }
521
522 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
523 long nodeId, int start, int end)
524 throws com.liferay.portal.kernel.exception.SystemException {
525 return getService().getPages(nodeId, start, end);
526 }
527
528 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
529 long nodeId, int start, int end,
530 com.liferay.portal.kernel.util.OrderByComparator obc)
531 throws com.liferay.portal.kernel.exception.SystemException {
532 return getService().getPages(nodeId, start, end, obc);
533 }
534
535 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
536 long resourcePrimKey, long nodeId, int status)
537 throws com.liferay.portal.kernel.exception.SystemException {
538 return getService().getPages(resourcePrimKey, nodeId, status);
539 }
540
541 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
542 long userId, long nodeId, int status, int start, int end)
543 throws com.liferay.portal.kernel.exception.SystemException {
544 return getService().getPages(userId, nodeId, status, start, end);
545 }
546
547 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
548 long nodeId, java.lang.String title, boolean head, int start, int end)
549 throws com.liferay.portal.kernel.exception.SystemException {
550 return getService().getPages(nodeId, title, head, start, end);
551 }
552
553 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
554 long nodeId, java.lang.String title, int start, int end)
555 throws com.liferay.portal.kernel.exception.SystemException {
556 return getService().getPages(nodeId, title, start, end);
557 }
558
559 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
560 long nodeId, java.lang.String title, int start, int end,
561 com.liferay.portal.kernel.util.OrderByComparator obc)
562 throws com.liferay.portal.kernel.exception.SystemException {
563 return getService().getPages(nodeId, title, start, end, obc);
564 }
565
566 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
567 java.lang.String format)
568 throws com.liferay.portal.kernel.exception.SystemException {
569 return getService().getPages(format);
570 }
571
572 public static int getPagesCount(long nodeId)
573 throws com.liferay.portal.kernel.exception.SystemException {
574 return getService().getPagesCount(nodeId);
575 }
576
577 public static int getPagesCount(long nodeId, boolean head)
578 throws com.liferay.portal.kernel.exception.SystemException {
579 return getService().getPagesCount(nodeId, head);
580 }
581
582 public static int getPagesCount(long userId, long nodeId, int status)
583 throws com.liferay.portal.kernel.exception.SystemException {
584 return getService().getPagesCount(userId, nodeId, status);
585 }
586
587 public static int getPagesCount(long nodeId, java.lang.String title)
588 throws com.liferay.portal.kernel.exception.SystemException {
589 return getService().getPagesCount(nodeId, title);
590 }
591
592 public static int getPagesCount(long nodeId, java.lang.String title,
593 boolean head)
594 throws com.liferay.portal.kernel.exception.SystemException {
595 return getService().getPagesCount(nodeId, title, head);
596 }
597
598 public static int getPagesCount(java.lang.String format)
599 throws com.liferay.portal.kernel.exception.SystemException {
600 return getService().getPagesCount(format);
601 }
602
603 public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getRecentChanges(
604 long nodeId, int start, int end)
605 throws com.liferay.portal.kernel.exception.SystemException {
606 return getService().getRecentChanges(nodeId, start, end);
607 }
608
609 public static int getRecentChangesCount(long nodeId)
610 throws com.liferay.portal.kernel.exception.SystemException {
611 return getService().getRecentChangesCount(nodeId);
612 }
613
614 public static boolean hasDraftPage(long nodeId, java.lang.String title)
615 throws com.liferay.portal.kernel.exception.SystemException {
616 return getService().hasDraftPage(nodeId, title);
617 }
618
619 public static void movePage(long userId, long nodeId,
620 java.lang.String title, java.lang.String newTitle, boolean strict,
621 com.liferay.portal.service.ServiceContext serviceContext)
622 throws com.liferay.portal.kernel.exception.PortalException,
623 com.liferay.portal.kernel.exception.SystemException {
624 getService()
625 .movePage(userId, nodeId, title, newTitle, strict, serviceContext);
626 }
627
628 public static void movePage(long userId, long nodeId,
629 java.lang.String title, java.lang.String newTitle,
630 com.liferay.portal.service.ServiceContext serviceContext)
631 throws com.liferay.portal.kernel.exception.PortalException,
632 com.liferay.portal.kernel.exception.SystemException {
633 getService().movePage(userId, nodeId, title, newTitle, serviceContext);
634 }
635
636 public static com.liferay.portlet.wiki.model.WikiPage revertPage(
637 long userId, long nodeId, java.lang.String title, double version,
638 com.liferay.portal.service.ServiceContext serviceContext)
639 throws com.liferay.portal.kernel.exception.PortalException,
640 com.liferay.portal.kernel.exception.SystemException {
641 return getService()
642 .revertPage(userId, nodeId, title, version, serviceContext);
643 }
644
645 public static void subscribePage(long userId, long nodeId,
646 java.lang.String title)
647 throws com.liferay.portal.kernel.exception.PortalException,
648 com.liferay.portal.kernel.exception.SystemException {
649 getService().subscribePage(userId, nodeId, title);
650 }
651
652 public static void unsubscribePage(long userId, long nodeId,
653 java.lang.String title)
654 throws com.liferay.portal.kernel.exception.PortalException,
655 com.liferay.portal.kernel.exception.SystemException {
656 getService().unsubscribePage(userId, nodeId, title);
657 }
658
659 public static void updateAsset(long userId,
660 com.liferay.portlet.wiki.model.WikiPage page, long[] assetCategoryIds,
661 java.lang.String[] assetTagNames)
662 throws com.liferay.portal.kernel.exception.PortalException,
663 com.liferay.portal.kernel.exception.SystemException {
664 getService().updateAsset(userId, page, assetCategoryIds, assetTagNames);
665 }
666
667 public static com.liferay.portlet.wiki.model.WikiPage updatePage(
668 long userId, long nodeId, java.lang.String title, double version,
669 java.lang.String content, java.lang.String summary, boolean minorEdit,
670 java.lang.String format, java.lang.String parentTitle,
671 java.lang.String redirectTitle,
672 com.liferay.portal.service.ServiceContext serviceContext)
673 throws com.liferay.portal.kernel.exception.PortalException,
674 com.liferay.portal.kernel.exception.SystemException {
675 return getService()
676 .updatePage(userId, nodeId, title, version, content,
677 summary, minorEdit, format, parentTitle, redirectTitle,
678 serviceContext);
679 }
680
681 public static com.liferay.portlet.wiki.model.WikiPage updateStatus(
682 long userId, long resourcePrimKey, int status,
683 com.liferay.portal.service.ServiceContext serviceContext)
684 throws com.liferay.portal.kernel.exception.PortalException,
685 com.liferay.portal.kernel.exception.SystemException {
686 return getService()
687 .updateStatus(userId, resourcePrimKey, status, serviceContext);
688 }
689
690 public static com.liferay.portlet.wiki.model.WikiPage updateStatus(
691 long userId, com.liferay.portlet.wiki.model.WikiPage page, int status,
692 com.liferay.portal.service.ServiceContext serviceContext)
693 throws com.liferay.portal.kernel.exception.PortalException,
694 com.liferay.portal.kernel.exception.SystemException {
695 return getService().updateStatus(userId, page, status, serviceContext);
696 }
697
698 public static void validateTitle(java.lang.String title)
699 throws com.liferay.portal.kernel.exception.PortalException {
700 getService().validateTitle(title);
701 }
702
703 public static WikiPageLocalService getService() {
704 if (_service == null) {
705 _service = (WikiPageLocalService)PortalBeanLocatorUtil.locate(WikiPageLocalService.class.getName());
706
707 ReferenceRegistry.registerReference(WikiPageLocalServiceUtil.class,
708 "_service");
709 MethodCache.remove(WikiPageLocalService.class);
710 }
711
712 return _service;
713 }
714
715 public void setService(WikiPageLocalService service) {
716 MethodCache.remove(WikiPageLocalService.class);
717
718 _service = service;
719
720 ReferenceRegistry.registerReference(WikiPageLocalServiceUtil.class,
721 "_service");
722 MethodCache.remove(WikiPageLocalService.class);
723 }
724
725 private static WikiPageLocalService _service;
726 }