1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.service.http;
16  
17  import com.liferay.portal.kernel.log.Log;
18  import com.liferay.portal.kernel.log.LogFactoryUtil;
19  import com.liferay.portal.service.CompanyServiceUtil;
20  
21  import java.rmi.RemoteException;
22  
23  /**
24   * <a href="CompanyServiceSoap.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides a SOAP utility for the
33   * {@link com.liferay.portal.service.CompanyServiceUtil} service utility. The
34   * static methods of this class calls the same methods of the service utility.
35   * However, the signatures are different because it is difficult for SOAP to
36   * support certain types.
37   * </p>
38   *
39   * <p>
40   * ServiceBuilder follows certain rules in translating the methods. For example,
41   * if the method in the service utility returns a {@link java.util.List}, that
42   * is translated to an array of {@link com.liferay.portal.model.CompanySoap}.
43   * If the method in the service utility returns a
44   * {@link com.liferay.portal.model.Company}, that is translated to a
45   * {@link com.liferay.portal.model.CompanySoap}. Methods that SOAP cannot
46   * safely wire are skipped.
47   * </p>
48   *
49   * <p>
50   * The benefits of using the SOAP utility is that it is cross platform
51   * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
52   * even Perl, to call the generated services. One drawback of SOAP is that it is
53   * slow because it needs to serialize all calls into a text format (XML).
54   * </p>
55   *
56   * <p>
57   * You can see a list of services at
58   * http://localhost:8080/tunnel-web/secure/axis. Set the property
59   * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
60   * security.
61   * </p>
62   *
63   * <p>
64   * The SOAP utility is only generated for remote services.
65   * </p>
66   *
67   * @author    Brian Wing Shun Chan
68   * @see       CompanyServiceHttp
69   * @see       com.liferay.portal.model.CompanySoap
70   * @see       com.liferay.portal.service.CompanyServiceUtil
71   * @generated
72   */
73  public class CompanyServiceSoap {
74      public static com.liferay.portal.model.CompanySoap addCompany(
75          java.lang.String webId, java.lang.String virtualHost,
76          java.lang.String mx, java.lang.String shardName, boolean system)
77          throws RemoteException {
78          try {
79              com.liferay.portal.model.Company returnValue = CompanyServiceUtil.addCompany(webId,
80                      virtualHost, mx, shardName, system);
81  
82              return com.liferay.portal.model.CompanySoap.toSoapModel(returnValue);
83          }
84          catch (Exception e) {
85              _log.error(e, e);
86  
87              throw new RemoteException(e.getMessage());
88          }
89      }
90  
91      public static void deleteLogo(long companyId) throws RemoteException {
92          try {
93              CompanyServiceUtil.deleteLogo(companyId);
94          }
95          catch (Exception e) {
96              _log.error(e, e);
97  
98              throw new RemoteException(e.getMessage());
99          }
100     }
101 
102     public static com.liferay.portal.model.CompanySoap getCompanyById(
103         long companyId) throws RemoteException {
104         try {
105             com.liferay.portal.model.Company returnValue = CompanyServiceUtil.getCompanyById(companyId);
106 
107             return com.liferay.portal.model.CompanySoap.toSoapModel(returnValue);
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.CompanySoap getCompanyByLogoId(
117         long logoId) throws RemoteException {
118         try {
119             com.liferay.portal.model.Company returnValue = CompanyServiceUtil.getCompanyByLogoId(logoId);
120 
121             return com.liferay.portal.model.CompanySoap.toSoapModel(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.CompanySoap getCompanyByMx(
131         java.lang.String mx) throws RemoteException {
132         try {
133             com.liferay.portal.model.Company returnValue = CompanyServiceUtil.getCompanyByMx(mx);
134 
135             return com.liferay.portal.model.CompanySoap.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.CompanySoap getCompanyByVirtualHost(
145         java.lang.String virtualHost) throws RemoteException {
146         try {
147             com.liferay.portal.model.Company returnValue = CompanyServiceUtil.getCompanyByVirtualHost(virtualHost);
148 
149             return com.liferay.portal.model.CompanySoap.toSoapModel(returnValue);
150         }
151         catch (Exception e) {
152             _log.error(e, e);
153 
154             throw new RemoteException(e.getMessage());
155         }
156     }
157 
158     public static com.liferay.portal.model.CompanySoap getCompanyByWebId(
159         java.lang.String webId) throws RemoteException {
160         try {
161             com.liferay.portal.model.Company returnValue = CompanyServiceUtil.getCompanyByWebId(webId);
162 
163             return com.liferay.portal.model.CompanySoap.toSoapModel(returnValue);
164         }
165         catch (Exception e) {
166             _log.error(e, e);
167 
168             throw new RemoteException(e.getMessage());
169         }
170     }
171 
172     public static void removePreferences(long companyId, java.lang.String[] keys)
173         throws RemoteException {
174         try {
175             CompanyServiceUtil.removePreferences(companyId, keys);
176         }
177         catch (Exception e) {
178             _log.error(e, e);
179 
180             throw new RemoteException(e.getMessage());
181         }
182     }
183 
184     public static com.liferay.portal.model.CompanySoap updateCompany(
185         long companyId, java.lang.String virtualHost, java.lang.String mx)
186         throws RemoteException {
187         try {
188             com.liferay.portal.model.Company returnValue = CompanyServiceUtil.updateCompany(companyId,
189                     virtualHost, mx);
190 
191             return com.liferay.portal.model.CompanySoap.toSoapModel(returnValue);
192         }
193         catch (Exception e) {
194             _log.error(e, e);
195 
196             throw new RemoteException(e.getMessage());
197         }
198     }
199 
200     public static com.liferay.portal.model.CompanySoap updateCompany(
201         long companyId, java.lang.String virtualHost, java.lang.String mx,
202         java.lang.String homeURL, java.lang.String name,
203         java.lang.String legalName, java.lang.String legalId,
204         java.lang.String legalType, java.lang.String sicCode,
205         java.lang.String tickerSymbol, java.lang.String industry,
206         java.lang.String type, java.lang.String size) throws RemoteException {
207         try {
208             com.liferay.portal.model.Company returnValue = CompanyServiceUtil.updateCompany(companyId,
209                     virtualHost, mx, homeURL, name, legalName, legalId,
210                     legalType, sicCode, tickerSymbol, industry, type, size);
211 
212             return com.liferay.portal.model.CompanySoap.toSoapModel(returnValue);
213         }
214         catch (Exception e) {
215             _log.error(e, e);
216 
217             throw new RemoteException(e.getMessage());
218         }
219     }
220 
221     public static void updateDisplay(long companyId,
222         java.lang.String languageId, java.lang.String timeZoneId)
223         throws RemoteException {
224         try {
225             CompanyServiceUtil.updateDisplay(companyId, languageId, timeZoneId);
226         }
227         catch (Exception e) {
228             _log.error(e, e);
229 
230             throw new RemoteException(e.getMessage());
231         }
232     }
233 
234     public static void updateSecurity(long companyId,
235         java.lang.String authType, boolean autoLogin, boolean sendPassword,
236         boolean strangers, boolean strangersWithMx, boolean strangersVerify,
237         boolean communityLogo) throws RemoteException {
238         try {
239             CompanyServiceUtil.updateSecurity(companyId, authType, autoLogin,
240                 sendPassword, strangers, strangersWithMx, strangersVerify,
241                 communityLogo);
242         }
243         catch (Exception e) {
244             _log.error(e, e);
245 
246             throw new RemoteException(e.getMessage());
247         }
248     }
249 
250     private static Log _log = LogFactoryUtil.getLog(CompanyServiceSoap.class);
251 }