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