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