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