1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="CompanyServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link CompanyService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       CompanyService
37   * @generated
38   */
39  public class CompanyServiceUtil {
40      public static com.liferay.portal.model.Company addCompany(
41          java.lang.String webId, java.lang.String virtualHost,
42          java.lang.String mx, java.lang.String shardName, boolean system,
43          int maxUsers)
44          throws com.liferay.portal.kernel.exception.PortalException,
45              com.liferay.portal.kernel.exception.SystemException {
46          return getService()
47                     .addCompany(webId, virtualHost, mx, shardName, system,
48              maxUsers);
49      }
50  
51      public static void deleteLogo(long companyId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteLogo(companyId);
55      }
56  
57      public static com.liferay.portal.model.Company getCompanyById(
58          long companyId)
59          throws com.liferay.portal.kernel.exception.PortalException,
60              com.liferay.portal.kernel.exception.SystemException {
61          return getService().getCompanyById(companyId);
62      }
63  
64      public static com.liferay.portal.model.Company getCompanyByLogoId(
65          long logoId)
66          throws com.liferay.portal.kernel.exception.PortalException,
67              com.liferay.portal.kernel.exception.SystemException {
68          return getService().getCompanyByLogoId(logoId);
69      }
70  
71      public static com.liferay.portal.model.Company getCompanyByMx(
72          java.lang.String mx)
73          throws com.liferay.portal.kernel.exception.PortalException,
74              com.liferay.portal.kernel.exception.SystemException {
75          return getService().getCompanyByMx(mx);
76      }
77  
78      public static com.liferay.portal.model.Company getCompanyByVirtualHost(
79          java.lang.String virtualHost)
80          throws com.liferay.portal.kernel.exception.PortalException,
81              com.liferay.portal.kernel.exception.SystemException {
82          return getService().getCompanyByVirtualHost(virtualHost);
83      }
84  
85      public static com.liferay.portal.model.Company getCompanyByWebId(
86          java.lang.String webId)
87          throws com.liferay.portal.kernel.exception.PortalException,
88              com.liferay.portal.kernel.exception.SystemException {
89          return getService().getCompanyByWebId(webId);
90      }
91  
92      public static void removePreferences(long companyId, java.lang.String[] keys)
93          throws com.liferay.portal.kernel.exception.PortalException,
94              com.liferay.portal.kernel.exception.SystemException {
95          getService().removePreferences(companyId, keys);
96      }
97  
98      public static com.liferay.portal.model.Company updateCompany(
99          long companyId, java.lang.String virtualHost, java.lang.String mx,
100         int maxUsers)
101         throws com.liferay.portal.kernel.exception.PortalException,
102             com.liferay.portal.kernel.exception.SystemException {
103         return getService().updateCompany(companyId, virtualHost, mx, maxUsers);
104     }
105 
106     public static com.liferay.portal.model.Company updateCompany(
107         long companyId, java.lang.String virtualHost, java.lang.String mx,
108         java.lang.String homeURL, java.lang.String name,
109         java.lang.String legalName, java.lang.String legalId,
110         java.lang.String legalType, java.lang.String sicCode,
111         java.lang.String tickerSymbol, java.lang.String industry,
112         java.lang.String type, java.lang.String size)
113         throws com.liferay.portal.kernel.exception.PortalException,
114             com.liferay.portal.kernel.exception.SystemException {
115         return getService()
116                    .updateCompany(companyId, virtualHost, mx, homeURL, name,
117             legalName, legalId, legalType, sicCode, tickerSymbol, industry,
118             type, size);
119     }
120 
121     public static com.liferay.portal.model.Company updateCompany(
122         long companyId, java.lang.String virtualHost, java.lang.String mx,
123         java.lang.String homeURL, java.lang.String name,
124         java.lang.String legalName, java.lang.String legalId,
125         java.lang.String legalType, java.lang.String sicCode,
126         java.lang.String tickerSymbol, java.lang.String industry,
127         java.lang.String type, java.lang.String size,
128         java.lang.String languageId, java.lang.String timeZoneId,
129         java.util.List<com.liferay.portal.model.Address> addresses,
130         java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
131         java.util.List<com.liferay.portal.model.Phone> phones,
132         java.util.List<com.liferay.portal.model.Website> websites,
133         com.liferay.portal.kernel.util.UnicodeProperties properties)
134         throws com.liferay.portal.kernel.exception.PortalException,
135             com.liferay.portal.kernel.exception.SystemException {
136         return getService()
137                    .updateCompany(companyId, virtualHost, mx, homeURL, name,
138             legalName, legalId, legalType, sicCode, tickerSymbol, industry,
139             type, size, languageId, timeZoneId, addresses, emailAddresses,
140             phones, websites, properties);
141     }
142 
143     public static void updateDisplay(long companyId,
144         java.lang.String languageId, java.lang.String timeZoneId)
145         throws com.liferay.portal.kernel.exception.PortalException,
146             com.liferay.portal.kernel.exception.SystemException {
147         getService().updateDisplay(companyId, languageId, timeZoneId);
148     }
149 
150     public static void updateLogo(long companyId, java.io.File file)
151         throws com.liferay.portal.kernel.exception.PortalException,
152             com.liferay.portal.kernel.exception.SystemException {
153         getService().updateLogo(companyId, file);
154     }
155 
156     public static void updatePreferences(long companyId,
157         com.liferay.portal.kernel.util.UnicodeProperties properties)
158         throws com.liferay.portal.kernel.exception.PortalException,
159             com.liferay.portal.kernel.exception.SystemException {
160         getService().updatePreferences(companyId, properties);
161     }
162 
163     public static void updateSecurity(long companyId,
164         java.lang.String authType, boolean autoLogin, boolean sendPassword,
165         boolean strangers, boolean strangersWithMx, boolean strangersVerify,
166         boolean communityLogo)
167         throws com.liferay.portal.kernel.exception.PortalException,
168             com.liferay.portal.kernel.exception.SystemException {
169         getService()
170             .updateSecurity(companyId, authType, autoLogin, sendPassword,
171             strangers, strangersWithMx, strangersVerify, communityLogo);
172     }
173 
174     public static CompanyService getService() {
175         if (_service == null) {
176             _service = (CompanyService)PortalBeanLocatorUtil.locate(CompanyService.class.getName());
177         }
178 
179         return _service;
180     }
181 
182     public void setService(CompanyService service) {
183         _service = service;
184     }
185 
186     private static CompanyService _service;
187 }