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