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