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 moveNodeToTrash(
123                    long nodeId) throws RemoteException {
124                    try {
125                            com.liferay.portlet.wiki.model.WikiNode returnValue = WikiNodeServiceUtil.moveNodeToTrash(nodeId);
126    
127                            return com.liferay.portlet.wiki.model.WikiNodeSoap.toSoapModel(returnValue);
128                    }
129                    catch (Exception e) {
130                            _log.error(e, e);
131    
132                            throw new RemoteException(e.getMessage());
133                    }
134            }
135    
136            public static void restoreNodeFromTrash(long nodeId)
137                    throws RemoteException {
138                    try {
139                            WikiNodeServiceUtil.restoreNodeFromTrash(nodeId);
140                    }
141                    catch (Exception e) {
142                            _log.error(e, e);
143    
144                            throw new RemoteException(e.getMessage());
145                    }
146            }
147    
148            public static void subscribeNode(long nodeId) throws RemoteException {
149                    try {
150                            WikiNodeServiceUtil.subscribeNode(nodeId);
151                    }
152                    catch (Exception e) {
153                            _log.error(e, e);
154    
155                            throw new RemoteException(e.getMessage());
156                    }
157            }
158    
159            public static void unsubscribeNode(long nodeId) throws RemoteException {
160                    try {
161                            WikiNodeServiceUtil.unsubscribeNode(nodeId);
162                    }
163                    catch (Exception e) {
164                            _log.error(e, e);
165    
166                            throw new RemoteException(e.getMessage());
167                    }
168            }
169    
170            public static com.liferay.portlet.wiki.model.WikiNodeSoap updateNode(
171                    long nodeId, java.lang.String name, java.lang.String description,
172                    com.liferay.portal.service.ServiceContext serviceContext)
173                    throws RemoteException {
174                    try {
175                            com.liferay.portlet.wiki.model.WikiNode returnValue = WikiNodeServiceUtil.updateNode(nodeId,
176                                            name, description, serviceContext);
177    
178                            return com.liferay.portlet.wiki.model.WikiNodeSoap.toSoapModel(returnValue);
179                    }
180                    catch (Exception e) {
181                            _log.error(e, e);
182    
183                            throw new RemoteException(e.getMessage());
184                    }
185            }
186    
187            private static Log _log = LogFactoryUtil.getLog(WikiNodeServiceSoap.class);
188    }