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