001    /**
002     * Copyright (c) 2000-present 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.portal.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    import com.liferay.portal.service.TeamServiceUtil;
022    
023    import java.rmi.RemoteException;
024    
025    /**
026     * Provides the SOAP utility for the
027     * {@link TeamServiceUtil} service utility. The
028     * static methods of this class calls the same methods of the service utility.
029     * However, the signatures are different because it is difficult for SOAP to
030     * support certain types.
031     *
032     * <p>
033     * ServiceBuilder follows certain rules in translating the methods. For example,
034     * if the method in the service utility returns a {@link java.util.List}, that
035     * is translated to an array of {@link com.liferay.portal.model.TeamSoap}.
036     * If the method in the service utility returns a
037     * {@link com.liferay.portal.model.Team}, that is translated to a
038     * {@link com.liferay.portal.model.TeamSoap}. Methods that SOAP cannot
039     * safely wire are skipped.
040     * </p>
041     *
042     * <p>
043     * The benefits of using the SOAP utility is that it is cross platform
044     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
045     * even Perl, to call the generated services. One drawback of SOAP is that it is
046     * slow because it needs to serialize all calls into a text format (XML).
047     * </p>
048     *
049     * <p>
050     * You can see a list of services at http://localhost:8080/api/axis. Set the
051     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
052     * security.
053     * </p>
054     *
055     * <p>
056     * The SOAP utility is only generated for remote services.
057     * </p>
058     *
059     * @author Brian Wing Shun Chan
060     * @see TeamServiceHttp
061     * @see com.liferay.portal.model.TeamSoap
062     * @see TeamServiceUtil
063     * @generated
064     */
065    @ProviderType
066    public class TeamServiceSoap {
067            /**
068            * @deprecated As of 7.0.0, replaced by {@link #addTeam(long, String,
069            String, ServiceContext)}
070            */
071            @Deprecated
072            public static com.liferay.portal.model.TeamSoap addTeam(long groupId,
073                    java.lang.String name, java.lang.String description)
074                    throws RemoteException {
075                    try {
076                            com.liferay.portal.model.Team returnValue = TeamServiceUtil.addTeam(groupId,
077                                            name, description);
078    
079                            return com.liferay.portal.model.TeamSoap.toSoapModel(returnValue);
080                    }
081                    catch (Exception e) {
082                            _log.error(e, e);
083    
084                            throw new RemoteException(e.getMessage());
085                    }
086            }
087    
088            public static com.liferay.portal.model.TeamSoap addTeam(long groupId,
089                    java.lang.String name, java.lang.String description,
090                    com.liferay.portal.service.ServiceContext serviceContext)
091                    throws RemoteException {
092                    try {
093                            com.liferay.portal.model.Team returnValue = TeamServiceUtil.addTeam(groupId,
094                                            name, description, serviceContext);
095    
096                            return com.liferay.portal.model.TeamSoap.toSoapModel(returnValue);
097                    }
098                    catch (Exception e) {
099                            _log.error(e, e);
100    
101                            throw new RemoteException(e.getMessage());
102                    }
103            }
104    
105            public static void deleteTeam(long teamId) throws RemoteException {
106                    try {
107                            TeamServiceUtil.deleteTeam(teamId);
108                    }
109                    catch (Exception e) {
110                            _log.error(e, e);
111    
112                            throw new RemoteException(e.getMessage());
113                    }
114            }
115    
116            public static com.liferay.portal.model.TeamSoap[] getGroupTeams(
117                    long groupId) throws RemoteException {
118                    try {
119                            java.util.List<com.liferay.portal.model.Team> returnValue = TeamServiceUtil.getGroupTeams(groupId);
120    
121                            return com.liferay.portal.model.TeamSoap.toSoapModels(returnValue);
122                    }
123                    catch (Exception e) {
124                            _log.error(e, e);
125    
126                            throw new RemoteException(e.getMessage());
127                    }
128            }
129    
130            public static com.liferay.portal.model.TeamSoap getTeam(long teamId)
131                    throws RemoteException {
132                    try {
133                            com.liferay.portal.model.Team returnValue = TeamServiceUtil.getTeam(teamId);
134    
135                            return com.liferay.portal.model.TeamSoap.toSoapModel(returnValue);
136                    }
137                    catch (Exception e) {
138                            _log.error(e, e);
139    
140                            throw new RemoteException(e.getMessage());
141                    }
142            }
143    
144            public static com.liferay.portal.model.TeamSoap getTeam(long groupId,
145                    java.lang.String name) throws RemoteException {
146                    try {
147                            com.liferay.portal.model.Team returnValue = TeamServiceUtil.getTeam(groupId,
148                                            name);
149    
150                            return com.liferay.portal.model.TeamSoap.toSoapModel(returnValue);
151                    }
152                    catch (Exception e) {
153                            _log.error(e, e);
154    
155                            throw new RemoteException(e.getMessage());
156                    }
157            }
158    
159            public static com.liferay.portal.model.TeamSoap[] getUserTeams(long userId)
160                    throws RemoteException {
161                    try {
162                            java.util.List<com.liferay.portal.model.Team> returnValue = TeamServiceUtil.getUserTeams(userId);
163    
164                            return com.liferay.portal.model.TeamSoap.toSoapModels(returnValue);
165                    }
166                    catch (Exception e) {
167                            _log.error(e, e);
168    
169                            throw new RemoteException(e.getMessage());
170                    }
171            }
172    
173            public static com.liferay.portal.model.TeamSoap[] getUserTeams(
174                    long userId, long groupId) throws RemoteException {
175                    try {
176                            java.util.List<com.liferay.portal.model.Team> returnValue = TeamServiceUtil.getUserTeams(userId,
177                                            groupId);
178    
179                            return com.liferay.portal.model.TeamSoap.toSoapModels(returnValue);
180                    }
181                    catch (Exception e) {
182                            _log.error(e, e);
183    
184                            throw new RemoteException(e.getMessage());
185                    }
186            }
187    
188            public static boolean hasUserTeam(long userId, long teamId)
189                    throws RemoteException {
190                    try {
191                            boolean returnValue = TeamServiceUtil.hasUserTeam(userId, teamId);
192    
193                            return returnValue;
194                    }
195                    catch (Exception e) {
196                            _log.error(e, e);
197    
198                            throw new RemoteException(e.getMessage());
199                    }
200            }
201    
202            public static com.liferay.portal.model.TeamSoap updateTeam(long teamId,
203                    java.lang.String name, java.lang.String description)
204                    throws RemoteException {
205                    try {
206                            com.liferay.portal.model.Team returnValue = TeamServiceUtil.updateTeam(teamId,
207                                            name, description);
208    
209                            return com.liferay.portal.model.TeamSoap.toSoapModel(returnValue);
210                    }
211                    catch (Exception e) {
212                            _log.error(e, e);
213    
214                            throw new RemoteException(e.getMessage());
215                    }
216            }
217    
218            private static Log _log = LogFactoryUtil.getLog(TeamServiceSoap.class);
219    }