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<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 java.util.List<com.liferay.portlet.wiki.model.WikiPage> getNodePages(
92          long nodeId, int max)
93          throws com.liferay.portal.kernel.exception.PortalException,
94              com.liferay.portal.kernel.exception.SystemException {
95          return getService().getNodePages(nodeId, max);
96      }
97  
98      public static java.lang.String getNodePagesRSS(long nodeId, int max,
99          java.lang.String type, double version, java.lang.String displayStyle,
100         java.lang.String feedURL, java.lang.String entryURL)
101         throws com.liferay.portal.kernel.exception.PortalException,
102             com.liferay.portal.kernel.exception.SystemException {
103         return getService()
104                    .getNodePagesRSS(nodeId, max, type, version, displayStyle,
105             feedURL, entryURL);
106     }
107 
108     public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
109         java.lang.String title)
110         throws com.liferay.portal.kernel.exception.PortalException,
111             com.liferay.portal.kernel.exception.SystemException {
112         return getService().getPage(nodeId, title);
113     }
114 
115     public static com.liferay.portlet.wiki.model.WikiPage getPage(long nodeId,
116         java.lang.String title, double version)
117         throws com.liferay.portal.kernel.exception.PortalException,
118             com.liferay.portal.kernel.exception.SystemException {
119         return getService().getPage(nodeId, title, version);
120     }
121 
122     public static java.lang.String getPagesRSS(long companyId, long nodeId,
123         java.lang.String title, int max, java.lang.String type, double version,
124         java.lang.String displayStyle, java.lang.String feedURL,
125         java.lang.String entryURL, java.util.Locale locale)
126         throws com.liferay.portal.kernel.exception.PortalException,
127             com.liferay.portal.kernel.exception.SystemException {
128         return getService()
129                    .getPagesRSS(companyId, nodeId, title, max, type, version,
130             displayStyle, feedURL, entryURL, locale);
131     }
132 
133     public static void movePage(long nodeId, java.lang.String title,
134         java.lang.String newTitle,
135         com.liferay.portal.service.ServiceContext serviceContext)
136         throws com.liferay.portal.kernel.exception.PortalException,
137             com.liferay.portal.kernel.exception.SystemException {
138         getService().movePage(nodeId, title, newTitle, serviceContext);
139     }
140 
141     public static com.liferay.portlet.wiki.model.WikiPage revertPage(
142         long nodeId, java.lang.String title, double version,
143         com.liferay.portal.service.ServiceContext serviceContext)
144         throws com.liferay.portal.kernel.exception.PortalException,
145             com.liferay.portal.kernel.exception.SystemException {
146         return getService().revertPage(nodeId, title, version, serviceContext);
147     }
148 
149     public static void subscribePage(long nodeId, java.lang.String title)
150         throws com.liferay.portal.kernel.exception.PortalException,
151             com.liferay.portal.kernel.exception.SystemException {
152         getService().subscribePage(nodeId, title);
153     }
154 
155     public static void unsubscribePage(long nodeId, java.lang.String title)
156         throws com.liferay.portal.kernel.exception.PortalException,
157             com.liferay.portal.kernel.exception.SystemException {
158         getService().unsubscribePage(nodeId, title);
159     }
160 
161     public static com.liferay.portlet.wiki.model.WikiPage updatePage(
162         long nodeId, java.lang.String title, double version,
163         java.lang.String content, java.lang.String summary, boolean minorEdit,
164         java.lang.String format, java.lang.String parentTitle,
165         java.lang.String redirectTitle,
166         com.liferay.portal.service.ServiceContext serviceContext)
167         throws com.liferay.portal.kernel.exception.PortalException,
168             com.liferay.portal.kernel.exception.SystemException {
169         return getService()
170                    .updatePage(nodeId, title, version, content, summary,
171             minorEdit, format, parentTitle, redirectTitle, serviceContext);
172     }
173 
174     public static WikiPageService getService() {
175         if (_service == null) {
176             _service = (WikiPageService)PortalBeanLocatorUtil.locate(WikiPageService.class.getName());
177         }
178 
179         return _service;
180     }
181 
182     public void setService(WikiPageService service) {
183         _service = service;
184     }
185 
186     private static WikiPageService _service;
187 }