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;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="CompanyServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link CompanyService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       CompanyService
39   * @generated
40   */
41  public class CompanyServiceUtil {
42      public static com.liferay.portal.model.Company addCompany(
43          java.lang.String webId, java.lang.String virtualHost,
44          java.lang.String mx, java.lang.String shardName, boolean system)
45          throws com.liferay.portal.PortalException,
46              com.liferay.portal.SystemException {
47          return getService().addCompany(webId, virtualHost, mx, shardName, system);
48      }
49  
50      public static void deleteLogo(long companyId)
51          throws com.liferay.portal.PortalException,
52              com.liferay.portal.SystemException {
53          getService().deleteLogo(companyId);
54      }
55  
56      public static com.liferay.portal.model.Company getCompanyById(
57          long companyId)
58          throws com.liferay.portal.PortalException,
59              com.liferay.portal.SystemException {
60          return getService().getCompanyById(companyId);
61      }
62  
63      public static com.liferay.portal.model.Company getCompanyByLogoId(
64          long logoId)
65          throws com.liferay.portal.PortalException,
66              com.liferay.portal.SystemException {
67          return getService().getCompanyByLogoId(logoId);
68      }
69  
70      public static com.liferay.portal.model.Company getCompanyByMx(
71          java.lang.String mx)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException {
74          return getService().getCompanyByMx(mx);
75      }
76  
77      public static com.liferay.portal.model.Company getCompanyByVirtualHost(
78          java.lang.String virtualHost)
79          throws com.liferay.portal.PortalException,
80              com.liferay.portal.SystemException {
81          return getService().getCompanyByVirtualHost(virtualHost);
82      }
83  
84      public static com.liferay.portal.model.Company getCompanyByWebId(
85          java.lang.String webId)
86          throws com.liferay.portal.PortalException,
87              com.liferay.portal.SystemException {
88          return getService().getCompanyByWebId(webId);
89      }
90  
91      public static void removePreferences(long companyId, java.lang.String[] keys)
92          throws com.liferay.portal.PortalException,
93              com.liferay.portal.SystemException {
94          getService().removePreferences(companyId, keys);
95      }
96  
97      public static com.liferay.portal.model.Company updateCompany(
98          long companyId, java.lang.String virtualHost, java.lang.String mx)
99          throws com.liferay.portal.PortalException,
100             com.liferay.portal.SystemException {
101         return getService().updateCompany(companyId, virtualHost, mx);
102     }
103 
104     public static com.liferay.portal.model.Company updateCompany(
105         long companyId, java.lang.String virtualHost, java.lang.String mx,
106         java.lang.String homeURL, java.lang.String name,
107         java.lang.String legalName, java.lang.String legalId,
108         java.lang.String legalType, java.lang.String sicCode,
109         java.lang.String tickerSymbol, java.lang.String industry,
110         java.lang.String type, java.lang.String size)
111         throws com.liferay.portal.PortalException,
112             com.liferay.portal.SystemException {
113         return getService()
114                    .updateCompany(companyId, virtualHost, mx, homeURL, name,
115             legalName, legalId, legalType, sicCode, tickerSymbol, industry,
116             type, size);
117     }
118 
119     public static com.liferay.portal.model.Company updateCompany(
120         long companyId, java.lang.String virtualHost, java.lang.String mx,
121         java.lang.String homeURL, java.lang.String name,
122         java.lang.String legalName, java.lang.String legalId,
123         java.lang.String legalType, java.lang.String sicCode,
124         java.lang.String tickerSymbol, java.lang.String industry,
125         java.lang.String type, java.lang.String size,
126         java.lang.String languageId, java.lang.String timeZoneId,
127         java.util.List<com.liferay.portal.model.Address> addresses,
128         java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
129         java.util.List<com.liferay.portal.model.Phone> phones,
130         java.util.List<com.liferay.portal.model.Website> websites,
131         com.liferay.portal.kernel.util.UnicodeProperties properties)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException {
134         return getService()
135                    .updateCompany(companyId, virtualHost, mx, homeURL, name,
136             legalName, legalId, legalType, sicCode, tickerSymbol, industry,
137             type, size, languageId, timeZoneId, addresses, emailAddresses,
138             phones, websites, properties);
139     }
140 
141     public static void updateDisplay(long companyId,
142         java.lang.String languageId, java.lang.String timeZoneId)
143         throws com.liferay.portal.PortalException,
144             com.liferay.portal.SystemException {
145         getService().updateDisplay(companyId, languageId, timeZoneId);
146     }
147 
148     public static void updateLogo(long companyId, java.io.File file)
149         throws com.liferay.portal.PortalException,
150             com.liferay.portal.SystemException {
151         getService().updateLogo(companyId, file);
152     }
153 
154     public static void updatePreferences(long companyId,
155         com.liferay.portal.kernel.util.UnicodeProperties properties)
156         throws com.liferay.portal.PortalException,
157             com.liferay.portal.SystemException {
158         getService().updatePreferences(companyId, properties);
159     }
160 
161     public static void updateSecurity(long companyId,
162         java.lang.String authType, boolean autoLogin, boolean sendPassword,
163         boolean strangers, boolean strangersWithMx, boolean strangersVerify,
164         boolean communityLogo)
165         throws com.liferay.portal.PortalException,
166             com.liferay.portal.SystemException {
167         getService()
168             .updateSecurity(companyId, authType, autoLogin, sendPassword,
169             strangers, strangersWithMx, strangersVerify, communityLogo);
170     }
171 
172     public static CompanyService getService() {
173         if (_service == null) {
174             _service = (CompanyService)PortalBeanLocatorUtil.locate(CompanyService.class.getName());
175 
176             ReferenceRegistry.registerReference(CompanyServiceUtil.class,
177                 "_service");
178             MethodCache.remove(CompanyService.class);
179         }
180 
181         return _service;
182     }
183 
184     public void setService(CompanyService service) {
185         MethodCache.remove(CompanyService.class);
186 
187         _service = service;
188 
189         ReferenceRegistry.registerReference(CompanyServiceUtil.class, "_service");
190         MethodCache.remove(CompanyService.class);
191     }
192 
193     private static CompanyService _service;
194 }