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