001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.wiki.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    
020    import com.liferay.portlet.wiki.service.WikiNodeServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    /**
025     * Provides the SOAP utility for the
026     * {@link com.liferay.portlet.wiki.service.WikiNodeServiceUtil} service utility. The
027     * static methods of this class calls the same methods of the service utility.
028     * However, the signatures are different because it is difficult for SOAP to
029     * support certain types.
030     *
031     * <p>
032     * ServiceBuilder follows certain rules in translating the methods. For example,
033     * if the method in the service utility returns a {@link java.util.List}, that
034     * is translated to an array of {@link com.liferay.portlet.wiki.model.WikiNodeSoap}.
035     * If the method in the service utility returns a
036     * {@link com.liferay.portlet.wiki.model.WikiNode}, that is translated to a
037     * {@link com.liferay.portlet.wiki.model.WikiNodeSoap}. Methods that SOAP cannot
038     * safely wire are skipped.
039     * </p>
040     *
041     * <p>
042     * The benefits of using the SOAP utility is that it is cross platform
043     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
044     * even Perl, to call the generated services. One drawback of SOAP is that it is
045     * slow because it needs to serialize all calls into a text format (XML).
046     * </p>
047     *
048     * <p>
049     * You can see a list of services at http://localhost:8080/api/axis. Set the
050     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
051     * security.
052     * </p>
053     *
054     * <p>
055     * The SOAP utility is only generated for remote services.
056     * </p>
057     *
058     * @author Brian Wing Shun Chan
059     * @see WikiNodeServiceHttp
060     * @see com.liferay.portlet.wiki.model.WikiNodeSoap
061     * @see com.liferay.portlet.wiki.service.WikiNodeServiceUtil
062     * @generated
063     */
064    public class WikiNodeServiceSoap {
065            public static com.liferay.portlet.wiki.model.WikiNodeSoap addNode(
066                    java.lang.String name, java.lang.String description,
067                    com.liferay.portal.service.ServiceContext serviceContext)
068                    throws RemoteException {
069                    try {
070                            com.liferay.portlet.wiki.model.WikiNode returnValue = WikiNodeServiceUtil.addNode(name,
071                                            description, serviceContext);
072    
073                            return com.liferay.portlet.wiki.model.WikiNodeSoap.toSoapModel(returnValue);
074                    }
075                    catch (Exception e) {
076                            _log.error(e, e);
077    
078                            throw new RemoteException(e.getMessage());
079                    }
080            }
081    
082            public static void deleteNode(long nodeId) throws RemoteException {
083                    try {
084                            WikiNodeServiceUtil.deleteNode(nodeId);
085                    }
086                    catch (Exception e) {
087                            _log.error(e, e);
088    
089                            throw new RemoteException(e.getMessage());
090                    }
091            }
092    
093            public static com.liferay.portlet.wiki.model.WikiNodeSoap getNode(
094                    long nodeId) throws RemoteException {
095                    try {
096                            com.liferay.portlet.wiki.model.WikiNode returnValue = WikiNodeServiceUtil.getNode(nodeId);
097    
098                            return com.liferay.portlet.wiki.model.WikiNodeSoap.toSoapModel(returnValue);
099                    }
100                    catch (Exception e) {
101                            _log.error(e, e);
102    
103                            throw new RemoteException(e.getMessage());
104                    }
105            }
106    
107            public static com.liferay.portlet.wiki.model.WikiNodeSoap getNode(
108                    long groupId, java.lang.String name) throws RemoteException {
109                    try {
110                            com.liferay.portlet.wiki.model.WikiNode returnValue = WikiNodeServiceUtil.getNode(groupId,
111                                            name);
112    
113                            return com.liferay.portlet.wiki.model.WikiNodeSoap.toSoapModel(returnValue);
114                    }
115                    catch (Exception e) {
116                            _log.error(e, e);
117    
118                            throw new RemoteException(e.getMessage());
119                    }
120            }
121    
122            public static com.liferay.portlet.wiki.model.WikiNodeSoap[] getNodes(
123                    long groupId) throws RemoteException {
124                    try {
125                            java.util.List<com.liferay.portlet.wiki.model.WikiNode> returnValue = WikiNodeServiceUtil.getNodes(groupId);
126    
127                            return com.liferay.portlet.wiki.model.WikiNodeSoap.toSoapModels(returnValue);
128                    }
129                    catch (Exception e) {
130                            _log.error(e, e);
131    
132                            throw new RemoteException(e.getMessage());
133                    }
134            }
135    
136            public static com.liferay.portlet.wiki.model.WikiNodeSoap[] getNodes(
137                    long groupId, int status) throws RemoteException {
138                    try {
139                            java.util.List<com.liferay.portlet.wiki.model.WikiNode> returnValue = WikiNodeServiceUtil.getNodes(groupId,
140                                            status);
141    
142                            return com.liferay.portlet.wiki.model.WikiNodeSoap.toSoapModels(returnValue);
143                    }
144                    catch (Exception e) {
145                            _log.error(e, e);
146    
147                            throw new RemoteException(e.getMessage());
148                    }
149            }
150    
151            public static com.liferay.portlet.wiki.model.WikiNodeSoap[] getNodes(
152                    long groupId, int start, int end) throws RemoteException {
153                    try {
154                            java.util.List<com.liferay.portlet.wiki.model.WikiNode> returnValue = WikiNodeServiceUtil.getNodes(groupId,
155                                            start, end);
156    
157                            return com.liferay.portlet.wiki.model.WikiNodeSoap.toSoapModels(returnValue);
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.WikiNodeSoap[] getNodes(
167                    long groupId, int status, int start, int end) throws RemoteException {
168                    try {
169                            java.util.List<com.liferay.portlet.wiki.model.WikiNode> returnValue = WikiNodeServiceUtil.getNodes(groupId,
170                                            status, start, end);
171    
172                            return com.liferay.portlet.wiki.model.WikiNodeSoap.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 int getNodesCount(long groupId) throws RemoteException {
182                    try {
183                            int returnValue = WikiNodeServiceUtil.getNodesCount(groupId);
184    
185                            return returnValue;
186                    }
187                    catch (Exception e) {
188                            _log.error(e, e);
189    
190                            throw new RemoteException(e.getMessage());
191                    }
192            }
193    
194            public static int getNodesCount(long groupId, int status)
195                    throws RemoteException {
196                    try {
197                            int returnValue = WikiNodeServiceUtil.getNodesCount(groupId, status);
198    
199                            return returnValue;
200                    }
201                    catch (Exception e) {
202                            _log.error(e, e);
203    
204                            throw new RemoteException(e.getMessage());
205                    }
206            }
207    
208            public static com.liferay.portlet.wiki.model.WikiNodeSoap moveNodeToTrash(
209                    long nodeId) throws RemoteException {
210                    try {
211                            com.liferay.portlet.wiki.model.WikiNode returnValue = WikiNodeServiceUtil.moveNodeToTrash(nodeId);
212    
213                            return com.liferay.portlet.wiki.model.WikiNodeSoap.toSoapModel(returnValue);
214                    }
215                    catch (Exception e) {
216                            _log.error(e, e);
217    
218                            throw new RemoteException(e.getMessage());
219                    }
220            }
221    
222            public static void restoreNodeFromTrash(long nodeId)
223                    throws RemoteException {
224                    try {
225                            WikiNodeServiceUtil.restoreNodeFromTrash(nodeId);
226                    }
227                    catch (Exception e) {
228                            _log.error(e, e);
229    
230                            throw new RemoteException(e.getMessage());
231                    }
232            }
233    
234            public static void subscribeNode(long nodeId) throws RemoteException {
235                    try {
236                            WikiNodeServiceUtil.subscribeNode(nodeId);
237                    }
238                    catch (Exception e) {
239                            _log.error(e, e);
240    
241                            throw new RemoteException(e.getMessage());
242                    }
243            }
244    
245            public static void unsubscribeNode(long nodeId) throws RemoteException {
246                    try {
247                            WikiNodeServiceUtil.unsubscribeNode(nodeId);
248                    }
249                    catch (Exception e) {
250                            _log.error(e, e);
251    
252                            throw new RemoteException(e.getMessage());
253                    }
254            }
255    
256            public static com.liferay.portlet.wiki.model.WikiNodeSoap updateNode(
257                    long nodeId, java.lang.String name, java.lang.String description,
258                    com.liferay.portal.service.ServiceContext serviceContext)
259                    throws RemoteException {
260                    try {
261                            com.liferay.portlet.wiki.model.WikiNode returnValue = WikiNodeServiceUtil.updateNode(nodeId,
262                                            name, description, serviceContext);
263    
264                            return com.liferay.portlet.wiki.model.WikiNodeSoap.toSoapModel(returnValue);
265                    }
266                    catch (Exception e) {
267                            _log.error(e, e);
268    
269                            throw new RemoteException(e.getMessage());
270                    }
271            }
272    
273            private static Log _log = LogFactoryUtil.getLog(WikiNodeServiceSoap.class);
274    }