001    /**
002     * Copyright (c) 2000-2010 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.CompanyServiceUtil;
020    
021    import java.rmi.RemoteException;
022    
023    /**
024     * <p>
025     * This class provides a SOAP utility for the
026     * {@link com.liferay.portal.service.CompanyServiceUtil} 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     * </p>
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.CompanySoap}.
036     * If the method in the service utility returns a
037     * {@link com.liferay.portal.model.Company}, that is translated to a
038     * {@link com.liferay.portal.model.CompanySoap}. 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
051     * http://localhost:8080/tunnel-web/secure/axis. Set the property
052     * <b>tunnel.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       CompanyServiceHttp
062     * @see       com.liferay.portal.model.CompanySoap
063     * @see       com.liferay.portal.service.CompanyServiceUtil
064     * @generated
065     */
066    public class CompanyServiceSoap {
067            public static com.liferay.portal.model.CompanySoap addCompany(
068                    java.lang.String webId, java.lang.String virtualHost,
069                    java.lang.String mx, java.lang.String shardName, boolean system,
070                    int maxUsers) throws RemoteException {
071                    try {
072                            com.liferay.portal.model.Company returnValue = CompanyServiceUtil.addCompany(webId,
073                                            virtualHost, mx, shardName, system, maxUsers);
074    
075                            return com.liferay.portal.model.CompanySoap.toSoapModel(returnValue);
076                    }
077                    catch (Exception e) {
078                            _log.error(e, e);
079    
080                            throw new RemoteException(e.getMessage());
081                    }
082            }
083    
084            public static void deleteLogo(long companyId) throws RemoteException {
085                    try {
086                            CompanyServiceUtil.deleteLogo(companyId);
087                    }
088                    catch (Exception e) {
089                            _log.error(e, e);
090    
091                            throw new RemoteException(e.getMessage());
092                    }
093            }
094    
095            public static com.liferay.portal.model.CompanySoap getCompanyById(
096                    long companyId) throws RemoteException {
097                    try {
098                            com.liferay.portal.model.Company returnValue = CompanyServiceUtil.getCompanyById(companyId);
099    
100                            return com.liferay.portal.model.CompanySoap.toSoapModel(returnValue);
101                    }
102                    catch (Exception e) {
103                            _log.error(e, e);
104    
105                            throw new RemoteException(e.getMessage());
106                    }
107            }
108    
109            public static com.liferay.portal.model.CompanySoap getCompanyByLogoId(
110                    long logoId) throws RemoteException {
111                    try {
112                            com.liferay.portal.model.Company returnValue = CompanyServiceUtil.getCompanyByLogoId(logoId);
113    
114                            return com.liferay.portal.model.CompanySoap.toSoapModel(returnValue);
115                    }
116                    catch (Exception e) {
117                            _log.error(e, e);
118    
119                            throw new RemoteException(e.getMessage());
120                    }
121            }
122    
123            public static com.liferay.portal.model.CompanySoap getCompanyByMx(
124                    java.lang.String mx) throws RemoteException {
125                    try {
126                            com.liferay.portal.model.Company returnValue = CompanyServiceUtil.getCompanyByMx(mx);
127    
128                            return com.liferay.portal.model.CompanySoap.toSoapModel(returnValue);
129                    }
130                    catch (Exception e) {
131                            _log.error(e, e);
132    
133                            throw new RemoteException(e.getMessage());
134                    }
135            }
136    
137            public static com.liferay.portal.model.CompanySoap getCompanyByVirtualHost(
138                    java.lang.String virtualHost) throws RemoteException {
139                    try {
140                            com.liferay.portal.model.Company returnValue = CompanyServiceUtil.getCompanyByVirtualHost(virtualHost);
141    
142                            return com.liferay.portal.model.CompanySoap.toSoapModel(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.portal.model.CompanySoap getCompanyByWebId(
152                    java.lang.String webId) throws RemoteException {
153                    try {
154                            com.liferay.portal.model.Company returnValue = CompanyServiceUtil.getCompanyByWebId(webId);
155    
156                            return com.liferay.portal.model.CompanySoap.toSoapModel(returnValue);
157                    }
158                    catch (Exception e) {
159                            _log.error(e, e);
160    
161                            throw new RemoteException(e.getMessage());
162                    }
163            }
164    
165            public static void removePreferences(long companyId, java.lang.String[] keys)
166                    throws RemoteException {
167                    try {
168                            CompanyServiceUtil.removePreferences(companyId, keys);
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.CompanySoap updateCompany(
178                    long companyId, java.lang.String virtualHost, java.lang.String mx,
179                    int maxUsers) throws RemoteException {
180                    try {
181                            com.liferay.portal.model.Company returnValue = CompanyServiceUtil.updateCompany(companyId,
182                                            virtualHost, mx, maxUsers);
183    
184                            return com.liferay.portal.model.CompanySoap.toSoapModel(returnValue);
185                    }
186                    catch (Exception e) {
187                            _log.error(e, e);
188    
189                            throw new RemoteException(e.getMessage());
190                    }
191            }
192    
193            public static com.liferay.portal.model.CompanySoap updateCompany(
194                    long companyId, java.lang.String virtualHost, java.lang.String mx,
195                    java.lang.String homeURL, java.lang.String name,
196                    java.lang.String legalName, java.lang.String legalId,
197                    java.lang.String legalType, java.lang.String sicCode,
198                    java.lang.String tickerSymbol, java.lang.String industry,
199                    java.lang.String type, java.lang.String size) throws RemoteException {
200                    try {
201                            com.liferay.portal.model.Company returnValue = CompanyServiceUtil.updateCompany(companyId,
202                                            virtualHost, mx, homeURL, name, legalName, legalId,
203                                            legalType, sicCode, tickerSymbol, industry, type, size);
204    
205                            return com.liferay.portal.model.CompanySoap.toSoapModel(returnValue);
206                    }
207                    catch (Exception e) {
208                            _log.error(e, e);
209    
210                            throw new RemoteException(e.getMessage());
211                    }
212            }
213    
214            public static void updateDisplay(long companyId,
215                    java.lang.String languageId, java.lang.String timeZoneId)
216                    throws RemoteException {
217                    try {
218                            CompanyServiceUtil.updateDisplay(companyId, languageId, timeZoneId);
219                    }
220                    catch (Exception e) {
221                            _log.error(e, e);
222    
223                            throw new RemoteException(e.getMessage());
224                    }
225            }
226    
227            public static void updateSecurity(long companyId,
228                    java.lang.String authType, boolean autoLogin, boolean sendPassword,
229                    boolean strangers, boolean strangersWithMx, boolean strangersVerify,
230                    boolean communityLogo) throws RemoteException {
231                    try {
232                            CompanyServiceUtil.updateSecurity(companyId, authType, autoLogin,
233                                    sendPassword, strangers, strangersWithMx, strangersVerify,
234                                    communityLogo);
235                    }
236                    catch (Exception e) {
237                            _log.error(e, e);
238    
239                            throw new RemoteException(e.getMessage());
240                    }
241            }
242    
243            private static Log _log = LogFactoryUtil.getLog(CompanyServiceSoap.class);
244    }