1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service;
24  
25  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="CompanyServiceUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class provides static methods for the
37   * {@link CompanyService} bean. The static methods of
38   * this class calls the same methods of the bean instance. It's convenient to be
39   * able to just write one line to call a method on a bean instead of writing a
40   * lookup call and a method call.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       CompanyService
45   * @generated
46   */
47  public class CompanyServiceUtil {
48      public static com.liferay.portal.model.Company addCompany(
49          java.lang.String webId, java.lang.String virtualHost,
50          java.lang.String mx, java.lang.String shardName, boolean system)
51          throws com.liferay.portal.PortalException,
52              com.liferay.portal.SystemException {
53          return getService().addCompany(webId, virtualHost, mx, shardName, system);
54      }
55  
56      public static void deleteLogo(long companyId)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException {
59          getService().deleteLogo(companyId);
60      }
61  
62      public static com.liferay.portal.model.Company getCompanyById(
63          long companyId)
64          throws com.liferay.portal.PortalException,
65              com.liferay.portal.SystemException {
66          return getService().getCompanyById(companyId);
67      }
68  
69      public static com.liferay.portal.model.Company getCompanyByLogoId(
70          long logoId)
71          throws com.liferay.portal.PortalException,
72              com.liferay.portal.SystemException {
73          return getService().getCompanyByLogoId(logoId);
74      }
75  
76      public static com.liferay.portal.model.Company getCompanyByMx(
77          java.lang.String mx)
78          throws com.liferay.portal.PortalException,
79              com.liferay.portal.SystemException {
80          return getService().getCompanyByMx(mx);
81      }
82  
83      public static com.liferay.portal.model.Company getCompanyByVirtualHost(
84          java.lang.String virtualHost)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException {
87          return getService().getCompanyByVirtualHost(virtualHost);
88      }
89  
90      public static com.liferay.portal.model.Company getCompanyByWebId(
91          java.lang.String webId)
92          throws com.liferay.portal.PortalException,
93              com.liferay.portal.SystemException {
94          return getService().getCompanyByWebId(webId);
95      }
96  
97      public static void removePreferences(long companyId, java.lang.String[] keys)
98          throws com.liferay.portal.PortalException,
99              com.liferay.portal.SystemException {
100         getService().removePreferences(companyId, keys);
101     }
102 
103     public static com.liferay.portal.model.Company updateCompany(
104         long companyId, java.lang.String virtualHost, java.lang.String mx)
105         throws com.liferay.portal.PortalException,
106             com.liferay.portal.SystemException {
107         return getService().updateCompany(companyId, virtualHost, mx);
108     }
109 
110     public static com.liferay.portal.model.Company updateCompany(
111         long companyId, java.lang.String virtualHost, java.lang.String mx,
112         java.lang.String homeURL, java.lang.String name,
113         java.lang.String legalName, java.lang.String legalId,
114         java.lang.String legalType, java.lang.String sicCode,
115         java.lang.String tickerSymbol, java.lang.String industry,
116         java.lang.String type, java.lang.String size)
117         throws com.liferay.portal.PortalException,
118             com.liferay.portal.SystemException {
119         return getService()
120                    .updateCompany(companyId, virtualHost, mx, homeURL, name,
121             legalName, legalId, legalType, sicCode, tickerSymbol, industry,
122             type, size);
123     }
124 
125     public static com.liferay.portal.model.Company updateCompany(
126         long companyId, java.lang.String virtualHost, java.lang.String mx,
127         java.lang.String homeURL, java.lang.String name,
128         java.lang.String legalName, java.lang.String legalId,
129         java.lang.String legalType, java.lang.String sicCode,
130         java.lang.String tickerSymbol, java.lang.String industry,
131         java.lang.String type, java.lang.String size,
132         java.lang.String languageId, java.lang.String timeZoneId,
133         java.util.List<com.liferay.portal.model.Address> addresses,
134         java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
135         java.util.List<com.liferay.portal.model.Phone> phones,
136         java.util.List<com.liferay.portal.model.Website> websites,
137         com.liferay.portal.kernel.util.UnicodeProperties properties)
138         throws com.liferay.portal.PortalException,
139             com.liferay.portal.SystemException {
140         return getService()
141                    .updateCompany(companyId, virtualHost, mx, homeURL, name,
142             legalName, legalId, legalType, sicCode, tickerSymbol, industry,
143             type, size, languageId, timeZoneId, addresses, emailAddresses,
144             phones, websites, properties);
145     }
146 
147     public static void updateDisplay(long companyId,
148         java.lang.String languageId, java.lang.String timeZoneId)
149         throws com.liferay.portal.PortalException,
150             com.liferay.portal.SystemException {
151         getService().updateDisplay(companyId, languageId, timeZoneId);
152     }
153 
154     public static void updateLogo(long companyId, java.io.File file)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException {
157         getService().updateLogo(companyId, file);
158     }
159 
160     public static void updatePreferences(long companyId,
161         com.liferay.portal.kernel.util.UnicodeProperties properties)
162         throws com.liferay.portal.PortalException,
163             com.liferay.portal.SystemException {
164         getService().updatePreferences(companyId, properties);
165     }
166 
167     public static void updateSecurity(long companyId,
168         java.lang.String authType, boolean autoLogin, boolean sendPassword,
169         boolean strangers, boolean strangersWithMx, boolean strangersVerify,
170         boolean communityLogo)
171         throws com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException {
173         getService()
174             .updateSecurity(companyId, authType, autoLogin, sendPassword,
175             strangers, strangersWithMx, strangersVerify, communityLogo);
176     }
177 
178     public static CompanyService getService() {
179         if (_service == null) {
180             _service = (CompanyService)PortalBeanLocatorUtil.locate(CompanyService.class.getName());
181         }
182 
183         return _service;
184     }
185 
186     public void setService(CompanyService service) {
187         _service = service;
188     }
189 
190     private static CompanyService _service;
191 }