1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="WikiPageServiceUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class provides static methods for the
37   * {@link WikiPageService} bean. The static methods of
38   * this class calls the same methods of the bean instance. It's convenient to be
39   * able to just write one line to call a method on a bean instead of writing a
40   * lookup call and a method call.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       WikiPageService
45   * @generated
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             _service = (WikiPageService)PortalBeanLocatorUtil.locate(WikiPageService.class.getName());
185         }
186 
187         return _service;
188     }
189 
190     public void setService(WikiPageService service) {
191         _service = service;
192     }
193 
194     private static WikiPageService _service;
195 }