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="WikiPageServiceUtil.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.WikiPageService</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.WikiPageService
45   *
46   */
47  public class WikiPageServiceUtil {
48      public static com.liferay.portlet.wiki.model.WikiPage addPage(long nodeId,
49          java.lang.String title, java.lang.String content,
50          java.lang.String summary, boolean minorEdit,
51          javax.portlet.PortletPreferences prefs,
52          com.liferay.portal.theme.ThemeDisplay themeDisplay)
53          throws com.liferay.portal.PortalException,
54              com.liferay.portal.SystemException, java.rmi.RemoteException {
55          return getService()
56                     .addPage(nodeId, title, content, summary, minorEdit, prefs,
57              themeDisplay);
58      }
59  
60      public static void addPageAttachments(long nodeId, java.lang.String title,
61          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files)
62          throws com.liferay.portal.PortalException,
63              com.liferay.portal.SystemException, java.rmi.RemoteException {
64          getService().addPageAttachments(nodeId, title, files);
65      }
66  
67      public static void changeParent(long nodeId, java.lang.String title,
68          java.lang.String newParentTitle,
69          javax.portlet.PortletPreferences prefs,
70          com.liferay.portal.theme.ThemeDisplay themeDisplay)
71          throws com.liferay.portal.PortalException,
72              com.liferay.portal.SystemException, java.rmi.RemoteException {
73          getService()
74              .changeParent(nodeId, title, newParentTitle, prefs, themeDisplay);
75      }
76  
77      public static void deletePage(long nodeId, java.lang.String title)
78          throws com.liferay.portal.PortalException,
79              com.liferay.portal.SystemException, java.rmi.RemoteException {
80          getService().deletePage(nodeId, title);
81      }
82  
83      public static void deletePageAttachment(long nodeId,
84          java.lang.String title, java.lang.String fileName)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException, java.rmi.RemoteException {
87          getService().deletePageAttachment(nodeId, title, fileName);
88      }
89  
90      public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNodePages(
91          long nodeId, int max)
92          throws com.liferay.portal.PortalException,
93              com.liferay.portal.SystemException, java.rmi.RemoteException {
94          return getService().getNodePages(nodeId, max);
95      }
96  
97      public static java.lang.String getNodePagesRSS(long nodeId, int max,
98          java.lang.String type, double version, java.lang.String displayStyle,
99          java.lang.String feedURL, java.lang.String entryURL)
100         throws com.liferay.portal.PortalException,
101             com.liferay.portal.SystemException, java.rmi.RemoteException {
102         return getService()
103                    .getNodePagesRSS(nodeId, max, type, version, displayStyle,
104             feedURL, entryURL);
105     }
106 
107     public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
108         java.lang.String title)
109         throws com.liferay.portal.PortalException,
110             com.liferay.portal.SystemException, java.rmi.RemoteException {
111         return getService().getPage(nodeId, title);
112     }
113 
114     public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
115         java.lang.String title, double version)
116         throws com.liferay.portal.PortalException,
117             com.liferay.portal.SystemException, java.rmi.RemoteException {
118         return getService().getPage(nodeId, title, version);
119     }
120 
121     public static java.lang.String getPagesRSS(long companyId, long nodeId,
122         java.lang.String title, int max, java.lang.String type, double version,
123         java.lang.String displayStyle, java.lang.String feedURL,
124         java.lang.String entryURL, java.util.Locale locale)
125         throws com.liferay.portal.PortalException,
126             com.liferay.portal.SystemException, java.rmi.RemoteException {
127         return getService()
128                    .getPagesRSS(companyId, nodeId, title, max, type, version,
129             displayStyle, feedURL, entryURL, locale);
130     }
131 
132     public static void movePage(long nodeId, java.lang.String title,
133         java.lang.String newTitle, javax.portlet.PortletPreferences prefs,
134         com.liferay.portal.theme.ThemeDisplay themeDisplay)
135         throws com.liferay.portal.PortalException,
136             com.liferay.portal.SystemException, java.rmi.RemoteException {
137         getService().movePage(nodeId, title, newTitle, prefs, themeDisplay);
138     }
139 
140     public static com.liferay.portlet.wiki.model.WikiPage revertPage(
141         long nodeId, java.lang.String title, double version,
142         javax.portlet.PortletPreferences prefs,
143         com.liferay.portal.theme.ThemeDisplay themeDisplay)
144         throws com.liferay.portal.PortalException,
145             com.liferay.portal.SystemException, java.rmi.RemoteException {
146         return getService()
147                    .revertPage(nodeId, title, version, prefs, themeDisplay);
148     }
149 
150     public static void subscribePage(long nodeId, java.lang.String title)
151         throws com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException, java.rmi.RemoteException {
153         getService().subscribePage(nodeId, title);
154     }
155 
156     public static void unsubscribePage(long nodeId, java.lang.String title)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException, java.rmi.RemoteException {
159         getService().unsubscribePage(nodeId, title);
160     }
161 
162     public static com.liferay.portlet.wiki.model.WikiPage updatePage(
163         long nodeId, java.lang.String title, double version,
164         java.lang.String content, java.lang.String summary, boolean minorEdit,
165         java.lang.String format, java.lang.String parentTitle,
166         java.lang.String redirectTitle, java.lang.String[] tagsEntries,
167         javax.portlet.PortletPreferences prefs,
168         com.liferay.portal.theme.ThemeDisplay themeDisplay)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException, java.rmi.RemoteException {
171         return getService()
172                    .updatePage(nodeId, title, version, content, summary,
173             minorEdit, format, parentTitle, redirectTitle, tagsEntries, prefs,
174             themeDisplay);
175     }
176 
177     public static WikiPageService getService() {
178         if (_service == null) {
179             throw new RuntimeException("WikiPageService is not set");
180         }
181 
182         return _service;
183     }
184 
185     public void setService(WikiPageService service) {
186         _service = service;
187     }
188 
189     private static WikiPageService _service;
190 }