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