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