1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.wiki.service;
21  
22  
23  /**
24   * <a href="WikiPageServiceUtil.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides static methods for the
33   * <code>com.liferay.portlet.wiki.service.WikiPageService</code>
34   * bean. The static methods of this class calls the same methods of the bean
35   * instance. It's convenient to be able to just write one line to call a method
36   * on a bean instead of writing a lookup call and a method call.
37   * </p>
38   *
39   * @author Brian Wing Shun Chan
40   *
41   * @see com.liferay.portlet.wiki.service.WikiPageService
42   *
43   */
44  public class WikiPageServiceUtil {
45      public static com.liferay.portlet.wiki.model.WikiPage addPage(long nodeId,
46          java.lang.String title, java.lang.String content,
47          java.lang.String summary, boolean minorEdit,
48          com.liferay.portal.service.ServiceContext serviceContext)
49          throws com.liferay.portal.PortalException,
50              com.liferay.portal.SystemException {
51          return getService()
52                     .addPage(nodeId, title, content, summary, minorEdit,
53              serviceContext);
54      }
55  
56      public static com.liferay.portlet.wiki.model.WikiPage addPage(long nodeId,
57          java.lang.String title, java.lang.String content,
58          java.lang.String summary, boolean minorEdit, java.lang.String format,
59          java.lang.String parentTitle, java.lang.String redirectTitle,
60          com.liferay.portal.service.ServiceContext serviceContext)
61          throws com.liferay.portal.PortalException,
62              com.liferay.portal.SystemException {
63          return getService()
64                     .addPage(nodeId, title, content, summary, minorEdit, format,
65              parentTitle, redirectTitle, serviceContext);
66      }
67  
68      public static void addPageAttachments(long nodeId, java.lang.String title,
69          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files)
70          throws com.liferay.portal.PortalException,
71              com.liferay.portal.SystemException {
72          getService().addPageAttachments(nodeId, title, files);
73      }
74  
75      public static void changeParent(long nodeId, java.lang.String title,
76          java.lang.String newParentTitle,
77          com.liferay.portal.service.ServiceContext serviceContext)
78          throws com.liferay.portal.PortalException,
79              com.liferay.portal.SystemException {
80          getService().changeParent(nodeId, title, newParentTitle, serviceContext);
81      }
82  
83      public static void deletePage(long nodeId, java.lang.String title)
84          throws com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException {
86          getService().deletePage(nodeId, title);
87      }
88  
89      public static void deletePageAttachment(long nodeId,
90          java.lang.String title, java.lang.String fileName)
91          throws com.liferay.portal.PortalException,
92              com.liferay.portal.SystemException {
93          getService().deletePageAttachment(nodeId, title, fileName);
94      }
95  
96      public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNodePages(
97          long nodeId, int max)
98          throws com.liferay.portal.PortalException,
99              com.liferay.portal.SystemException {
100         return getService().getNodePages(nodeId, max);
101     }
102 
103     public static java.lang.String getNodePagesRSS(long nodeId, int max,
104         java.lang.String type, double version, java.lang.String displayStyle,
105         java.lang.String feedURL, java.lang.String entryURL)
106         throws com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException {
108         return getService()
109                    .getNodePagesRSS(nodeId, max, type, version, displayStyle,
110             feedURL, entryURL);
111     }
112 
113     public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
114         java.lang.String title)
115         throws com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException {
117         return getService().getPage(nodeId, title);
118     }
119 
120     public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
121         java.lang.String title, double version)
122         throws com.liferay.portal.PortalException,
123             com.liferay.portal.SystemException {
124         return getService().getPage(nodeId, title, version);
125     }
126 
127     public static java.lang.String getPagesRSS(long companyId, long nodeId,
128         java.lang.String title, int max, java.lang.String type, double version,
129         java.lang.String displayStyle, java.lang.String feedURL,
130         java.lang.String entryURL, java.util.Locale locale)
131         throws com.liferay.portal.PortalException,
132             com.liferay.portal.SystemException {
133         return getService()
134                    .getPagesRSS(companyId, nodeId, title, max, type, version,
135             displayStyle, feedURL, entryURL, locale);
136     }
137 
138     public static void movePage(long nodeId, java.lang.String title,
139         java.lang.String newTitle,
140         com.liferay.portal.service.ServiceContext serviceContext)
141         throws com.liferay.portal.PortalException,
142             com.liferay.portal.SystemException {
143         getService().movePage(nodeId, title, newTitle, serviceContext);
144     }
145 
146     public static com.liferay.portlet.wiki.model.WikiPage revertPage(
147         long nodeId, java.lang.String title, double version,
148         com.liferay.portal.service.ServiceContext serviceContext)
149         throws com.liferay.portal.PortalException,
150             com.liferay.portal.SystemException {
151         return getService().revertPage(nodeId, title, version, serviceContext);
152     }
153 
154     public static void subscribePage(long nodeId, java.lang.String title)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException {
157         getService().subscribePage(nodeId, title);
158     }
159 
160     public static void unsubscribePage(long nodeId, java.lang.String title)
161         throws com.liferay.portal.PortalException,
162             com.liferay.portal.SystemException {
163         getService().unsubscribePage(nodeId, title);
164     }
165 
166     public static com.liferay.portlet.wiki.model.WikiPage updatePage(
167         long nodeId, java.lang.String title, double version,
168         java.lang.String content, java.lang.String summary, boolean minorEdit,
169         java.lang.String format, java.lang.String parentTitle,
170         java.lang.String redirectTitle,
171         com.liferay.portal.service.ServiceContext serviceContext)
172         throws com.liferay.portal.PortalException,
173             com.liferay.portal.SystemException {
174         return getService()
175                    .updatePage(nodeId, title, version, content, summary,
176             minorEdit, format, parentTitle, redirectTitle, serviceContext);
177     }
178 
179     public static WikiPageService getService() {
180         if (_service == null) {
181             throw new RuntimeException("WikiPageService is not set");
182         }
183 
184         return _service;
185     }
186 
187     public void setService(WikiPageService service) {
188         _service = service;
189     }
190 
191     private static WikiPageService _service;
192 }