1   /**
2    * Copyright (c) 2000-2010 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   *
12   *
13   */
14  
15  package com.liferay.portlet.wiki.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="WikiNodeLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link WikiNodeLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       WikiNodeLocalService
39   * @generated
40   */
41  public class WikiNodeLocalServiceUtil {
42      public static com.liferay.portlet.wiki.model.WikiNode addWikiNode(
43          com.liferay.portlet.wiki.model.WikiNode wikiNode)
44          throws com.liferay.portal.SystemException {
45          return getService().addWikiNode(wikiNode);
46      }
47  
48      public static com.liferay.portlet.wiki.model.WikiNode createWikiNode(
49          long nodeId) {
50          return getService().createWikiNode(nodeId);
51      }
52  
53      public static void deleteWikiNode(long nodeId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deleteWikiNode(nodeId);
57      }
58  
59      public static void deleteWikiNode(
60          com.liferay.portlet.wiki.model.WikiNode wikiNode)
61          throws com.liferay.portal.SystemException {
62          getService().deleteWikiNode(wikiNode);
63      }
64  
65      @SuppressWarnings("rawtypes")
66      public static java.util.List dynamicQuery(
67          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68          throws com.liferay.portal.SystemException {
69          return getService().dynamicQuery(dynamicQuery);
70      }
71  
72      @SuppressWarnings("rawtypes")
73      public static java.util.List dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end) throws com.liferay.portal.SystemException {
76          return getService().dynamicQuery(dynamicQuery, start, end);
77      }
78  
79      @SuppressWarnings("rawtypes")
80      public static java.util.List dynamicQuery(
81          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82          int end,
83          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84          throws com.liferay.portal.SystemException {
85          return getService()
86                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87      }
88  
89      public static int dynamicQueryCount(
90          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91          throws com.liferay.portal.SystemException {
92          return getService().dynamicQueryCount(dynamicQuery);
93      }
94  
95      public static com.liferay.portlet.wiki.model.WikiNode getWikiNode(
96          long nodeId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getWikiNode(nodeId);
100     }
101 
102     public static com.liferay.portlet.wiki.model.WikiNode getWikiNodeByUuidAndGroupId(
103         java.lang.String uuid, long groupId)
104         throws com.liferay.portal.PortalException,
105             com.liferay.portal.SystemException {
106         return getService().getWikiNodeByUuidAndGroupId(uuid, groupId);
107     }
108 
109     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> getWikiNodes(
110         int start, int end) throws com.liferay.portal.SystemException {
111         return getService().getWikiNodes(start, end);
112     }
113 
114     public static int getWikiNodesCount()
115         throws com.liferay.portal.SystemException {
116         return getService().getWikiNodesCount();
117     }
118 
119     public static com.liferay.portlet.wiki.model.WikiNode updateWikiNode(
120         com.liferay.portlet.wiki.model.WikiNode wikiNode)
121         throws com.liferay.portal.SystemException {
122         return getService().updateWikiNode(wikiNode);
123     }
124 
125     public static com.liferay.portlet.wiki.model.WikiNode updateWikiNode(
126         com.liferay.portlet.wiki.model.WikiNode wikiNode, boolean merge)
127         throws com.liferay.portal.SystemException {
128         return getService().updateWikiNode(wikiNode, merge);
129     }
130 
131     public static com.liferay.portlet.wiki.model.WikiNode addNode(long userId,
132         java.lang.String name, java.lang.String description,
133         com.liferay.portal.service.ServiceContext serviceContext)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException {
136         return getService().addNode(userId, name, description, serviceContext);
137     }
138 
139     public static com.liferay.portlet.wiki.model.WikiNode addNode(
140         java.lang.String uuid, long userId, java.lang.String name,
141         java.lang.String description,
142         com.liferay.portal.service.ServiceContext serviceContext)
143         throws com.liferay.portal.PortalException,
144             com.liferay.portal.SystemException {
145         return getService()
146                    .addNode(uuid, userId, name, description, serviceContext);
147     }
148 
149     public static void addNodeResources(long nodeId,
150         boolean addCommunityPermissions, boolean addGuestPermissions)
151         throws com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException {
153         getService()
154             .addNodeResources(nodeId, addCommunityPermissions,
155             addGuestPermissions);
156     }
157 
158     public static void addNodeResources(
159         com.liferay.portlet.wiki.model.WikiNode node,
160         boolean addCommunityPermissions, boolean addGuestPermissions)
161         throws com.liferay.portal.PortalException,
162             com.liferay.portal.SystemException {
163         getService()
164             .addNodeResources(node, addCommunityPermissions, addGuestPermissions);
165     }
166 
167     public static void addNodeResources(long nodeId,
168         java.lang.String[] communityPermissions,
169         java.lang.String[] guestPermissions)
170         throws com.liferay.portal.PortalException,
171             com.liferay.portal.SystemException {
172         getService()
173             .addNodeResources(nodeId, communityPermissions, guestPermissions);
174     }
175 
176     public static void addNodeResources(
177         com.liferay.portlet.wiki.model.WikiNode node,
178         java.lang.String[] communityPermissions,
179         java.lang.String[] guestPermissions)
180         throws com.liferay.portal.PortalException,
181             com.liferay.portal.SystemException {
182         getService()
183             .addNodeResources(node, communityPermissions, guestPermissions);
184     }
185 
186     public static void deleteNode(long nodeId)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException {
189         getService().deleteNode(nodeId);
190     }
191 
192     public static void deleteNode(com.liferay.portlet.wiki.model.WikiNode node)
193         throws com.liferay.portal.PortalException,
194             com.liferay.portal.SystemException {
195         getService().deleteNode(node);
196     }
197 
198     public static void deleteNodes(long groupId)
199         throws com.liferay.portal.PortalException,
200             com.liferay.portal.SystemException {
201         getService().deleteNodes(groupId);
202     }
203 
204     public static com.liferay.portlet.wiki.model.WikiNode getNode(long nodeId)
205         throws com.liferay.portal.PortalException,
206             com.liferay.portal.SystemException {
207         return getService().getNode(nodeId);
208     }
209 
210     public static com.liferay.portlet.wiki.model.WikiNode getNode(
211         long groupId, java.lang.String nodeName)
212         throws com.liferay.portal.PortalException,
213             com.liferay.portal.SystemException {
214         return getService().getNode(groupId, nodeName);
215     }
216 
217     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> getNodes(
218         long groupId) throws com.liferay.portal.SystemException {
219         return getService().getNodes(groupId);
220     }
221 
222     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> getNodes(
223         long groupId, int start, int end)
224         throws com.liferay.portal.SystemException {
225         return getService().getNodes(groupId, start, end);
226     }
227 
228     public static int getNodesCount(long groupId)
229         throws com.liferay.portal.SystemException {
230         return getService().getNodesCount(groupId);
231     }
232 
233     public static void importPages(long userId, long nodeId,
234         java.lang.String importer, java.io.File[] files,
235         java.util.Map<java.lang.String, java.lang.String[]> options)
236         throws com.liferay.portal.PortalException,
237             com.liferay.portal.SystemException {
238         getService().importPages(userId, nodeId, importer, files, options);
239     }
240 
241     public static void reIndex(java.lang.String[] ids)
242         throws com.liferay.portal.SystemException {
243         getService().reIndex(ids);
244     }
245 
246     public static com.liferay.portal.kernel.search.Hits search(long companyId,
247         long groupId, long userId, long[] nodeIds, java.lang.String keywords,
248         int start, int end) throws com.liferay.portal.SystemException {
249         return getService()
250                    .search(companyId, groupId, userId, nodeIds, keywords,
251             start, end);
252     }
253 
254     public static void subscribeNode(long userId, long nodeId)
255         throws com.liferay.portal.PortalException,
256             com.liferay.portal.SystemException {
257         getService().subscribeNode(userId, nodeId);
258     }
259 
260     public static void unsubscribeNode(long userId, long nodeId)
261         throws com.liferay.portal.PortalException,
262             com.liferay.portal.SystemException {
263         getService().unsubscribeNode(userId, nodeId);
264     }
265 
266     /**
267     * @deprecated
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 com.liferay.portlet.wiki.model.WikiNode updateNode(
277         long nodeId, java.lang.String name, java.lang.String description,
278         com.liferay.portal.service.ServiceContext serviceContext)
279         throws com.liferay.portal.PortalException,
280             com.liferay.portal.SystemException {
281         return getService().updateNode(nodeId, name, description, serviceContext);
282     }
283 
284     public static WikiNodeLocalService getService() {
285         if (_service == null) {
286             _service = (WikiNodeLocalService)PortalBeanLocatorUtil.locate(WikiNodeLocalService.class.getName());
287 
288             ReferenceRegistry.registerReference(WikiNodeLocalServiceUtil.class,
289                 "_service");
290             MethodCache.remove(WikiNodeLocalService.class);
291         }
292 
293         return _service;
294     }
295 
296     public void setService(WikiNodeLocalService service) {
297         MethodCache.remove(WikiNodeLocalService.class);
298 
299         _service = service;
300 
301         ReferenceRegistry.registerReference(WikiNodeLocalServiceUtil.class,
302             "_service");
303         MethodCache.remove(WikiNodeLocalService.class);
304     }
305 
306     private static WikiNodeLocalService _service;
307 }