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