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="WikiNodeServiceUtil.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 WikiNodeService} 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       WikiNodeService
39   * @generated
40   */
41  public class WikiNodeServiceUtil {
42      public static com.liferay.portlet.wiki.model.WikiNode addNode(
43          java.lang.String name, java.lang.String description,
44          com.liferay.portal.service.ServiceContext serviceContext)
45          throws com.liferay.portal.PortalException,
46              com.liferay.portal.SystemException {
47          return getService().addNode(name, description, serviceContext);
48      }
49  
50      public static void deleteNode(long nodeId)
51          throws com.liferay.portal.PortalException,
52              com.liferay.portal.SystemException {
53          getService().deleteNode(nodeId);
54      }
55  
56      public static com.liferay.portlet.wiki.model.WikiNode getNode(long nodeId)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException {
59          return getService().getNode(nodeId);
60      }
61  
62      public static com.liferay.portlet.wiki.model.WikiNode getNode(
63          long groupId, java.lang.String name)
64          throws com.liferay.portal.PortalException,
65              com.liferay.portal.SystemException {
66          return getService().getNode(groupId, name);
67      }
68  
69      public static void importPages(long nodeId, java.lang.String importer,
70          java.io.File[] files,
71          java.util.Map<java.lang.String, java.lang.String[]> options)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException {
74          getService().importPages(nodeId, importer, files, options);
75      }
76  
77      public static void subscribeNode(long nodeId)
78          throws com.liferay.portal.PortalException,
79              com.liferay.portal.SystemException {
80          getService().subscribeNode(nodeId);
81      }
82  
83      public static void unsubscribeNode(long nodeId)
84          throws com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException {
86          getService().unsubscribeNode(nodeId);
87      }
88  
89      /**
90      * @deprecated
91      */
92      public static com.liferay.portlet.wiki.model.WikiNode updateNode(
93          long nodeId, java.lang.String name, java.lang.String description)
94          throws com.liferay.portal.PortalException,
95              com.liferay.portal.SystemException {
96          return getService().updateNode(nodeId, name, description);
97      }
98  
99      public static com.liferay.portlet.wiki.model.WikiNode updateNode(
100         long nodeId, java.lang.String name, java.lang.String description,
101         com.liferay.portal.service.ServiceContext serviceContext)
102         throws com.liferay.portal.PortalException,
103             com.liferay.portal.SystemException {
104         return getService().updateNode(nodeId, name, description, serviceContext);
105     }
106 
107     public static WikiNodeService getService() {
108         if (_service == null) {
109             _service = (WikiNodeService)PortalBeanLocatorUtil.locate(WikiNodeService.class.getName());
110 
111             ReferenceRegistry.registerReference(WikiNodeServiceUtil.class,
112                 "_service");
113             MethodCache.remove(WikiNodeService.class);
114         }
115 
116         return _service;
117     }
118 
119     public void setService(WikiNodeService service) {
120         MethodCache.remove(WikiNodeService.class);
121 
122         _service = service;
123 
124         ReferenceRegistry.registerReference(WikiNodeServiceUtil.class,
125             "_service");
126         MethodCache.remove(WikiNodeService.class);
127     }
128 
129     private static WikiNodeService _service;
130 }