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.http;
16  
17  import com.liferay.portal.kernel.log.Log;
18  import com.liferay.portal.kernel.log.LogFactoryUtil;
19  import com.liferay.portal.kernel.util.LocaleUtil;
20  
21  import com.liferay.portlet.wiki.service.WikiPageServiceUtil;
22  
23  import java.rmi.RemoteException;
24  
25  /**
26   * <a href="WikiPageServiceSoap.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides a SOAP utility for the
35   * {@link com.liferay.portlet.wiki.service.WikiPageServiceUtil} service utility. The
36   * static methods of this class calls the same methods of the service utility.
37   * However, the signatures are different because it is difficult for SOAP to
38   * support certain types.
39   * </p>
40   *
41   * <p>
42   * ServiceBuilder follows certain rules in translating the methods. For example,
43   * if the method in the service utility returns a {@link java.util.List}, that
44   * is translated to an array of {@link com.liferay.portlet.wiki.model.WikiPageSoap}.
45   * If the method in the service utility returns a
46   * {@link com.liferay.portlet.wiki.model.WikiPage}, that is translated to a
47   * {@link com.liferay.portlet.wiki.model.WikiPageSoap}. Methods that SOAP cannot
48   * safely wire are skipped.
49   * </p>
50   *
51   * <p>
52   * The benefits of using the SOAP utility is that it is cross platform
53   * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
54   * even Perl, to call the generated services. One drawback of SOAP is that it is
55   * slow because it needs to serialize all calls into a text format (XML).
56   * </p>
57   *
58   * <p>
59   * You can see a list of services at
60   * http://localhost:8080/tunnel-web/secure/axis. Set the property
61   * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
62   * security.
63   * </p>
64   *
65   * <p>
66   * The SOAP utility is only generated for remote services.
67   * </p>
68   *
69   * @author    Brian Wing Shun Chan
70   * @see       WikiPageServiceHttp
71   * @see       com.liferay.portlet.wiki.model.WikiPageSoap
72   * @see       com.liferay.portlet.wiki.service.WikiPageServiceUtil
73   * @generated
74   */
75  public class WikiPageServiceSoap {
76      public static com.liferay.portlet.wiki.model.WikiPageSoap addPage(
77          long nodeId, java.lang.String title, java.lang.String content,
78          java.lang.String summary, boolean minorEdit,
79          com.liferay.portal.service.ServiceContext serviceContext)
80          throws RemoteException {
81          try {
82              com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.addPage(nodeId,
83                      title, content, summary, minorEdit, serviceContext);
84  
85              return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
86          }
87          catch (Exception e) {
88              _log.error(e, e);
89  
90              throw new RemoteException(e.getMessage());
91          }
92      }
93  
94      public static com.liferay.portlet.wiki.model.WikiPageSoap addPage(
95          long nodeId, java.lang.String title, java.lang.String content,
96          java.lang.String summary, boolean minorEdit, java.lang.String format,
97          java.lang.String parentTitle, java.lang.String redirectTitle,
98          com.liferay.portal.service.ServiceContext serviceContext)
99          throws RemoteException {
100         try {
101             com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.addPage(nodeId,
102                     title, content, summary, minorEdit, format, parentTitle,
103                     redirectTitle, serviceContext);
104 
105             return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
106         }
107         catch (Exception e) {
108             _log.error(e, e);
109 
110             throw new RemoteException(e.getMessage());
111         }
112     }
113 
114     public static void addPageAttachments(long nodeId, java.lang.String title,
115         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files)
116         throws RemoteException {
117         try {
118             WikiPageServiceUtil.addPageAttachments(nodeId, title, files);
119         }
120         catch (Exception e) {
121             _log.error(e, e);
122 
123             throw new RemoteException(e.getMessage());
124         }
125     }
126 
127     public static void changeParent(long nodeId, java.lang.String title,
128         java.lang.String newParentTitle,
129         com.liferay.portal.service.ServiceContext serviceContext)
130         throws RemoteException {
131         try {
132             WikiPageServiceUtil.changeParent(nodeId, title, newParentTitle,
133                 serviceContext);
134         }
135         catch (Exception e) {
136             _log.error(e, e);
137 
138             throw new RemoteException(e.getMessage());
139         }
140     }
141 
142     public static void deletePage(long nodeId, java.lang.String title)
143         throws RemoteException {
144         try {
145             WikiPageServiceUtil.deletePage(nodeId, title);
146         }
147         catch (Exception e) {
148             _log.error(e, e);
149 
150             throw new RemoteException(e.getMessage());
151         }
152     }
153 
154     public static void deletePageAttachment(long nodeId,
155         java.lang.String title, java.lang.String fileName)
156         throws RemoteException {
157         try {
158             WikiPageServiceUtil.deletePageAttachment(nodeId, title, fileName);
159         }
160         catch (Exception e) {
161             _log.error(e, e);
162 
163             throw new RemoteException(e.getMessage());
164         }
165     }
166 
167     public static com.liferay.portlet.wiki.model.WikiPageSoap getDraftPage(
168         long nodeId, java.lang.String title) throws RemoteException {
169         try {
170             com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getDraftPage(nodeId,
171                     title);
172 
173             return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
174         }
175         catch (Exception e) {
176             _log.error(e, e);
177 
178             throw new RemoteException(e.getMessage());
179         }
180     }
181 
182     public static com.liferay.portlet.wiki.model.WikiPageSoap[] getNodePages(
183         long nodeId, int max) throws RemoteException {
184         try {
185             java.util.List<com.liferay.portlet.wiki.model.WikiPage> returnValue = WikiPageServiceUtil.getNodePages(nodeId,
186                     max);
187 
188             return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModels(returnValue);
189         }
190         catch (Exception e) {
191             _log.error(e, e);
192 
193             throw new RemoteException(e.getMessage());
194         }
195     }
196 
197     public static java.lang.String getNodePagesRSS(long nodeId, int max,
198         java.lang.String type, double version, java.lang.String displayStyle,
199         java.lang.String feedURL, java.lang.String entryURL)
200         throws RemoteException {
201         try {
202             java.lang.String returnValue = WikiPageServiceUtil.getNodePagesRSS(nodeId,
203                     max, type, version, displayStyle, feedURL, entryURL);
204 
205             return returnValue;
206         }
207         catch (Exception e) {
208             _log.error(e, e);
209 
210             throw new RemoteException(e.getMessage());
211         }
212     }
213 
214     public static com.liferay.portlet.wiki.model.WikiPageSoap getPage(
215         long nodeId, java.lang.String title) throws RemoteException {
216         try {
217             com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(nodeId,
218                     title);
219 
220             return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
221         }
222         catch (Exception e) {
223             _log.error(e, e);
224 
225             throw new RemoteException(e.getMessage());
226         }
227     }
228 
229     public static com.liferay.portlet.wiki.model.WikiPageSoap getPage(
230         long nodeId, java.lang.String title, boolean head)
231         throws RemoteException {
232         try {
233             com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(nodeId,
234                     title, head);
235 
236             return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
237         }
238         catch (Exception e) {
239             _log.error(e, e);
240 
241             throw new RemoteException(e.getMessage());
242         }
243     }
244 
245     public static com.liferay.portlet.wiki.model.WikiPageSoap getPage(
246         long nodeId, java.lang.String title, double version)
247         throws RemoteException {
248         try {
249             com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(nodeId,
250                     title, version);
251 
252             return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
253         }
254         catch (Exception e) {
255             _log.error(e, e);
256 
257             throw new RemoteException(e.getMessage());
258         }
259     }
260 
261     public static java.lang.String getPagesRSS(long companyId, long nodeId,
262         java.lang.String title, int max, java.lang.String type, double version,
263         java.lang.String displayStyle, java.lang.String feedURL,
264         java.lang.String entryURL, String locale) throws RemoteException {
265         try {
266             java.lang.String returnValue = WikiPageServiceUtil.getPagesRSS(companyId,
267                     nodeId, title, max, type, version, displayStyle, feedURL,
268                     entryURL, LocaleUtil.fromLanguageId(locale));
269 
270             return returnValue;
271         }
272         catch (Exception e) {
273             _log.error(e, e);
274 
275             throw new RemoteException(e.getMessage());
276         }
277     }
278 
279     public static void movePage(long nodeId, java.lang.String title,
280         java.lang.String newTitle,
281         com.liferay.portal.service.ServiceContext serviceContext)
282         throws RemoteException {
283         try {
284             WikiPageServiceUtil.movePage(nodeId, title, newTitle, serviceContext);
285         }
286         catch (Exception e) {
287             _log.error(e, e);
288 
289             throw new RemoteException(e.getMessage());
290         }
291     }
292 
293     public static com.liferay.portlet.wiki.model.WikiPageSoap revertPage(
294         long nodeId, java.lang.String title, double version,
295         com.liferay.portal.service.ServiceContext serviceContext)
296         throws RemoteException {
297         try {
298             com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.revertPage(nodeId,
299                     title, version, serviceContext);
300 
301             return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
302         }
303         catch (Exception e) {
304             _log.error(e, e);
305 
306             throw new RemoteException(e.getMessage());
307         }
308     }
309 
310     public static void subscribePage(long nodeId, java.lang.String title)
311         throws RemoteException {
312         try {
313             WikiPageServiceUtil.subscribePage(nodeId, title);
314         }
315         catch (Exception e) {
316             _log.error(e, e);
317 
318             throw new RemoteException(e.getMessage());
319         }
320     }
321 
322     public static void unsubscribePage(long nodeId, java.lang.String title)
323         throws RemoteException {
324         try {
325             WikiPageServiceUtil.unsubscribePage(nodeId, title);
326         }
327         catch (Exception e) {
328             _log.error(e, e);
329 
330             throw new RemoteException(e.getMessage());
331         }
332     }
333 
334     public static com.liferay.portlet.wiki.model.WikiPageSoap updatePage(
335         long nodeId, java.lang.String title, double version,
336         java.lang.String content, java.lang.String summary, boolean minorEdit,
337         java.lang.String format, java.lang.String parentTitle,
338         java.lang.String redirectTitle,
339         com.liferay.portal.service.ServiceContext serviceContext)
340         throws RemoteException {
341         try {
342             com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.updatePage(nodeId,
343                     title, version, content, summary, minorEdit, format,
344                     parentTitle, redirectTitle, serviceContext);
345 
346             return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
347         }
348         catch (Exception e) {
349             _log.error(e, e);
350 
351             throw new RemoteException(e.getMessage());
352         }
353     }
354 
355     private static Log _log = LogFactoryUtil.getLog(WikiPageServiceSoap.class);
356 }