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  
19  /**
20   * <a href="WikiNodeServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link WikiNodeService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       WikiNodeService
37   * @generated
38   */
39  public class WikiNodeServiceUtil {
40      public static com.liferay.portlet.wiki.model.WikiNode addNode(long plid,
41          java.lang.String name, java.lang.String description,
42          boolean addCommunityPermissions, boolean addGuestPermissions)
43          throws com.liferay.portal.PortalException,
44              com.liferay.portal.SystemException, java.rmi.RemoteException {
45          return getService()
46                     .addNode(plid, name, description, addCommunityPermissions,
47              addGuestPermissions);
48      }
49  
50      public static com.liferay.portlet.wiki.model.WikiNode addNode(long plid,
51          java.lang.String name, java.lang.String description,
52          java.lang.String[] communityPermissions,
53          java.lang.String[] guestPermissions)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException, java.rmi.RemoteException {
56          return getService()
57                     .addNode(plid, name, description, communityPermissions,
58              guestPermissions);
59      }
60  
61      public static void deleteNode(long nodeId)
62          throws com.liferay.portal.PortalException,
63              com.liferay.portal.SystemException, java.rmi.RemoteException {
64          getService().deleteNode(nodeId);
65      }
66  
67      public static com.liferay.portlet.wiki.model.WikiNode getNode(long nodeId)
68          throws com.liferay.portal.PortalException,
69              com.liferay.portal.SystemException, java.rmi.RemoteException {
70          return getService().getNode(nodeId);
71      }
72  
73      public static com.liferay.portlet.wiki.model.WikiNode getNode(
74          long groupId, java.lang.String name)
75          throws com.liferay.portal.PortalException,
76              com.liferay.portal.SystemException, java.rmi.RemoteException {
77          return getService().getNode(groupId, name);
78      }
79  
80      public static void importPages(long nodeId, java.lang.String importer,
81          java.io.File[] files, java.util.Map<String, String[]> options)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException, java.rmi.RemoteException {
84          getService().importPages(nodeId, importer, files, options);
85      }
86  
87      public static void subscribeNode(long nodeId)
88          throws com.liferay.portal.PortalException,
89              com.liferay.portal.SystemException, java.rmi.RemoteException {
90          getService().subscribeNode(nodeId);
91      }
92  
93      public static void unsubscribeNode(long nodeId)
94          throws com.liferay.portal.PortalException,
95              com.liferay.portal.SystemException, java.rmi.RemoteException {
96          getService().unsubscribeNode(nodeId);
97      }
98  
99      public static com.liferay.portlet.wiki.model.WikiNode updateNode(
100         long nodeId, java.lang.String name, java.lang.String description)
101         throws com.liferay.portal.PortalException,
102             com.liferay.portal.SystemException, java.rmi.RemoteException {
103         return getService().updateNode(nodeId, name, description);
104     }
105 
106     public static WikiNodeService getService() {
107         if (_service == null) {
108             _service = (WikiNodeService)PortalBeanLocatorUtil.locate(WikiNodeService.class.getName());
109         }
110 
111         return _service;
112     }
113 
114     public void setService(WikiNodeService service) {
115         _service = service;
116     }
117 
118     private static WikiNodeService _service;
119 }