001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link CompanyService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       CompanyService
030     * @generated
031     */
032    public class CompanyServiceUtil {
033            public static com.liferay.portal.model.Company addCompany(
034                    java.lang.String webId, java.lang.String virtualHost,
035                    java.lang.String mx, java.lang.String shardName, boolean system,
036                    int maxUsers)
037                    throws com.liferay.portal.kernel.exception.PortalException,
038                            com.liferay.portal.kernel.exception.SystemException {
039                    return getService()
040                                       .addCompany(webId, virtualHost, mx, shardName, system,
041                            maxUsers);
042            }
043    
044            public static void deleteLogo(long companyId)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deleteLogo(companyId);
048            }
049    
050            public static com.liferay.portal.model.Company getCompanyById(
051                    long companyId)
052                    throws com.liferay.portal.kernel.exception.PortalException,
053                            com.liferay.portal.kernel.exception.SystemException {
054                    return getService().getCompanyById(companyId);
055            }
056    
057            public static com.liferay.portal.model.Company getCompanyByLogoId(
058                    long logoId)
059                    throws com.liferay.portal.kernel.exception.PortalException,
060                            com.liferay.portal.kernel.exception.SystemException {
061                    return getService().getCompanyByLogoId(logoId);
062            }
063    
064            public static com.liferay.portal.model.Company getCompanyByMx(
065                    java.lang.String mx)
066                    throws com.liferay.portal.kernel.exception.PortalException,
067                            com.liferay.portal.kernel.exception.SystemException {
068                    return getService().getCompanyByMx(mx);
069            }
070    
071            public static com.liferay.portal.model.Company getCompanyByVirtualHost(
072                    java.lang.String virtualHost)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException {
075                    return getService().getCompanyByVirtualHost(virtualHost);
076            }
077    
078            public static com.liferay.portal.model.Company getCompanyByWebId(
079                    java.lang.String webId)
080                    throws com.liferay.portal.kernel.exception.PortalException,
081                            com.liferay.portal.kernel.exception.SystemException {
082                    return getService().getCompanyByWebId(webId);
083            }
084    
085            public static void removePreferences(long companyId, java.lang.String[] keys)
086                    throws com.liferay.portal.kernel.exception.PortalException,
087                            com.liferay.portal.kernel.exception.SystemException {
088                    getService().removePreferences(companyId, keys);
089            }
090    
091            public static com.liferay.portal.model.Company updateCompany(
092                    long companyId, java.lang.String virtualHost, java.lang.String mx,
093                    int maxUsers)
094                    throws com.liferay.portal.kernel.exception.PortalException,
095                            com.liferay.portal.kernel.exception.SystemException {
096                    return getService().updateCompany(companyId, virtualHost, mx, maxUsers);
097            }
098    
099            public static com.liferay.portal.model.Company updateCompany(
100                    long companyId, java.lang.String virtualHost, java.lang.String mx,
101                    java.lang.String homeURL, java.lang.String name,
102                    java.lang.String legalName, java.lang.String legalId,
103                    java.lang.String legalType, java.lang.String sicCode,
104                    java.lang.String tickerSymbol, java.lang.String industry,
105                    java.lang.String type, java.lang.String size)
106                    throws com.liferay.portal.kernel.exception.PortalException,
107                            com.liferay.portal.kernel.exception.SystemException {
108                    return getService()
109                                       .updateCompany(companyId, virtualHost, mx, homeURL, name,
110                            legalName, legalId, legalType, sicCode, tickerSymbol, industry,
111                            type, size);
112            }
113    
114            public static com.liferay.portal.model.Company updateCompany(
115                    long companyId, java.lang.String virtualHost, java.lang.String mx,
116                    java.lang.String homeURL, java.lang.String name,
117                    java.lang.String legalName, java.lang.String legalId,
118                    java.lang.String legalType, java.lang.String sicCode,
119                    java.lang.String tickerSymbol, java.lang.String industry,
120                    java.lang.String type, java.lang.String size,
121                    java.lang.String languageId, java.lang.String timeZoneId,
122                    java.util.List<com.liferay.portal.model.Address> addresses,
123                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
124                    java.util.List<com.liferay.portal.model.Phone> phones,
125                    java.util.List<com.liferay.portal.model.Website> websites,
126                    com.liferay.portal.kernel.util.UnicodeProperties properties)
127                    throws com.liferay.portal.kernel.exception.PortalException,
128                            com.liferay.portal.kernel.exception.SystemException {
129                    return getService()
130                                       .updateCompany(companyId, virtualHost, mx, homeURL, name,
131                            legalName, legalId, legalType, sicCode, tickerSymbol, industry,
132                            type, size, languageId, timeZoneId, addresses, emailAddresses,
133                            phones, websites, properties);
134            }
135    
136            public static void updateDisplay(long companyId,
137                    java.lang.String languageId, java.lang.String timeZoneId)
138                    throws com.liferay.portal.kernel.exception.PortalException,
139                            com.liferay.portal.kernel.exception.SystemException {
140                    getService().updateDisplay(companyId, languageId, timeZoneId);
141            }
142    
143            public static void updateLogo(long companyId, java.io.File file)
144                    throws com.liferay.portal.kernel.exception.PortalException,
145                            com.liferay.portal.kernel.exception.SystemException {
146                    getService().updateLogo(companyId, file);
147            }
148    
149            public static void updatePreferences(long companyId,
150                    com.liferay.portal.kernel.util.UnicodeProperties properties)
151                    throws com.liferay.portal.kernel.exception.PortalException,
152                            com.liferay.portal.kernel.exception.SystemException {
153                    getService().updatePreferences(companyId, properties);
154            }
155    
156            public static void updateSecurity(long companyId,
157                    java.lang.String authType, boolean autoLogin, boolean sendPassword,
158                    boolean strangers, boolean strangersWithMx, boolean strangersVerify,
159                    boolean communityLogo)
160                    throws com.liferay.portal.kernel.exception.PortalException,
161                            com.liferay.portal.kernel.exception.SystemException {
162                    getService()
163                            .updateSecurity(companyId, authType, autoLogin, sendPassword,
164                            strangers, strangersWithMx, strangersVerify, communityLogo);
165            }
166    
167            public static CompanyService getService() {
168                    if (_service == null) {
169                            _service = (CompanyService)PortalBeanLocatorUtil.locate(CompanyService.class.getName());
170                    }
171    
172                    return _service;
173            }
174    
175            public void setService(CompanyService service) {
176                    _service = service;
177            }
178    
179            private static CompanyService _service;
180    }