1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.wiki.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="WikiPageServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link WikiPageService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       WikiPageService
37   * @generated
38   */
39  public class WikiPageServiceUtil {
40      public static com.liferay.portlet.wiki.model.WikiPage addPage(long nodeId,
41          java.lang.String title, java.lang.String content,
42          java.lang.String summary, boolean minorEdit,
43          com.liferay.portal.service.ServiceContext serviceContext)
44          throws com.liferay.portal.kernel.exception.PortalException,
45              com.liferay.portal.kernel.exception.SystemException {
46          return getService()
47                     .addPage(nodeId, title, content, summary, minorEdit,
48              serviceContext);
49      }
50  
51      public static com.liferay.portlet.wiki.model.WikiPage addPage(long nodeId,
52          java.lang.String title, java.lang.String content,
53          java.lang.String summary, boolean minorEdit, java.lang.String format,
54          java.lang.String parentTitle, java.lang.String redirectTitle,
55          com.liferay.portal.service.ServiceContext serviceContext)
56          throws com.liferay.portal.kernel.exception.PortalException,
57              com.liferay.portal.kernel.exception.SystemException {
58          return getService()
59                     .addPage(nodeId, title, content, summary, minorEdit, format,
60              parentTitle, redirectTitle, serviceContext);
61      }
62  
63      public static void addPageAttachments(long nodeId, java.lang.String title,
64          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files)
65          throws com.liferay.portal.kernel.exception.PortalException,
66              com.liferay.portal.kernel.exception.SystemException {
67          getService().addPageAttachments(nodeId, title, files);
68      }
69  
70      public static void changeParent(long nodeId, java.lang.String title,
71          java.lang.String newParentTitle,
72          com.liferay.portal.service.ServiceContext serviceContext)
73          throws com.liferay.portal.kernel.exception.PortalException,
74              com.liferay.portal.kernel.exception.SystemException {
75          getService().changeParent(nodeId, title, newParentTitle, serviceContext);
76      }
77  
78      public static void deletePage(long nodeId, java.lang.String title)
79          throws com.liferay.portal.kernel.exception.PortalException,
80              com.liferay.portal.kernel.exception.SystemException {
81          getService().deletePage(nodeId, title);
82      }
83  
84      public static void deletePageAttachment(long nodeId,
85          java.lang.String title, java.lang.String fileName)
86          throws com.liferay.portal.kernel.exception.PortalException,
87              com.liferay.portal.kernel.exception.SystemException {
88          getService().deletePageAttachment(nodeId, title, fileName);
89      }
90  
91      public static com.liferay.portlet.wiki.model.WikiPage getDraftPage(
92          long nodeId, java.lang.String title)
93          throws com.liferay.portal.kernel.exception.PortalException,
94              com.liferay.portal.kernel.exception.SystemException {
95          return getService().getDraftPage(nodeId, title);
96      }
97  
98      public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNodePages(
99          long nodeId, int max)
100         throws com.liferay.portal.kernel.exception.PortalException,
101             com.liferay.portal.kernel.exception.SystemException {
102         return getService().getNodePages(nodeId, max);
103     }
104 
105     public static java.lang.String getNodePagesRSS(long nodeId, int max,
106         java.lang.String type, double version, java.lang.String displayStyle,
107         java.lang.String feedURL, java.lang.String entryURL)
108         throws com.liferay.portal.kernel.exception.PortalException,
109             com.liferay.portal.kernel.exception.SystemException {
110         return getService()
111                    .getNodePagesRSS(nodeId, max, type, version, displayStyle,
112             feedURL, entryURL);
113     }
114 
115     public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
116         java.lang.String title)
117         throws com.liferay.portal.kernel.exception.PortalException,
118             com.liferay.portal.kernel.exception.SystemException {
119         return getService().getPage(nodeId, title);
120     }
121 
122     public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
123         java.lang.String title, boolean head)
124         throws com.liferay.portal.kernel.exception.PortalException,
125             com.liferay.portal.kernel.exception.SystemException {
126         return getService().getPage(nodeId, title, head);
127     }
128 
129     public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
130         java.lang.String title, double version)
131         throws com.liferay.portal.kernel.exception.PortalException,
132             com.liferay.portal.kernel.exception.SystemException {
133         return getService().getPage(nodeId, title, version);
134     }
135 
136     public static java.lang.String getPagesRSS(long companyId, long nodeId,
137         java.lang.String title, int max, java.lang.String type, double version,
138         java.lang.String displayStyle, java.lang.String feedURL,
139         java.lang.String entryURL, java.util.Locale locale)
140         throws com.liferay.portal.kernel.exception.PortalException,
141             com.liferay.portal.kernel.exception.SystemException {
142         return getService()
143                    .getPagesRSS(companyId, nodeId, title, max, type, version,
144             displayStyle, feedURL, entryURL, locale);
145     }
146 
147     public static void movePage(long nodeId, java.lang.String title,
148         java.lang.String newTitle,
149         com.liferay.portal.service.ServiceContext serviceContext)
150         throws com.liferay.portal.kernel.exception.PortalException,
151             com.liferay.portal.kernel.exception.SystemException {
152         getService().movePage(nodeId, title, newTitle, serviceContext);
153     }
154 
155     public static com.liferay.portlet.wiki.model.WikiPage revertPage(
156         long nodeId, java.lang.String title, double version,
157         com.liferay.portal.service.ServiceContext serviceContext)
158         throws com.liferay.portal.kernel.exception.PortalException,
159             com.liferay.portal.kernel.exception.SystemException {
160         return getService().revertPage(nodeId, title, version, serviceContext);
161     }
162 
163     public static void subscribePage(long nodeId, java.lang.String title)
164         throws com.liferay.portal.kernel.exception.PortalException,
165             com.liferay.portal.kernel.exception.SystemException {
166         getService().subscribePage(nodeId, title);
167     }
168 
169     public static void unsubscribePage(long nodeId, java.lang.String title)
170         throws com.liferay.portal.kernel.exception.PortalException,
171             com.liferay.portal.kernel.exception.SystemException {
172         getService().unsubscribePage(nodeId, title);
173     }
174 
175     public static com.liferay.portlet.wiki.model.WikiPage updatePage(
176         long nodeId, java.lang.String title, double version,
177         java.lang.String content, java.lang.String summary, boolean minorEdit,
178         java.lang.String format, java.lang.String parentTitle,
179         java.lang.String redirectTitle,
180         com.liferay.portal.service.ServiceContext serviceContext)
181         throws com.liferay.portal.kernel.exception.PortalException,
182             com.liferay.portal.kernel.exception.SystemException {
183         return getService()
184                    .updatePage(nodeId, title, version, content, summary,
185             minorEdit, format, parentTitle, redirectTitle, serviceContext);
186     }
187 
188     public static WikiPageService getService() {
189         if (_service == null) {
190             _service = (WikiPageService)PortalBeanLocatorUtil.locate(WikiPageService.class.getName());
191         }
192 
193         return _service;
194     }
195 
196     public void setService(WikiPageService service) {
197         _service = service;
198     }
199 
200     private static WikiPageService _service;
201 }