001 /** 002 * Copyright (c) 2000-2013 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 import com.liferay.portal.kernel.util.ReferenceRegistry; 019 020 /** 021 * Provides the remote service utility for Company. This utility wraps 022 * {@link com.liferay.portal.service.impl.CompanyServiceImpl} and is the 023 * primary access point for service operations in application layer code running 024 * on a remote server. Methods of this service are expected to have security 025 * checks based on the propagated JAAS credentials because this service can be 026 * accessed remotely. 027 * 028 * @author Brian Wing Shun Chan 029 * @see CompanyService 030 * @see com.liferay.portal.service.base.CompanyServiceBaseImpl 031 * @see com.liferay.portal.service.impl.CompanyServiceImpl 032 * @generated 033 */ 034 public class CompanyServiceUtil { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.CompanyServiceImpl} and rerun ServiceBuilder to regenerate this class. 039 */ 040 041 /** 042 * Returns the Spring bean ID for this bean. 043 * 044 * @return the Spring bean ID for this bean 045 */ 046 public static java.lang.String getBeanIdentifier() { 047 return getService().getBeanIdentifier(); 048 } 049 050 /** 051 * Sets the Spring bean ID for this bean. 052 * 053 * @param beanIdentifier the Spring bean ID for this bean 054 */ 055 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 056 getService().setBeanIdentifier(beanIdentifier); 057 } 058 059 /** 060 * Adds a company. 061 * 062 * @param webId the company's web domain 063 * @param virtualHost the company's virtual host name 064 * @param mx the company's mail domain 065 * @param shardName the company's shard 066 * @param system whether the company is the very first company (i.e., the 067 * @param maxUsers the max number of company users (optionally 068 <code>0</code>) 069 * @param active whether the company is active 070 * @return the company 071 * @throws PortalException if the web domain, virtual host name, or mail 072 domain was invalid or if the user was not a universal 073 administrator 074 * @throws SystemException if a system exception occurred 075 */ 076 public static com.liferay.portal.model.Company addCompany( 077 java.lang.String webId, java.lang.String virtualHost, 078 java.lang.String mx, java.lang.String shardName, boolean system, 079 int maxUsers, boolean active) 080 throws com.liferay.portal.kernel.exception.PortalException, 081 com.liferay.portal.kernel.exception.SystemException { 082 return getService() 083 .addCompany(webId, virtualHost, mx, shardName, system, 084 maxUsers, active); 085 } 086 087 public static com.liferay.portal.model.Company deleteCompany(long companyId) 088 throws com.liferay.portal.kernel.exception.PortalException, 089 com.liferay.portal.kernel.exception.SystemException { 090 return getService().deleteCompany(companyId); 091 } 092 093 /** 094 * Deletes the company's logo. 095 * 096 * @param companyId the primary key of the company 097 * @throws PortalException if the company with the primary key could not be 098 found or if the company's logo could not be found or if the user 099 was not an administrator 100 * @throws SystemException if a system exception occurred 101 */ 102 public static void deleteLogo(long companyId) 103 throws com.liferay.portal.kernel.exception.PortalException, 104 com.liferay.portal.kernel.exception.SystemException { 105 getService().deleteLogo(companyId); 106 } 107 108 /** 109 * Returns the company with the primary key. 110 * 111 * @param companyId the primary key of the company 112 * @return Returns the company with the primary key 113 * @throws PortalException if a company with the primary key could not be 114 found 115 * @throws SystemException if a system exception occurred 116 */ 117 public static com.liferay.portal.model.Company getCompanyById( 118 long companyId) 119 throws com.liferay.portal.kernel.exception.PortalException, 120 com.liferay.portal.kernel.exception.SystemException { 121 return getService().getCompanyById(companyId); 122 } 123 124 /** 125 * Returns the company with the logo. 126 * 127 * @param logoId the ID of the company's logo 128 * @return Returns the company with the logo 129 * @throws PortalException if the company with the logo could not be found 130 * @throws SystemException if a system exception occurred 131 */ 132 public static com.liferay.portal.model.Company getCompanyByLogoId( 133 long logoId) 134 throws com.liferay.portal.kernel.exception.PortalException, 135 com.liferay.portal.kernel.exception.SystemException { 136 return getService().getCompanyByLogoId(logoId); 137 } 138 139 /** 140 * Returns the company with the mail domian. 141 * 142 * @param mx the company's mail domain 143 * @return Returns the company with the mail domain 144 * @throws PortalException if the company with the mail domain could not be 145 found 146 * @throws SystemException if a system exception occurred 147 */ 148 public static com.liferay.portal.model.Company getCompanyByMx( 149 java.lang.String mx) 150 throws com.liferay.portal.kernel.exception.PortalException, 151 com.liferay.portal.kernel.exception.SystemException { 152 return getService().getCompanyByMx(mx); 153 } 154 155 /** 156 * Returns the company with the virtual host name. 157 * 158 * @param virtualHost the company's virtual host name 159 * @return Returns the company with the virtual host name 160 * @throws PortalException if the company with the virtual host name could 161 not be found or if the virtual host was not associated with a 162 company 163 * @throws SystemException if a system exception occurred 164 */ 165 public static com.liferay.portal.model.Company getCompanyByVirtualHost( 166 java.lang.String virtualHost) 167 throws com.liferay.portal.kernel.exception.PortalException, 168 com.liferay.portal.kernel.exception.SystemException { 169 return getService().getCompanyByVirtualHost(virtualHost); 170 } 171 172 /** 173 * Returns the company with the web domain. 174 * 175 * @param webId the company's web domain 176 * @return Returns the company with the web domain 177 * @throws PortalException if the company with the web domain could not be 178 found 179 * @throws SystemException if a system exception occurred 180 */ 181 public static com.liferay.portal.model.Company getCompanyByWebId( 182 java.lang.String webId) 183 throws com.liferay.portal.kernel.exception.PortalException, 184 com.liferay.portal.kernel.exception.SystemException { 185 return getService().getCompanyByWebId(webId); 186 } 187 188 /** 189 * Removes the values that match the keys of the company's preferences. 190 * 191 * This method is called by {@link 192 * com.liferay.portlet.portalsettings.action.EditLDAPServerAction} remotely 193 * through {@link com.liferay.portal.service.CompanyService}. 194 * 195 * @param companyId the primary key of the company 196 * @param keys the company's preferences keys to be remove 197 * @throws PortalException if the user was not an administrator 198 * @throws SystemException if a system exception occurred 199 */ 200 public static void removePreferences(long companyId, java.lang.String[] keys) 201 throws com.liferay.portal.kernel.exception.PortalException, 202 com.liferay.portal.kernel.exception.SystemException { 203 getService().removePreferences(companyId, keys); 204 } 205 206 /** 207 * Updates the company 208 * 209 * @param companyId the primary key of the company 210 * @param virtualHost the company's virtual host name 211 * @param mx the company's mail domain 212 * @param maxUsers the max number of company users (optionally 213 <code>0</code>) 214 * @param active whether the company is active 215 * @return the company with the primary key 216 * @throws PortalException if a company with the primary key could not be 217 found or if the new information was invalid or if the user was 218 not a universal administrator 219 * @throws SystemException if a system exception occurred 220 */ 221 public static com.liferay.portal.model.Company updateCompany( 222 long companyId, java.lang.String virtualHost, java.lang.String mx, 223 int maxUsers, boolean active) 224 throws com.liferay.portal.kernel.exception.PortalException, 225 com.liferay.portal.kernel.exception.SystemException { 226 return getService() 227 .updateCompany(companyId, virtualHost, mx, maxUsers, active); 228 } 229 230 /** 231 * Updates the company with additional account information. 232 * 233 * @param companyId the primary key of the company 234 * @param virtualHost the company's virtual host name 235 * @param mx the company's mail domain 236 * @param homeURL the company's home URL (optionally <code>null</code>) 237 * @param name the company's account name (optionally <code>null</code>) 238 * @param legalName the company's account legal name (optionally 239 <code>null</code>) 240 * @param legalId the company's account legal ID (optionally 241 <code>null</code>) 242 * @param legalType the company's account legal type (optionally 243 <code>null</code>) 244 * @param sicCode the company's account SIC code (optionally 245 <code>null</code>) 246 * @param tickerSymbol the company's account ticker symbol (optionally 247 <code>null</code>) 248 * @param industry the the company's account industry (optionally 249 <code>null</code>) 250 * @param type the company's account type (optionally <code>null</code>) 251 * @param size the company's account size (optionally <code>null</code>) 252 * @return the the company with the primary key 253 * @throws PortalException if a company with the primary key could not be 254 found or if the new information was invalid or if the user was 255 not an administrator 256 * @throws SystemException if a system exception occurred 257 */ 258 public static com.liferay.portal.model.Company updateCompany( 259 long companyId, java.lang.String virtualHost, java.lang.String mx, 260 java.lang.String homeURL, java.lang.String name, 261 java.lang.String legalName, java.lang.String legalId, 262 java.lang.String legalType, java.lang.String sicCode, 263 java.lang.String tickerSymbol, java.lang.String industry, 264 java.lang.String type, java.lang.String size) 265 throws com.liferay.portal.kernel.exception.PortalException, 266 com.liferay.portal.kernel.exception.SystemException { 267 return getService() 268 .updateCompany(companyId, virtualHost, mx, homeURL, name, 269 legalName, legalId, legalType, sicCode, tickerSymbol, industry, 270 type, size); 271 } 272 273 /** 274 * Updates the company with addition information. 275 * 276 * @param companyId the primary key of the company 277 * @param virtualHost the company's virtual host name 278 * @param mx the company's mail domain 279 * @param homeURL the company's home URL (optionally <code>null</code>) 280 * @param name the company's account name (optionally <code>null</code>) 281 * @param legalName the company's account legal name (optionally 282 <code>null</code>) 283 * @param legalId the company's accout legal ID (optionally 284 <code>null</code>) 285 * @param legalType the company's account legal type (optionally 286 <code>null</code>) 287 * @param sicCode the company's account SIC code (optionally 288 <code>null</code>) 289 * @param tickerSymbol the company's account ticker symbol (optionally 290 <code>null</code>) 291 * @param industry the the company's account industry (optionally 292 <code>null</code>) 293 * @param type the company's account type (optionally <code>null</code>) 294 * @param size the company's account size (optionally <code>null</code>) 295 * @param languageId the ID of the company's default user's language 296 * @param timeZoneId the ID of the company's default user's time zone 297 * @param addresses the company's addresses 298 * @param emailAddresses the company's email addresses 299 * @param phones the company's phone numbers 300 * @param websites the company's websites 301 * @param properties the company's properties 302 * @return the company with the primary key 303 * @throws PortalException the company with the primary key could not be 304 found or if the new information was invalid or if the user was 305 not an administrator 306 * @throws SystemException if a system exception occurred 307 */ 308 public static com.liferay.portal.model.Company updateCompany( 309 long companyId, java.lang.String virtualHost, java.lang.String mx, 310 java.lang.String homeURL, java.lang.String name, 311 java.lang.String legalName, java.lang.String legalId, 312 java.lang.String legalType, java.lang.String sicCode, 313 java.lang.String tickerSymbol, java.lang.String industry, 314 java.lang.String type, java.lang.String size, 315 java.lang.String languageId, java.lang.String timeZoneId, 316 java.util.List<com.liferay.portal.model.Address> addresses, 317 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses, 318 java.util.List<com.liferay.portal.model.Phone> phones, 319 java.util.List<com.liferay.portal.model.Website> websites, 320 com.liferay.portal.kernel.util.UnicodeProperties properties) 321 throws com.liferay.portal.kernel.exception.PortalException, 322 com.liferay.portal.kernel.exception.SystemException { 323 return getService() 324 .updateCompany(companyId, virtualHost, mx, homeURL, name, 325 legalName, legalId, legalType, sicCode, tickerSymbol, industry, 326 type, size, languageId, timeZoneId, addresses, emailAddresses, 327 phones, websites, properties); 328 } 329 330 /** 331 * Update the company's display. 332 * 333 * @param companyId the primary key of the company 334 * @param languageId the ID of the company's default user's language 335 * @param timeZoneId the ID of the company's default user's time zone 336 * @throws PortalException if the company's default user could not be found 337 or if the user was not an administrator 338 * @throws SystemException if a system exception occurred 339 */ 340 public static void updateDisplay(long companyId, 341 java.lang.String languageId, java.lang.String timeZoneId) 342 throws com.liferay.portal.kernel.exception.PortalException, 343 com.liferay.portal.kernel.exception.SystemException { 344 getService().updateDisplay(companyId, languageId, timeZoneId); 345 } 346 347 /** 348 * Updates the company's logo. 349 * 350 * @param companyId the primary key of the company 351 * @param bytes the bytes of the company's logo image 352 * @return the company with the primary key 353 * @throws PortalException if the company's logo ID could not be found or if 354 the logo's image was corrupted or if the user was an 355 administrator 356 * @throws SystemException if a system exception occurred 357 */ 358 public static com.liferay.portal.model.Company updateLogo(long companyId, 359 byte[] bytes) 360 throws com.liferay.portal.kernel.exception.PortalException, 361 com.liferay.portal.kernel.exception.SystemException { 362 return getService().updateLogo(companyId, bytes); 363 } 364 365 /** 366 * Updates the company's logo. 367 * 368 * @param companyId the primary key of the company 369 * @param inputStream the input stream of the company's logo image 370 * @return the company with the primary key 371 * @throws PortalException if the company's logo ID could not be found or if 372 the logo's image was corrupted or if the user was an 373 administrator 374 * @throws SystemException if a system exception occurred 375 */ 376 public static com.liferay.portal.model.Company updateLogo(long companyId, 377 java.io.InputStream inputStream) 378 throws com.liferay.portal.kernel.exception.PortalException, 379 com.liferay.portal.kernel.exception.SystemException { 380 return getService().updateLogo(companyId, inputStream); 381 } 382 383 /** 384 * Updates the company's preferences. The company's default properties are 385 * found in portal.properties. 386 * 387 * @param companyId the primary key of the company 388 * @param properties the company's properties. See {@link 389 com.liferay.portal.kernel.util.UnicodeProperties} 390 * @throws PortalException if the user was not an administrator 391 * @throws SystemException if a system exception occurred 392 */ 393 public static void updatePreferences(long companyId, 394 com.liferay.portal.kernel.util.UnicodeProperties properties) 395 throws com.liferay.portal.kernel.exception.PortalException, 396 com.liferay.portal.kernel.exception.SystemException { 397 getService().updatePreferences(companyId, properties); 398 } 399 400 /** 401 * Updates the company's security properties. 402 * 403 * @param companyId the primary key of the company 404 * @param authType the company's method of authenticating users 405 * @param autoLogin whether to allow users to select the "remember me" 406 feature 407 * @param sendPassword whether to allow users to ask the company to send 408 their passwords 409 * @param strangers whether to allow strangers to create accounts to 410 register themselves in the company 411 * @param strangersWithMx whether to allow strangers to create accounts 412 with email addresses that match the company mail suffix 413 * @param strangersVerify whether to require strangers who create accounts 414 to be verified via email 415 * @param siteLogo whether to to allow site administrators to use their own 416 logo instead of the enterprise logo 417 * @throws PortalException if the user was not an administrator 418 * @throws SystemException if a system exception occurred 419 */ 420 public static void updateSecurity(long companyId, 421 java.lang.String authType, boolean autoLogin, boolean sendPassword, 422 boolean strangers, boolean strangersWithMx, boolean strangersVerify, 423 boolean siteLogo) 424 throws com.liferay.portal.kernel.exception.PortalException, 425 com.liferay.portal.kernel.exception.SystemException { 426 getService() 427 .updateSecurity(companyId, authType, autoLogin, sendPassword, 428 strangers, strangersWithMx, strangersVerify, siteLogo); 429 } 430 431 public static CompanyService getService() { 432 if (_service == null) { 433 _service = (CompanyService)PortalBeanLocatorUtil.locate(CompanyService.class.getName()); 434 435 ReferenceRegistry.registerReference(CompanyServiceUtil.class, 436 "_service"); 437 } 438 439 return _service; 440 } 441 442 /** 443 * @deprecated As of 6.2.0 444 */ 445 public void setService(CompanyService service) { 446 } 447 448 private static CompanyService _service; 449 }