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