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  
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   * {@link WikiPageService} bean. The static methods of
37   * this class calls the same methods of the bean instance. It's convenient to be
38   * able to just write one line to call a method on a bean instead of writing a
39   * lookup call and a method call.
40   * </p>
41   *
42   * @author    Brian Wing Shun Chan
43   * @see       WikiPageService
44   * @generated
45   */
46  public class WikiPageServiceUtil {
47      public static com.liferay.portlet.wiki.model.WikiPage addPage(long nodeId,
48          java.lang.String title, java.lang.String content,
49          java.lang.String summary, boolean minorEdit,
50          com.liferay.portal.service.ServiceContext serviceContext)
51          throws com.liferay.portal.PortalException,
52              com.liferay.portal.SystemException {
53          return getService()
54                     .addPage(nodeId, title, content, summary, minorEdit,
55              serviceContext);
56      }
57  
58      public static com.liferay.portlet.wiki.model.WikiPage addPage(long nodeId,
59          java.lang.String title, java.lang.String content,
60          java.lang.String summary, boolean minorEdit, java.lang.String format,
61          java.lang.String parentTitle, java.lang.String redirectTitle,
62          com.liferay.portal.service.ServiceContext serviceContext)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException {
65          return getService()
66                     .addPage(nodeId, title, content, summary, minorEdit, format,
67              parentTitle, redirectTitle, serviceContext);
68      }
69  
70      public static void addPageAttachments(long nodeId, java.lang.String title,
71          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException {
74          getService().addPageAttachments(nodeId, title, files);
75      }
76  
77      public static void changeParent(long nodeId, java.lang.String title,
78          java.lang.String newParentTitle,
79          com.liferay.portal.service.ServiceContext serviceContext)
80          throws com.liferay.portal.PortalException,
81              com.liferay.portal.SystemException {
82          getService().changeParent(nodeId, title, newParentTitle, serviceContext);
83      }
84  
85      public static void deletePage(long nodeId, java.lang.String title)
86          throws com.liferay.portal.PortalException,
87              com.liferay.portal.SystemException {
88          getService().deletePage(nodeId, title);
89      }
90  
91      public static void deletePageAttachment(long nodeId,
92          java.lang.String title, java.lang.String fileName)
93          throws com.liferay.portal.PortalException,
94              com.liferay.portal.SystemException {
95          getService().deletePageAttachment(nodeId, title, fileName);
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.PortalException,
101             com.liferay.portal.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.PortalException,
109             com.liferay.portal.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.PortalException,
118             com.liferay.portal.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, double version)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException {
126         return getService().getPage(nodeId, title, version);
127     }
128 
129     public static java.lang.String getPagesRSS(long companyId, long nodeId,
130         java.lang.String title, int max, java.lang.String type, double version,
131         java.lang.String displayStyle, java.lang.String feedURL,
132         java.lang.String entryURL, java.util.Locale locale)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException {
135         return getService()
136                    .getPagesRSS(companyId, nodeId, title, max, type, version,
137             displayStyle, feedURL, entryURL, locale);
138     }
139 
140     public static void movePage(long nodeId, java.lang.String title,
141         java.lang.String newTitle,
142         com.liferay.portal.service.ServiceContext serviceContext)
143         throws com.liferay.portal.PortalException,
144             com.liferay.portal.SystemException {
145         getService().movePage(nodeId, title, newTitle, serviceContext);
146     }
147 
148     public static com.liferay.portlet.wiki.model.WikiPage revertPage(
149         long nodeId, java.lang.String title, double version,
150         com.liferay.portal.service.ServiceContext serviceContext)
151         throws com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException {
153         return getService().revertPage(nodeId, title, version, serviceContext);
154     }
155 
156     public static void subscribePage(long nodeId, java.lang.String title)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException {
159         getService().subscribePage(nodeId, title);
160     }
161 
162     public static void unsubscribePage(long nodeId, java.lang.String title)
163         throws com.liferay.portal.PortalException,
164             com.liferay.portal.SystemException {
165         getService().unsubscribePage(nodeId, title);
166     }
167 
168     public static com.liferay.portlet.wiki.model.WikiPage updatePage(
169         long nodeId, java.lang.String title, double version,
170         java.lang.String content, java.lang.String summary, boolean minorEdit,
171         java.lang.String format, java.lang.String parentTitle,
172         java.lang.String redirectTitle,
173         com.liferay.portal.service.ServiceContext serviceContext)
174         throws com.liferay.portal.PortalException,
175             com.liferay.portal.SystemException {
176         return getService()
177                    .updatePage(nodeId, title, version, content, summary,
178             minorEdit, format, parentTitle, redirectTitle, serviceContext);
179     }
180 
181     public static WikiPageService getService() {
182         if (_service == null) {
183             throw new RuntimeException("WikiPageService is not set");
184         }
185 
186         return _service;
187     }
188 
189     public void setService(WikiPageService service) {
190         _service = service;
191     }
192 
193     private static WikiPageService _service;
194 }