1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.wiki.service;
24  
25  
26  /**
27   * <a href="WikiPageLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.wiki.service.WikiPageLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portlet.wiki.service.WikiPageLocalService
45   *
46   */
47  public class WikiPageLocalServiceUtil {
48      public static com.liferay.portlet.wiki.model.WikiPage addWikiPage(
49          com.liferay.portlet.wiki.model.WikiPage wikiPage)
50          throws com.liferay.portal.SystemException {
51          return getService().addWikiPage(wikiPage);
52      }
53  
54      public static com.liferay.portlet.wiki.model.WikiPage createWikiPage(
55          long pageId) {
56          return getService().createWikiPage(pageId);
57      }
58  
59      public static void deleteWikiPage(long pageId)
60          throws com.liferay.portal.PortalException,
61              com.liferay.portal.SystemException {
62          getService().deleteWikiPage(pageId);
63      }
64  
65      public static void deleteWikiPage(
66          com.liferay.portlet.wiki.model.WikiPage wikiPage)
67          throws com.liferay.portal.SystemException {
68          getService().deleteWikiPage(wikiPage);
69      }
70  
71      public static java.util.List<Object> dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
73          throws com.liferay.portal.SystemException {
74          return getService().dynamicQuery(dynamicQuery);
75      }
76  
77      public static java.util.List<Object> dynamicQuery(
78          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
79          int end) throws com.liferay.portal.SystemException {
80          return getService().dynamicQuery(dynamicQuery, start, end);
81      }
82  
83      public static com.liferay.portlet.wiki.model.WikiPage getWikiPage(
84          long pageId)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException {
87          return getService().getWikiPage(pageId);
88      }
89  
90      public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getWikiPages(
91          int start, int end) throws com.liferay.portal.SystemException {
92          return getService().getWikiPages(start, end);
93      }
94  
95      public static int getWikiPagesCount()
96          throws com.liferay.portal.SystemException {
97          return getService().getWikiPagesCount();
98      }
99  
100     public static com.liferay.portlet.wiki.model.WikiPage updateWikiPage(
101         com.liferay.portlet.wiki.model.WikiPage wikiPage)
102         throws com.liferay.portal.SystemException {
103         return getService().updateWikiPage(wikiPage);
104     }
105 
106     public static com.liferay.portlet.wiki.model.WikiPage addPage(long userId,
107         long nodeId, java.lang.String title, java.lang.String content,
108         java.lang.String summary, boolean minorEdit,
109         javax.portlet.PortletPreferences prefs,
110         com.liferay.portal.theme.ThemeDisplay themeDisplay)
111         throws com.liferay.portal.PortalException,
112             com.liferay.portal.SystemException {
113         return getService()
114                    .addPage(userId, nodeId, title, content, summary, minorEdit,
115             prefs, themeDisplay);
116     }
117 
118     public static com.liferay.portlet.wiki.model.WikiPage addPage(
119         java.lang.String uuid, long userId, long nodeId,
120         java.lang.String title, double version, java.lang.String content,
121         java.lang.String summary, boolean minorEdit, java.lang.String format,
122         boolean head, java.lang.String parentTitle,
123         java.lang.String redirectTitle, java.lang.String[] tagsEntries,
124         javax.portlet.PortletPreferences prefs,
125         com.liferay.portal.theme.ThemeDisplay themeDisplay)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException {
128         return getService()
129                    .addPage(uuid, userId, nodeId, title, version, content,
130             summary, minorEdit, format, head, parentTitle, redirectTitle,
131             tagsEntries, prefs, themeDisplay);
132     }
133 
134     public static void addPageAttachments(long nodeId, java.lang.String title,
135         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files)
136         throws com.liferay.portal.PortalException,
137             com.liferay.portal.SystemException {
138         getService().addPageAttachments(nodeId, title, files);
139     }
140 
141     public static void addPageResources(long nodeId, java.lang.String title,
142         boolean addCommunityPermissions, boolean addGuestPermissions)
143         throws com.liferay.portal.PortalException,
144             com.liferay.portal.SystemException {
145         getService()
146             .addPageResources(nodeId, title, addCommunityPermissions,
147             addGuestPermissions);
148     }
149 
150     public static void addPageResources(
151         com.liferay.portlet.wiki.model.WikiNode node,
152         com.liferay.portlet.wiki.model.WikiPage page,
153         boolean addCommunityPermissions, boolean addGuestPermissions)
154         throws com.liferay.portal.PortalException,
155             com.liferay.portal.SystemException {
156         getService()
157             .addPageResources(node, page, addCommunityPermissions,
158             addGuestPermissions);
159     }
160 
161     public static void addPageResources(long nodeId, java.lang.String title,
162         java.lang.String[] communityPermissions,
163         java.lang.String[] guestPermissions)
164         throws com.liferay.portal.PortalException,
165             com.liferay.portal.SystemException {
166         getService()
167             .addPageResources(nodeId, title, communityPermissions,
168             guestPermissions);
169     }
170 
171     public static void addPageResources(
172         com.liferay.portlet.wiki.model.WikiNode node,
173         com.liferay.portlet.wiki.model.WikiPage page,
174         java.lang.String[] communityPermissions,
175         java.lang.String[] guestPermissions)
176         throws com.liferay.portal.PortalException,
177             com.liferay.portal.SystemException {
178         getService()
179             .addPageResources(node, page, communityPermissions, guestPermissions);
180     }
181 
182     public static void changeParent(long userId, long nodeId,
183         java.lang.String title, java.lang.String newParentTitle,
184         javax.portlet.PortletPreferences prefs,
185         com.liferay.portal.theme.ThemeDisplay themeDisplay)
186         throws com.liferay.portal.PortalException,
187             com.liferay.portal.SystemException {
188         getService()
189             .changeParent(userId, nodeId, title, newParentTitle, prefs,
190             themeDisplay);
191     }
192 
193     public static void deletePage(long nodeId, java.lang.String title)
194         throws com.liferay.portal.PortalException,
195             com.liferay.portal.SystemException {
196         getService().deletePage(nodeId, title);
197     }
198 
199     public static void deletePage(com.liferay.portlet.wiki.model.WikiPage page)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException {
202         getService().deletePage(page);
203     }
204 
205     public static void deletePageAttachment(long nodeId,
206         java.lang.String title, java.lang.String fileName)
207         throws com.liferay.portal.PortalException,
208             com.liferay.portal.SystemException {
209         getService().deletePageAttachment(nodeId, title, fileName);
210     }
211 
212     public static void deletePages(long nodeId)
213         throws com.liferay.portal.PortalException,
214             com.liferay.portal.SystemException {
215         getService().deletePages(nodeId);
216     }
217 
218     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getChildren(
219         long nodeId, boolean head, java.lang.String parentTitle)
220         throws com.liferay.portal.SystemException {
221         return getService().getChildren(nodeId, head, parentTitle);
222     }
223 
224     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getIncomingLinks(
225         long nodeId, java.lang.String title)
226         throws com.liferay.portal.PortalException,
227             com.liferay.portal.SystemException {
228         return getService().getIncomingLinks(nodeId, title);
229     }
230 
231     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNoAssetPages()
232         throws com.liferay.portal.SystemException {
233         return getService().getNoAssetPages();
234     }
235 
236     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getOrphans(
237         long nodeId)
238         throws com.liferay.portal.PortalException,
239             com.liferay.portal.SystemException {
240         return getService().getOrphans(nodeId);
241     }
242 
243     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getOutgoingLinks(
244         long nodeId, java.lang.String title)
245         throws com.liferay.portal.PortalException,
246             com.liferay.portal.SystemException {
247         return getService().getOutgoingLinks(nodeId, title);
248     }
249 
250     public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
251         java.lang.String title)
252         throws com.liferay.portal.PortalException,
253             com.liferay.portal.SystemException {
254         return getService().getPage(nodeId, title);
255     }
256 
257     public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
258         java.lang.String title, double version)
259         throws com.liferay.portal.PortalException,
260             com.liferay.portal.SystemException {
261         return getService().getPage(nodeId, title, version);
262     }
263 
264     public static com.liferay.portlet.wiki.model.WikiPageDisplay getPageDisplay(
265         long nodeId, java.lang.String title,
266         javax.portlet.PortletURL viewPageURL,
267         javax.portlet.PortletURL editPageURL,
268         java.lang.String attachmentURLPrefix)
269         throws com.liferay.portal.PortalException,
270             com.liferay.portal.SystemException {
271         return getService()
272                    .getPageDisplay(nodeId, title, viewPageURL, editPageURL,
273             attachmentURLPrefix);
274     }
275 
276     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
277         long nodeId, int start, int end)
278         throws com.liferay.portal.SystemException {
279         return getService().getPages(nodeId, start, end);
280     }
281 
282     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getPages(
283         java.lang.String format) throws com.liferay.portal.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.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.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.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.SystemException {
309         return getService().getPages(nodeId, title, head, start, end);
310     }
311 
312     public static int getPagesCount(long nodeId)
313         throws com.liferay.portal.SystemException {
314         return getService().getPagesCount(nodeId);
315     }
316 
317     public static int getPagesCount(long nodeId, java.lang.String title)
318         throws com.liferay.portal.SystemException {
319         return getService().getPagesCount(nodeId, title);
320     }
321 
322     public static int getPagesCount(long nodeId, boolean head)
323         throws com.liferay.portal.SystemException {
324         return getService().getPagesCount(nodeId, head);
325     }
326 
327     public static int getPagesCount(long nodeId, java.lang.String title,
328         boolean head) throws com.liferay.portal.SystemException {
329         return getService().getPagesCount(nodeId, title, head);
330     }
331 
332     public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getRecentChanges(
333         long nodeId, int start, int end)
334         throws com.liferay.portal.SystemException {
335         return getService().getRecentChanges(nodeId, start, end);
336     }
337 
338     public static int getRecentChangesCount(long nodeId)
339         throws com.liferay.portal.SystemException {
340         return getService().getRecentChangesCount(nodeId);
341     }
342 
343     public static void movePage(long userId, long nodeId,
344         java.lang.String title, java.lang.String newTitle,
345         javax.portlet.PortletPreferences prefs,
346         com.liferay.portal.theme.ThemeDisplay themeDisplay)
347         throws com.liferay.portal.PortalException,
348             com.liferay.portal.SystemException {
349         getService()
350             .movePage(userId, nodeId, title, newTitle, prefs, themeDisplay);
351     }
352 
353     public static void movePage(long userId, long nodeId,
354         java.lang.String title, java.lang.String newTitle, boolean strict,
355         javax.portlet.PortletPreferences prefs,
356         com.liferay.portal.theme.ThemeDisplay themeDisplay)
357         throws com.liferay.portal.PortalException,
358             com.liferay.portal.SystemException {
359         getService()
360             .movePage(userId, nodeId, title, newTitle, strict, prefs,
361             themeDisplay);
362     }
363 
364     public static com.liferay.portlet.wiki.model.WikiPage revertPage(
365         long userId, long nodeId, java.lang.String title, double version,
366         javax.portlet.PortletPreferences prefs,
367         com.liferay.portal.theme.ThemeDisplay themeDisplay)
368         throws com.liferay.portal.PortalException,
369             com.liferay.portal.SystemException {
370         return getService()
371                    .revertPage(userId, nodeId, title, version, prefs,
372             themeDisplay);
373     }
374 
375     public static void subscribePage(long userId, long nodeId,
376         java.lang.String title)
377         throws com.liferay.portal.PortalException,
378             com.liferay.portal.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.PortalException,
385             com.liferay.portal.SystemException {
386         getService().unsubscribePage(userId, nodeId, title);
387     }
388 
389     public static com.liferay.portlet.wiki.model.WikiPage updatePage(
390         long userId, long nodeId, java.lang.String title, double version,
391         java.lang.String content, java.lang.String summary, boolean minorEdit,
392         java.lang.String format, java.lang.String parentTitle,
393         java.lang.String redirectTitle, java.lang.String[] tagsEntries,
394         javax.portlet.PortletPreferences prefs,
395         com.liferay.portal.theme.ThemeDisplay themeDisplay)
396         throws com.liferay.portal.PortalException,
397             com.liferay.portal.SystemException {
398         return getService()
399                    .updatePage(userId, nodeId, title, version, content,
400             summary, minorEdit, format, parentTitle, redirectTitle,
401             tagsEntries, prefs, themeDisplay);
402     }
403 
404     public static void updateTagsAsset(long userId,
405         com.liferay.portlet.wiki.model.WikiPage page,
406         java.lang.String[] tagsEntries)
407         throws com.liferay.portal.PortalException,
408             com.liferay.portal.SystemException {
409         getService().updateTagsAsset(userId, page, tagsEntries);
410     }
411 
412     public static void validateTitle(java.lang.String title)
413         throws com.liferay.portal.PortalException {
414         getService().validateTitle(title);
415     }
416 
417     public static WikiPageLocalService getService() {
418         if (_service == null) {
419             throw new RuntimeException("WikiPageLocalService is not set");
420         }
421 
422         return _service;
423     }
424 
425     public void setService(WikiPageLocalService service) {
426         _service = service;
427     }
428 
429     private static WikiPageLocalService _service;
430 }