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