1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
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[] getNodePages(
168         long nodeId, int max) throws RemoteException {
169         try {
170             java.util.List<com.liferay.portlet.wiki.model.WikiPage> returnValue = WikiPageServiceUtil.getNodePages(nodeId,
171                     max);
172 
173             return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModels(returnValue);
174         }
175         catch (Exception e) {
176             _log.error(e, e);
177 
178             throw new RemoteException(e.getMessage());
179         }
180     }
181 
182     public static java.lang.String getNodePagesRSS(long nodeId, int max,
183         java.lang.String type, double version, java.lang.String displayStyle,
184         java.lang.String feedURL, java.lang.String entryURL)
185         throws RemoteException {
186         try {
187             java.lang.String returnValue = WikiPageServiceUtil.getNodePagesRSS(nodeId,
188                     max, type, version, displayStyle, feedURL, entryURL);
189 
190             return returnValue;
191         }
192         catch (Exception e) {
193             _log.error(e, e);
194 
195             throw new RemoteException(e.getMessage());
196         }
197     }
198 
199     public static com.liferay.portlet.wiki.model.WikiPageSoap getPage(
200         long nodeId, java.lang.String title) throws RemoteException {
201         try {
202             com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(nodeId,
203                     title);
204 
205             return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(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, double version)
216         throws RemoteException {
217         try {
218             com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.getPage(nodeId,
219                     title, version);
220 
221             return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
222         }
223         catch (Exception e) {
224             _log.error(e, e);
225 
226             throw new RemoteException(e.getMessage());
227         }
228     }
229 
230     public static java.lang.String getPagesRSS(long companyId, long nodeId,
231         java.lang.String title, int max, java.lang.String type, double version,
232         java.lang.String displayStyle, java.lang.String feedURL,
233         java.lang.String entryURL, String locale) throws RemoteException {
234         try {
235             java.lang.String returnValue = WikiPageServiceUtil.getPagesRSS(companyId,
236                     nodeId, title, max, type, version, displayStyle, feedURL,
237                     entryURL, LocaleUtil.fromLanguageId(locale));
238 
239             return returnValue;
240         }
241         catch (Exception e) {
242             _log.error(e, e);
243 
244             throw new RemoteException(e.getMessage());
245         }
246     }
247 
248     public static void movePage(long nodeId, java.lang.String title,
249         java.lang.String newTitle,
250         com.liferay.portal.service.ServiceContext serviceContext)
251         throws RemoteException {
252         try {
253             WikiPageServiceUtil.movePage(nodeId, title, newTitle, serviceContext);
254         }
255         catch (Exception e) {
256             _log.error(e, e);
257 
258             throw new RemoteException(e.getMessage());
259         }
260     }
261 
262     public static com.liferay.portlet.wiki.model.WikiPageSoap revertPage(
263         long nodeId, java.lang.String title, double version,
264         com.liferay.portal.service.ServiceContext serviceContext)
265         throws RemoteException {
266         try {
267             com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.revertPage(nodeId,
268                     title, version, serviceContext);
269 
270             return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(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 subscribePage(long nodeId, java.lang.String title)
280         throws RemoteException {
281         try {
282             WikiPageServiceUtil.subscribePage(nodeId, title);
283         }
284         catch (Exception e) {
285             _log.error(e, e);
286 
287             throw new RemoteException(e.getMessage());
288         }
289     }
290 
291     public static void unsubscribePage(long nodeId, java.lang.String title)
292         throws RemoteException {
293         try {
294             WikiPageServiceUtil.unsubscribePage(nodeId, title);
295         }
296         catch (Exception e) {
297             _log.error(e, e);
298 
299             throw new RemoteException(e.getMessage());
300         }
301     }
302 
303     public static com.liferay.portlet.wiki.model.WikiPageSoap updatePage(
304         long nodeId, java.lang.String title, double version,
305         java.lang.String content, java.lang.String summary, boolean minorEdit,
306         java.lang.String format, java.lang.String parentTitle,
307         java.lang.String redirectTitle,
308         com.liferay.portal.service.ServiceContext serviceContext)
309         throws RemoteException {
310         try {
311             com.liferay.portlet.wiki.model.WikiPage returnValue = WikiPageServiceUtil.updatePage(nodeId,
312                     title, version, content, summary, minorEdit, format,
313                     parentTitle, redirectTitle, serviceContext);
314 
315             return com.liferay.portlet.wiki.model.WikiPageSoap.toSoapModel(returnValue);
316         }
317         catch (Exception e) {
318             _log.error(e, e);
319 
320             throw new RemoteException(e.getMessage());
321         }
322     }
323 
324     private static Log _log = LogFactoryUtil.getLog(WikiPageServiceSoap.class);
325 }