1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.wiki.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="WikiPageLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link WikiPageLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       WikiPageLocalService
37   * @generated
38   */
39  public class WikiPageLocalServiceUtil {
40      public static com.liferay.portlet.wiki.model.WikiPage addWikiPage(
41          com.liferay.portlet.wiki.model.WikiPage wikiPage)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addWikiPage(wikiPage);
44      }
45  
46      public static com.liferay.portlet.wiki.model.WikiPage createWikiPage(
47          long pageId) {
48          return getService().createWikiPage(pageId);
49      }
50  
51      public static void deleteWikiPage(long pageId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteWikiPage(pageId);
55      }
56  
57      public static void deleteWikiPage(
58          com.liferay.portlet.wiki.model.WikiPage wikiPage)
59          throws com.liferay.portal.kernel.exception.SystemException {
60          getService().deleteWikiPage(wikiPage);
61      }
62  
63      public static java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.kernel.exception.SystemException {
66          return getService().dynamicQuery(dynamicQuery);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.kernel.exception.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      public static com.liferay.portlet.wiki.model.WikiPage getWikiPage(
76          long pageId)
77          throws com.liferay.portal.kernel.exception.PortalException,
78              com.liferay.portal.kernel.exception.SystemException {
79          return getService().getWikiPage(pageId);
80      }
81  
82      public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getWikiPages(
83          int start, int end)
84          throws com.liferay.portal.kernel.exception.SystemException {
85          return getService().getWikiPages(start, end);
86      }
87  
88      public static int getWikiPagesCount()
89          throws com.liferay.portal.kernel.exception.SystemException {
90          return getService().getWikiPagesCount();
91      }
92  
93      public static com.liferay.portlet.wiki.model.WikiPage updateWikiPage(
94          com.liferay.portlet.wiki.model.WikiPage wikiPage)
95          throws com.liferay.portal.kernel.exception.SystemException {
96          return getService().updateWikiPage(wikiPage);
97      }
98  
99      public static com.liferay.portlet.wiki.model.WikiPage updateWikiPage(
100         com.liferay.portlet.wiki.model.WikiPage wikiPage, boolean merge)
101         throws com.liferay.portal.kernel.exception.SystemException {
102         return getService().updateWikiPage(wikiPage, merge);
103     }
104 
105     public static com.liferay.portlet.wiki.model.WikiPage addPage(long userId,
106         long nodeId, java.lang.String title, java.lang.String content,
107         java.lang.String summary, boolean minorEdit,
108         com.liferay.portal.service.ServiceContext serviceContext)
109         throws com.liferay.portal.kernel.exception.PortalException,
110             com.liferay.portal.kernel.exception.SystemException {
111         return getService()
112                    .addPage(userId, nodeId, title, content, summary, minorEdit,
113             serviceContext);
114     }
115 
116     public static com.liferay.portlet.wiki.model.WikiPage addPage(
117         java.lang.String uuid, long userId, long nodeId,
118         java.lang.String title, double version, java.lang.String content,
119         java.lang.String summary, boolean minorEdit, java.lang.String format,
120         boolean head, java.lang.String parentTitle,
121         java.lang.String redirectTitle,
122         com.liferay.portal.service.ServiceContext serviceContext)
123         throws com.liferay.portal.kernel.exception.PortalException,
124             com.liferay.portal.kernel.exception.SystemException {
125         return getService()
126                    .addPage(uuid, userId, nodeId, title, version, content,
127             summary, minorEdit, format, head, parentTitle, redirectTitle,
128             serviceContext);
129     }
130 
131     public static void addPageAttachments(long nodeId, java.lang.String title,
132         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files)
133         throws com.liferay.portal.kernel.exception.PortalException,
134             com.liferay.portal.kernel.exception.SystemException {
135         getService().addPageAttachments(nodeId, title, files);
136     }
137 
138     public static void addPageResources(long nodeId, java.lang.String title,
139         boolean addCommunityPermissions, boolean addGuestPermissions)
140         throws com.liferay.portal.kernel.exception.PortalException,
141             com.liferay.portal.kernel.exception.SystemException {
142         getService()
143             .addPageResources(nodeId, title, addCommunityPermissions,
144             addGuestPermissions);
145     }
146 
147     public static void addPageResources(
148         com.liferay.portlet.wiki.model.WikiPage page,
149         boolean addCommunityPermissions, boolean addGuestPermissions)
150         throws com.liferay.portal.kernel.exception.PortalException,
151             com.liferay.portal.kernel.exception.SystemException {
152         getService()
153             .addPageResources(page, addCommunityPermissions, addGuestPermissions);
154     }
155 
156     public static void addPageResources(long nodeId, java.lang.String title,
157         java.lang.String[] communityPermissions,
158         java.lang.String[] guestPermissions)
159         throws com.liferay.portal.kernel.exception.PortalException,
160             com.liferay.portal.kernel.exception.SystemException {
161         getService()
162             .addPageResources(nodeId, title, communityPermissions,
163             guestPermissions);
164     }
165 
166     public static void addPageResources(
167         com.liferay.portlet.wiki.model.WikiPage page,
168         java.lang.String[] communityPermissions,
169         java.lang.String[] guestPermissions)
170         throws com.liferay.portal.kernel.exception.PortalException,
171             com.liferay.portal.kernel.exception.SystemException {
172         getService()
173             .addPageResources(page, communityPermissions, guestPermissions);
174     }
175 
176     public static void changeParent(long userId, long nodeId,
177         java.lang.String title, java.lang.String newParentTitle,
178         com.liferay.portal.service.ServiceContext serviceContext)
179         throws com.liferay.portal.kernel.exception.PortalException,
180             com.liferay.portal.kernel.exception.SystemException {
181         getService()
182             .changeParent(userId, nodeId, title, newParentTitle, serviceContext);
183     }
184 
185     public static void deletePage(long nodeId, java.lang.String title)
186         throws com.liferay.portal.kernel.exception.PortalException,
187             com.liferay.portal.kernel.exception.SystemException {
188         getService().deletePage(nodeId, title);
189     }
190 
191     public static void deletePage(com.liferay.portlet.wiki.model.WikiPage page)
192         throws com.liferay.portal.kernel.exception.PortalException,
193             com.liferay.portal.kernel.exception.SystemException {
194         getService().deletePage(page);
195     }
196 
197     public static void deletePageAttachment(long nodeId,
198         java.lang.String title, java.lang.String fileName)
199         throws com.liferay.portal.kernel.exception.PortalException,
200             com.liferay.portal.kernel.exception.SystemException {
201         getService().deletePageAttachment(nodeId, title, fileName);
202     }
203 
204     public static void deletePages(long nodeId)
205         throws com.liferay.portal.kernel.exception.PortalException,
206             com.liferay.portal.kernel.exception.SystemException {
207         getService().deletePages(nodeId);
208     }
209 
210     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getChildren(
211         long nodeId, boolean head, java.lang.String parentTitle)
212         throws com.liferay.portal.kernel.exception.SystemException {
213         return getService().getChildren(nodeId, head, parentTitle);
214     }
215 
216     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getIncomingLinks(
217         long nodeId, java.lang.String title)
218         throws com.liferay.portal.kernel.exception.PortalException,
219             com.liferay.portal.kernel.exception.SystemException {
220         return getService().getIncomingLinks(nodeId, title);
221     }
222 
223     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNoAssetPages()
224         throws com.liferay.portal.kernel.exception.SystemException {
225         return getService().getNoAssetPages();
226     }
227 
228     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getOrphans(
229         long nodeId)
230         throws com.liferay.portal.kernel.exception.PortalException,
231             com.liferay.portal.kernel.exception.SystemException {
232         return getService().getOrphans(nodeId);
233     }
234 
235     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getOutgoingLinks(
236         long nodeId, java.lang.String title)
237         throws com.liferay.portal.kernel.exception.PortalException,
238             com.liferay.portal.kernel.exception.SystemException {
239         return getService().getOutgoingLinks(nodeId, title);
240     }
241 
242     public static com.liferay.portlet.wiki.model.WikiPage getPage(
243         long resourcePrimKey)
244         throws com.liferay.portal.kernel.exception.PortalException,
245             com.liferay.portal.kernel.exception.SystemException {
246         return getService().getPage(resourcePrimKey);
247     }
248 
249     public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
250         java.lang.String title)
251         throws com.liferay.portal.kernel.exception.PortalException,
252             com.liferay.portal.kernel.exception.SystemException {
253         return getService().getPage(nodeId, title);
254     }
255 
256     public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
257         java.lang.String title, double version)
258         throws com.liferay.portal.kernel.exception.PortalException,
259             com.liferay.portal.kernel.exception.SystemException {
260         return getService().getPage(nodeId, title, version);
261     }
262 
263     public static com.liferay.portlet.wiki.model.WikiPageDisplay getPageDisplay(
264         long nodeId, java.lang.String title,
265         javax.portlet.PortletURL viewPageURL,
266         javax.portlet.PortletURL editPageURL,
267         java.lang.String attachmentURLPrefix)
268         throws com.liferay.portal.kernel.exception.PortalException,
269             com.liferay.portal.kernel.exception.SystemException {
270         return getService()
271                    .getPageDisplay(nodeId, title, viewPageURL, editPageURL,
272             attachmentURLPrefix);
273     }
274 
275     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
276         long nodeId, int start, int end)
277         throws com.liferay.portal.kernel.exception.SystemException {
278         return getService().getPages(nodeId, start, end);
279     }
280 
281     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
282         java.lang.String format)
283         throws com.liferay.portal.kernel.exception.SystemException {
284         return getService().getPages(format);
285     }
286 
287     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
288         long nodeId, java.lang.String title, int start, int end)
289         throws com.liferay.portal.kernel.exception.SystemException {
290         return getService().getPages(nodeId, title, start, end);
291     }
292 
293     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
294         long nodeId, java.lang.String title, int start, int end,
295         com.liferay.portal.kernel.util.OrderByComparator obc)
296         throws com.liferay.portal.kernel.exception.SystemException {
297         return getService().getPages(nodeId, title, start, end, obc);
298     }
299 
300     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
301         long nodeId, boolean head, int start, int end)
302         throws com.liferay.portal.kernel.exception.SystemException {
303         return getService().getPages(nodeId, head, start, end);
304     }
305 
306     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
307         long nodeId, java.lang.String title, boolean head, int start, int end)
308         throws com.liferay.portal.kernel.exception.SystemException {
309         return getService().getPages(nodeId, title, head, start, end);
310     }
311 
312     public static int getPagesCount(long nodeId)
313         throws com.liferay.portal.kernel.exception.SystemException {
314         return getService().getPagesCount(nodeId);
315     }
316 
317     public static int getPagesCount(long nodeId, java.lang.String title)
318         throws com.liferay.portal.kernel.exception.SystemException {
319         return getService().getPagesCount(nodeId, title);
320     }
321 
322     public static int getPagesCount(long nodeId, boolean head)
323         throws com.liferay.portal.kernel.exception.SystemException {
324         return getService().getPagesCount(nodeId, head);
325     }
326 
327     public static int getPagesCount(long nodeId, java.lang.String title,
328         boolean head)
329         throws com.liferay.portal.kernel.exception.SystemException {
330         return getService().getPagesCount(nodeId, title, head);
331     }
332 
333     public static int getPagesCount(java.lang.String format)
334         throws com.liferay.portal.kernel.exception.SystemException {
335         return getService().getPagesCount(format);
336     }
337 
338     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getRecentChanges(
339         long nodeId, int start, int end)
340         throws com.liferay.portal.kernel.exception.SystemException {
341         return getService().getRecentChanges(nodeId, start, end);
342     }
343 
344     public static int getRecentChangesCount(long nodeId)
345         throws com.liferay.portal.kernel.exception.SystemException {
346         return getService().getRecentChangesCount(nodeId);
347     }
348 
349     public static void movePage(long userId, long nodeId,
350         java.lang.String title, java.lang.String newTitle,
351         com.liferay.portal.service.ServiceContext serviceContext)
352         throws com.liferay.portal.kernel.exception.PortalException,
353             com.liferay.portal.kernel.exception.SystemException {
354         getService().movePage(userId, nodeId, title, newTitle, serviceContext);
355     }
356 
357     public static void movePage(long userId, long nodeId,
358         java.lang.String title, java.lang.String newTitle, boolean strict,
359         com.liferay.portal.service.ServiceContext serviceContext)
360         throws com.liferay.portal.kernel.exception.PortalException,
361             com.liferay.portal.kernel.exception.SystemException {
362         getService()
363             .movePage(userId, nodeId, title, newTitle, strict, serviceContext);
364     }
365 
366     public static com.liferay.portlet.wiki.model.WikiPage revertPage(
367         long userId, long nodeId, java.lang.String title, double version,
368         com.liferay.portal.service.ServiceContext serviceContext)
369         throws com.liferay.portal.kernel.exception.PortalException,
370             com.liferay.portal.kernel.exception.SystemException {
371         return getService()
372                    .revertPage(userId, nodeId, title, version, serviceContext);
373     }
374 
375     public static void subscribePage(long userId, long nodeId,
376         java.lang.String title)
377         throws com.liferay.portal.kernel.exception.PortalException,
378             com.liferay.portal.kernel.exception.SystemException {
379         getService().subscribePage(userId, nodeId, title);
380     }
381 
382     public static void unsubscribePage(long userId, long nodeId,
383         java.lang.String title)
384         throws com.liferay.portal.kernel.exception.PortalException,
385             com.liferay.portal.kernel.exception.SystemException {
386         getService().unsubscribePage(userId, nodeId, title);
387     }
388 
389     public static void updateAsset(long userId,
390         com.liferay.portlet.wiki.model.WikiPage page, long[] assetCategoryIds,
391         java.lang.String[] assetTagNames)
392         throws com.liferay.portal.kernel.exception.PortalException,
393             com.liferay.portal.kernel.exception.SystemException {
394         getService().updateAsset(userId, page, assetCategoryIds, assetTagNames);
395     }
396 
397     public static com.liferay.portlet.wiki.model.WikiPage updatePage(
398         long userId, long nodeId, java.lang.String title, double version,
399         java.lang.String content, java.lang.String summary, boolean minorEdit,
400         java.lang.String format, java.lang.String parentTitle,
401         java.lang.String redirectTitle,
402         com.liferay.portal.service.ServiceContext serviceContext)
403         throws com.liferay.portal.kernel.exception.PortalException,
404             com.liferay.portal.kernel.exception.SystemException {
405         return getService()
406                    .updatePage(userId, nodeId, title, version, content,
407             summary, minorEdit, format, parentTitle, redirectTitle,
408             serviceContext);
409     }
410 
411     public static com.liferay.portlet.wiki.model.WikiPage updateStatus(
412         long userId, long resourcePrimKey, int status)
413         throws com.liferay.portal.kernel.exception.PortalException,
414             com.liferay.portal.kernel.exception.SystemException {
415         return getService().updateStatus(userId, resourcePrimKey, status);
416     }
417 
418     public static com.liferay.portlet.wiki.model.WikiPage updateStatus(
419         long userId, com.liferay.portlet.wiki.model.WikiPage page, int status)
420         throws com.liferay.portal.kernel.exception.PortalException,
421             com.liferay.portal.kernel.exception.SystemException {
422         return getService().updateStatus(userId, page, status);
423     }
424 
425     public static void validateTitle(java.lang.String title)
426         throws com.liferay.portal.kernel.exception.PortalException {
427         getService().validateTitle(title);
428     }
429 
430     public static WikiPageLocalService getService() {
431         if (_service == null) {
432             _service = (WikiPageLocalService)PortalBeanLocatorUtil.locate(WikiPageLocalService.class.getName());
433         }
434 
435         return _service;
436     }
437 
438     public void setService(WikiPageLocalService service) {
439         _service = service;
440     }
441 
442     private static WikiPageLocalService _service;
443 }