1   /**
2    * Copyright (c) 2000-2007 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   * <a href="WikiPageLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portlet.wiki.service.WikiPageLocalService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portlet.wiki.service.WikiPageLocalServiceFactory</code> is
42   * responsible for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portlet.wiki.service.WikiPageLocalService
48   * @see com.liferay.portlet.wiki.service.WikiPageLocalServiceFactory
49   *
50   */
51  public class WikiPageLocalServiceUtil {
52      public static com.liferay.portlet.wiki.model.WikiPage addWikiPage(
53          com.liferay.portlet.wiki.model.WikiPage model)
54          throws com.liferay.portal.SystemException {
55          WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
56  
57          return wikiPageLocalService.addWikiPage(model);
58      }
59  
60      public static java.util.List dynamicQuery(
61          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
62          throws com.liferay.portal.SystemException {
63          WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
64  
65          return wikiPageLocalService.dynamicQuery(queryInitializer);
66      }
67  
68      public static java.util.List dynamicQuery(
69          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
70          int begin, int end) throws com.liferay.portal.SystemException {
71          WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
72  
73          return wikiPageLocalService.dynamicQuery(queryInitializer, begin, end);
74      }
75  
76      public static com.liferay.portlet.wiki.model.WikiPage updateWikiPage(
77          com.liferay.portlet.wiki.model.WikiPage model)
78          throws com.liferay.portal.SystemException {
79          WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
80  
81          return wikiPageLocalService.updateWikiPage(model);
82      }
83  
84      public static com.liferay.portlet.wiki.model.WikiPage addPage(long userId,
85          long nodeId, java.lang.String title)
86          throws com.liferay.portal.PortalException, 
87              com.liferay.portal.SystemException {
88          WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
89  
90          return wikiPageLocalService.addPage(userId, nodeId, title);
91      }
92  
93      public static void addPageResources(long nodeId, java.lang.String title,
94          boolean addCommunityPermissions, boolean addGuestPermissions)
95          throws com.liferay.portal.PortalException, 
96              com.liferay.portal.SystemException {
97          WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
98          wikiPageLocalService.addPageResources(nodeId, title,
99              addCommunityPermissions, addGuestPermissions);
100     }
101 
102     public static void addPageResources(
103         com.liferay.portlet.wiki.model.WikiNode node,
104         com.liferay.portlet.wiki.model.WikiPage page,
105         boolean addCommunityPermissions, boolean addGuestPermissions)
106         throws com.liferay.portal.PortalException, 
107             com.liferay.portal.SystemException {
108         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
109         wikiPageLocalService.addPageResources(node, page,
110             addCommunityPermissions, addGuestPermissions);
111     }
112 
113     public static void addPageResources(long nodeId, java.lang.String title,
114         java.lang.String[] communityPermissions,
115         java.lang.String[] guestPermissions)
116         throws com.liferay.portal.PortalException, 
117             com.liferay.portal.SystemException {
118         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
119         wikiPageLocalService.addPageResources(nodeId, title,
120             communityPermissions, guestPermissions);
121     }
122 
123     public static void addPageResources(
124         com.liferay.portlet.wiki.model.WikiNode node,
125         com.liferay.portlet.wiki.model.WikiPage page,
126         java.lang.String[] communityPermissions,
127         java.lang.String[] guestPermissions)
128         throws com.liferay.portal.PortalException, 
129             com.liferay.portal.SystemException {
130         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
131         wikiPageLocalService.addPageResources(node, page, communityPermissions,
132             guestPermissions);
133     }
134 
135     public static void deletePage(long nodeId, java.lang.String title)
136         throws com.liferay.portal.PortalException, 
137             com.liferay.portal.SystemException {
138         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
139         wikiPageLocalService.deletePage(nodeId, title);
140     }
141 
142     public static void deletePage(com.liferay.portlet.wiki.model.WikiPage page)
143         throws com.liferay.portal.PortalException, 
144             com.liferay.portal.SystemException {
145         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
146         wikiPageLocalService.deletePage(page);
147     }
148 
149     public static void deletePages(long nodeId)
150         throws com.liferay.portal.PortalException, 
151             com.liferay.portal.SystemException {
152         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
153         wikiPageLocalService.deletePages(nodeId);
154     }
155 
156     public static java.util.List getLinks(long nodeId, java.lang.String title)
157         throws com.liferay.portal.SystemException {
158         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
159 
160         return wikiPageLocalService.getLinks(nodeId, title);
161     }
162 
163     public static java.util.List getOrphans(long nodeId)
164         throws com.liferay.portal.SystemException {
165         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
166 
167         return wikiPageLocalService.getOrphans(nodeId);
168     }
169 
170     public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
171         java.lang.String title)
172         throws com.liferay.portal.PortalException, 
173             com.liferay.portal.SystemException {
174         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
175 
176         return wikiPageLocalService.getPage(nodeId, title);
177     }
178 
179     public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
180         java.lang.String title, double version)
181         throws com.liferay.portal.PortalException, 
182             com.liferay.portal.SystemException {
183         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
184 
185         return wikiPageLocalService.getPage(nodeId, title, version);
186     }
187 
188     public static java.util.List getPages(long nodeId, int begin, int end)
189         throws com.liferay.portal.SystemException {
190         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
191 
192         return wikiPageLocalService.getPages(nodeId, begin, end);
193     }
194 
195     public static java.util.List getPages(long nodeId, java.lang.String title,
196         int begin, int end) throws com.liferay.portal.SystemException {
197         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
198 
199         return wikiPageLocalService.getPages(nodeId, title, begin, end);
200     }
201 
202     public static java.util.List getPages(long nodeId, boolean head, int begin,
203         int end) throws com.liferay.portal.SystemException {
204         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
205 
206         return wikiPageLocalService.getPages(nodeId, head, begin, end);
207     }
208 
209     public static java.util.List getPages(long nodeId, java.lang.String title,
210         boolean head, int begin, int end)
211         throws com.liferay.portal.SystemException {
212         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
213 
214         return wikiPageLocalService.getPages(nodeId, title, head, begin, end);
215     }
216 
217     public static int getPagesCount(long nodeId)
218         throws com.liferay.portal.SystemException {
219         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
220 
221         return wikiPageLocalService.getPagesCount(nodeId);
222     }
223 
224     public static int getPagesCount(long nodeId, java.lang.String title)
225         throws com.liferay.portal.SystemException {
226         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
227 
228         return wikiPageLocalService.getPagesCount(nodeId, title);
229     }
230 
231     public static int getPagesCount(long nodeId, boolean head)
232         throws com.liferay.portal.SystemException {
233         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
234 
235         return wikiPageLocalService.getPagesCount(nodeId, head);
236     }
237 
238     public static int getPagesCount(long nodeId, java.lang.String title,
239         boolean head) throws com.liferay.portal.SystemException {
240         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
241 
242         return wikiPageLocalService.getPagesCount(nodeId, title, head);
243     }
244 
245     public static java.util.List getRecentChanges(long nodeId, int begin,
246         int end) throws com.liferay.portal.SystemException {
247         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
248 
249         return wikiPageLocalService.getRecentChanges(nodeId, begin, end);
250     }
251 
252     public static int getRecentChangesCount(long nodeId)
253         throws com.liferay.portal.SystemException {
254         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
255 
256         return wikiPageLocalService.getRecentChangesCount(nodeId);
257     }
258 
259     public static com.liferay.portlet.wiki.model.WikiPage revertPage(
260         long userId, long nodeId, java.lang.String title, double version)
261         throws com.liferay.portal.PortalException, 
262             com.liferay.portal.SystemException {
263         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
264 
265         return wikiPageLocalService.revertPage(userId, nodeId, title, version);
266     }
267 
268     public static com.liferay.portlet.wiki.model.WikiPage updatePage(
269         long userId, long nodeId, java.lang.String title,
270         java.lang.String content, java.lang.String format,
271         java.lang.String[] tagsEntries)
272         throws com.liferay.portal.PortalException, 
273             com.liferay.portal.SystemException {
274         WikiPageLocalService wikiPageLocalService = WikiPageLocalServiceFactory.getService();
275 
276         return wikiPageLocalService.updatePage(userId, nodeId, title, content,
277             format, tagsEntries);
278     }
279 }