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="WikiNodeLocalServiceUtil.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.WikiNodeLocalService</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.WikiNodeLocalService
45   *
46   */
47  public class WikiNodeLocalServiceUtil {
48      public static com.liferay.portlet.wiki.model.WikiNode addWikiNode(
49          com.liferay.portlet.wiki.model.WikiNode wikiNode)
50          throws com.liferay.portal.SystemException {
51          return getService().addWikiNode(wikiNode);
52      }
53  
54      public static com.liferay.portlet.wiki.model.WikiNode createWikiNode(
55          long nodeId) {
56          return getService().createWikiNode(nodeId);
57      }
58  
59      public static void deleteWikiNode(long nodeId)
60          throws com.liferay.portal.PortalException,
61              com.liferay.portal.SystemException {
62          getService().deleteWikiNode(nodeId);
63      }
64  
65      public static void deleteWikiNode(
66          com.liferay.portlet.wiki.model.WikiNode wikiNode)
67          throws com.liferay.portal.SystemException {
68          getService().deleteWikiNode(wikiNode);
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.WikiNode getWikiNode(
84          long nodeId)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException {
87          return getService().getWikiNode(nodeId);
88      }
89  
90      public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> getWikiNodes(
91          int start, int end) throws com.liferay.portal.SystemException {
92          return getService().getWikiNodes(start, end);
93      }
94  
95      public static int getWikiNodesCount()
96          throws com.liferay.portal.SystemException {
97          return getService().getWikiNodesCount();
98      }
99  
100     public static com.liferay.portlet.wiki.model.WikiNode updateWikiNode(
101         com.liferay.portlet.wiki.model.WikiNode wikiNode)
102         throws com.liferay.portal.SystemException {
103         return getService().updateWikiNode(wikiNode);
104     }
105 
106     public static com.liferay.portlet.wiki.model.WikiNode addNode(long userId,
107         long plid, java.lang.String name, java.lang.String description,
108         boolean addCommunityPermissions, boolean addGuestPermissions)
109         throws com.liferay.portal.PortalException,
110             com.liferay.portal.SystemException {
111         return getService()
112                    .addNode(userId, plid, name, description,
113             addCommunityPermissions, addGuestPermissions);
114     }
115 
116     public static com.liferay.portlet.wiki.model.WikiNode addNode(
117         java.lang.String uuid, long userId, long plid, java.lang.String name,
118         java.lang.String description, boolean addCommunityPermissions,
119         boolean addGuestPermissions)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException {
122         return getService()
123                    .addNode(uuid, userId, plid, name, description,
124             addCommunityPermissions, addGuestPermissions);
125     }
126 
127     public static com.liferay.portlet.wiki.model.WikiNode addNode(long userId,
128         long plid, java.lang.String name, java.lang.String description,
129         java.lang.String[] communityPermissions,
130         java.lang.String[] guestPermissions)
131         throws com.liferay.portal.PortalException,
132             com.liferay.portal.SystemException {
133         return getService()
134                    .addNode(userId, plid, name, description,
135             communityPermissions, guestPermissions);
136     }
137 
138     public static com.liferay.portlet.wiki.model.WikiNode addNode(
139         java.lang.String uuid, long userId, long plid, java.lang.String name,
140         java.lang.String description,
141         java.lang.Boolean addCommunityPermissions,
142         java.lang.Boolean addGuestPermissions,
143         java.lang.String[] communityPermissions,
144         java.lang.String[] guestPermissions)
145         throws com.liferay.portal.PortalException,
146             com.liferay.portal.SystemException {
147         return getService()
148                    .addNode(uuid, userId, plid, name, description,
149             addCommunityPermissions, addGuestPermissions, communityPermissions,
150             guestPermissions);
151     }
152 
153     public static void addNodeResources(long nodeId,
154         boolean addCommunityPermissions, boolean addGuestPermissions)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException {
157         getService()
158             .addNodeResources(nodeId, addCommunityPermissions,
159             addGuestPermissions);
160     }
161 
162     public static void addNodeResources(
163         com.liferay.portlet.wiki.model.WikiNode node,
164         boolean addCommunityPermissions, boolean addGuestPermissions)
165         throws com.liferay.portal.PortalException,
166             com.liferay.portal.SystemException {
167         getService()
168             .addNodeResources(node, addCommunityPermissions, addGuestPermissions);
169     }
170 
171     public static void addNodeResources(long nodeId,
172         java.lang.String[] communityPermissions,
173         java.lang.String[] guestPermissions)
174         throws com.liferay.portal.PortalException,
175             com.liferay.portal.SystemException {
176         getService()
177             .addNodeResources(nodeId, communityPermissions, guestPermissions);
178     }
179 
180     public static void addNodeResources(
181         com.liferay.portlet.wiki.model.WikiNode node,
182         java.lang.String[] communityPermissions,
183         java.lang.String[] guestPermissions)
184         throws com.liferay.portal.PortalException,
185             com.liferay.portal.SystemException {
186         getService()
187             .addNodeResources(node, communityPermissions, guestPermissions);
188     }
189 
190     public static void deleteNode(long nodeId)
191         throws com.liferay.portal.PortalException,
192             com.liferay.portal.SystemException {
193         getService().deleteNode(nodeId);
194     }
195 
196     public static void deleteNode(com.liferay.portlet.wiki.model.WikiNode node)
197         throws com.liferay.portal.PortalException,
198             com.liferay.portal.SystemException {
199         getService().deleteNode(node);
200     }
201 
202     public static void deleteNodes(long groupId)
203         throws com.liferay.portal.PortalException,
204             com.liferay.portal.SystemException {
205         getService().deleteNodes(groupId);
206     }
207 
208     public static com.liferay.portlet.wiki.model.WikiNode getNode(long nodeId)
209         throws com.liferay.portal.PortalException,
210             com.liferay.portal.SystemException {
211         return getService().getNode(nodeId);
212     }
213 
214     public static com.liferay.portlet.wiki.model.WikiNode getNode(
215         long groupId, java.lang.String nodeName)
216         throws com.liferay.portal.PortalException,
217             com.liferay.portal.SystemException {
218         return getService().getNode(groupId, nodeName);
219     }
220 
221     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> getNodes(
222         long groupId) throws com.liferay.portal.SystemException {
223         return getService().getNodes(groupId);
224     }
225 
226     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> getNodes(
227         long groupId, int start, int end)
228         throws com.liferay.portal.SystemException {
229         return getService().getNodes(groupId, start, end);
230     }
231 
232     public static int getNodesCount(long groupId)
233         throws com.liferay.portal.SystemException {
234         return getService().getNodesCount(groupId);
235     }
236 
237     public static void importPages(long userId, long nodeId,
238         java.lang.String importer, java.io.File[] files,
239         java.util.Map<String, String[]> options)
240         throws com.liferay.portal.PortalException,
241             com.liferay.portal.SystemException {
242         getService().importPages(userId, nodeId, importer, files, options);
243     }
244 
245     public static void reIndex(java.lang.String[] ids)
246         throws com.liferay.portal.SystemException {
247         getService().reIndex(ids);
248     }
249 
250     public static com.liferay.portal.kernel.search.Hits search(long companyId,
251         long groupId, long[] nodeIds, java.lang.String keywords, int start,
252         int end) throws com.liferay.portal.SystemException {
253         return getService()
254                    .search(companyId, groupId, nodeIds, keywords, start, end);
255     }
256 
257     public static void subscribeNode(long userId, long nodeId)
258         throws com.liferay.portal.PortalException,
259             com.liferay.portal.SystemException {
260         getService().subscribeNode(userId, nodeId);
261     }
262 
263     public static void unsubscribeNode(long userId, long nodeId)
264         throws com.liferay.portal.PortalException,
265             com.liferay.portal.SystemException {
266         getService().unsubscribeNode(userId, nodeId);
267     }
268 
269     public static com.liferay.portlet.wiki.model.WikiNode updateNode(
270         long nodeId, java.lang.String name, java.lang.String description)
271         throws com.liferay.portal.PortalException,
272             com.liferay.portal.SystemException {
273         return getService().updateNode(nodeId, name, description);
274     }
275 
276     public static WikiNodeLocalService getService() {
277         if (_service == null) {
278             throw new RuntimeException("WikiNodeLocalService is not set");
279         }
280 
281         return _service;
282     }
283 
284     public void setService(WikiNodeLocalService service) {
285         _service = service;
286     }
287 
288     private static WikiNodeLocalService _service;
289 }