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