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.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 local service utility for Company. This utility wraps 024 * {@link com.liferay.portal.service.impl.CompanyLocalServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on the local server. Methods of this service will not have security checks 027 * based on the propagated JAAS credentials because this service can only be 028 * accessed from within the same VM. 029 * 030 * @author Brian Wing Shun Chan 031 * @see CompanyLocalService 032 * @see com.liferay.portal.service.base.CompanyLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.CompanyLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class CompanyLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.CompanyLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the company to the database. Also notifies the appropriate model listeners. 046 * 047 * @param company the company 048 * @return the company that was added 049 */ 050 public static com.liferay.portal.model.Company addCompany( 051 com.liferay.portal.model.Company company) { 052 return getService().addCompany(company); 053 } 054 055 /** 056 * Adds a company. 057 * 058 * @param webId the the company's web domain 059 * @param virtualHostname the company's virtual host name 060 * @param mx the company's mail domain 061 * @param shardName the company's shard 062 * @param system whether the company is the very first company (i.e., the 063 super company) 064 * @param maxUsers the max number of company users (optionally 065 <code>0</code>) 066 * @param active whether the company is active 067 * @return the company 068 * @throws PortalException if the web domain, virtual host name, or mail 069 domain was invalid 070 */ 071 public static com.liferay.portal.model.Company addCompany( 072 java.lang.String webId, java.lang.String virtualHostname, 073 java.lang.String mx, java.lang.String shardName, boolean system, 074 int maxUsers, boolean active) 075 throws com.liferay.portal.kernel.exception.PortalException { 076 return getService() 077 .addCompany(webId, virtualHostname, mx, shardName, system, 078 maxUsers, active); 079 } 080 081 /** 082 * Returns the company with the web domain. 083 * 084 * The method sets mail domain to the web domain, and the shard name to 085 * the default name set in portal.properties 086 * 087 * @param webId the company's web domain 088 * @return the company with the web domain 089 * @throws PortalException if a portal exception occurred 090 */ 091 public static com.liferay.portal.model.Company checkCompany( 092 java.lang.String webId) 093 throws com.liferay.portal.kernel.exception.PortalException { 094 return getService().checkCompany(webId); 095 } 096 097 /** 098 * Returns the company with the web domain, mail domain, and shard. If no 099 * such company exits, the method will create a new company. 100 * 101 * The method goes through a series of checks to ensure that the company 102 * contains default users, groups, etc. 103 * 104 * @param webId the company's web domain 105 * @param mx the company's mail domain 106 * @param shardName the company's shard 107 * @return the company with the web domain, mail domain, and shard 108 * @throws PortalException if a portal exception occurred 109 */ 110 public static com.liferay.portal.model.Company checkCompany( 111 java.lang.String webId, java.lang.String mx, java.lang.String shardName) 112 throws com.liferay.portal.kernel.exception.PortalException { 113 return getService().checkCompany(webId, mx, shardName); 114 } 115 116 /** 117 * Checks if the company has an encryption key. It will create a key if one 118 * does not exist. 119 * 120 * @param companyId the primary key of the company 121 * @throws PortalException if a company with the primary key could not be 122 found 123 */ 124 public static void checkCompanyKey(long companyId) 125 throws com.liferay.portal.kernel.exception.PortalException { 126 getService().checkCompanyKey(companyId); 127 } 128 129 /** 130 * Creates a new company with the primary key. Does not add the company to the database. 131 * 132 * @param companyId the primary key for the new company 133 * @return the new company 134 */ 135 public static com.liferay.portal.model.Company createCompany(long companyId) { 136 return getService().createCompany(companyId); 137 } 138 139 /** 140 * Deletes the company from the database. Also notifies the appropriate model listeners. 141 * 142 * @param company the company 143 * @return the company that was removed 144 * @throws PortalException 145 */ 146 public static com.liferay.portal.model.Company deleteCompany( 147 com.liferay.portal.model.Company company) 148 throws com.liferay.portal.kernel.exception.PortalException { 149 return getService().deleteCompany(company); 150 } 151 152 /** 153 * Deletes the company with the primary key from the database. Also notifies the appropriate model listeners. 154 * 155 * @param companyId the primary key of the company 156 * @return the company that was removed 157 * @throws PortalException if a company with the primary key could not be found 158 */ 159 public static com.liferay.portal.model.Company deleteCompany(long companyId) 160 throws com.liferay.portal.kernel.exception.PortalException { 161 return getService().deleteCompany(companyId); 162 } 163 164 /** 165 * Deletes the company's logo. 166 * 167 * @param companyId the primary key of the company 168 * @return the deleted logo's company 169 * @throws PortalException if the company with the primary key could not be 170 found or if the company's logo could not be found 171 */ 172 public static com.liferay.portal.model.Company deleteLogo(long companyId) 173 throws com.liferay.portal.kernel.exception.PortalException { 174 return getService().deleteLogo(companyId); 175 } 176 177 /** 178 * @throws PortalException 179 */ 180 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 181 com.liferay.portal.model.PersistedModel persistedModel) 182 throws com.liferay.portal.kernel.exception.PortalException { 183 return getService().deletePersistedModel(persistedModel); 184 } 185 186 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 187 return getService().dynamicQuery(); 188 } 189 190 /** 191 * Performs a dynamic query on the database and returns the matching rows. 192 * 193 * @param dynamicQuery the dynamic query 194 * @return the matching rows 195 */ 196 public static <T> java.util.List<T> dynamicQuery( 197 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 198 return getService().dynamicQuery(dynamicQuery); 199 } 200 201 /** 202 * Performs a dynamic query on the database and returns a range of the matching rows. 203 * 204 * <p> 205 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.CompanyModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 206 * </p> 207 * 208 * @param dynamicQuery the dynamic query 209 * @param start the lower bound of the range of model instances 210 * @param end the upper bound of the range of model instances (not inclusive) 211 * @return the range of matching rows 212 */ 213 public static <T> java.util.List<T> dynamicQuery( 214 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 215 int end) { 216 return getService().dynamicQuery(dynamicQuery, start, end); 217 } 218 219 /** 220 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 221 * 222 * <p> 223 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.CompanyModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 224 * </p> 225 * 226 * @param dynamicQuery the dynamic query 227 * @param start the lower bound of the range of model instances 228 * @param end the upper bound of the range of model instances (not inclusive) 229 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 230 * @return the ordered range of matching rows 231 */ 232 public static <T> java.util.List<T> dynamicQuery( 233 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 234 int end, 235 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 236 return getService() 237 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 238 } 239 240 /** 241 * Returns the number of rows matching the dynamic query. 242 * 243 * @param dynamicQuery the dynamic query 244 * @return the number of rows matching the dynamic query 245 */ 246 public static long dynamicQueryCount( 247 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 248 return getService().dynamicQueryCount(dynamicQuery); 249 } 250 251 /** 252 * Returns the number of rows matching the dynamic query. 253 * 254 * @param dynamicQuery the dynamic query 255 * @param projection the projection to apply to the query 256 * @return the number of rows matching the dynamic query 257 */ 258 public static long dynamicQueryCount( 259 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 260 com.liferay.portal.kernel.dao.orm.Projection projection) { 261 return getService().dynamicQueryCount(dynamicQuery, projection); 262 } 263 264 public static com.liferay.portal.model.Company fetchCompany(long companyId) { 265 return getService().fetchCompany(companyId); 266 } 267 268 /** 269 * Returns the company with the primary key. 270 * 271 * @param companyId the primary key of the company 272 * @return the company with the primary key, <code>null</code> if a company 273 with the primary key could not be found 274 */ 275 public static com.liferay.portal.model.Company fetchCompanyById( 276 long companyId) { 277 return getService().fetchCompanyById(companyId); 278 } 279 280 /** 281 * Returns the company with the virtual host name. 282 * 283 * @param virtualHostname the virtual host name 284 * @return the company with the virtual host name, <code>null</code> if a 285 company with the virtual host could not be found 286 */ 287 public static com.liferay.portal.model.Company fetchCompanyByVirtualHost( 288 java.lang.String virtualHostname) { 289 return getService().fetchCompanyByVirtualHost(virtualHostname); 290 } 291 292 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 293 return getService().getActionableDynamicQuery(); 294 } 295 296 /** 297 * Returns the Spring bean ID for this bean. 298 * 299 * @return the Spring bean ID for this bean 300 */ 301 public static java.lang.String getBeanIdentifier() { 302 return getService().getBeanIdentifier(); 303 } 304 305 /** 306 * Returns all the companies. 307 * 308 * @return the companies 309 */ 310 public static java.util.List<com.liferay.portal.model.Company> getCompanies() { 311 return getService().getCompanies(); 312 } 313 314 /** 315 * Returns a range of all the companies. 316 * 317 * <p> 318 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.CompanyModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 319 * </p> 320 * 321 * @param start the lower bound of the range of companies 322 * @param end the upper bound of the range of companies (not inclusive) 323 * @return the range of companies 324 */ 325 public static java.util.List<com.liferay.portal.model.Company> getCompanies( 326 int start, int end) { 327 return getService().getCompanies(start, end); 328 } 329 330 /** 331 * Returns all the companies used by WSRP. 332 * 333 * @param system whether the company is the very first company (i.e., the 334 super company) 335 * @return the companies used by WSRP 336 */ 337 public static java.util.List<com.liferay.portal.model.Company> getCompanies( 338 boolean system) { 339 return getService().getCompanies(system); 340 } 341 342 public static java.util.List<com.liferay.portal.model.Company> getCompanies( 343 boolean system, int start, int end) { 344 return getService().getCompanies(system, start, end); 345 } 346 347 /** 348 * Returns the number of companies. 349 * 350 * @return the number of companies 351 */ 352 public static int getCompaniesCount() { 353 return getService().getCompaniesCount(); 354 } 355 356 /** 357 * Returns the number of companies used by WSRP. 358 * 359 * @param system whether the company is the very first company (i.e., the 360 super company) 361 * @return the number of companies used by WSRP 362 */ 363 public static int getCompaniesCount(boolean system) { 364 return getService().getCompaniesCount(system); 365 } 366 367 /** 368 * Returns the company with the primary key. 369 * 370 * @param companyId the primary key of the company 371 * @return the company 372 * @throws PortalException if a company with the primary key could not be found 373 */ 374 public static com.liferay.portal.model.Company getCompany(long companyId) 375 throws com.liferay.portal.kernel.exception.PortalException { 376 return getService().getCompany(companyId); 377 } 378 379 /** 380 * Returns the company with the primary key. 381 * 382 * @param companyId the primary key of the company 383 * @return the company with the primary key 384 * @throws PortalException if a company with the primary key could not be 385 found 386 */ 387 public static com.liferay.portal.model.Company getCompanyById( 388 long companyId) 389 throws com.liferay.portal.kernel.exception.PortalException { 390 return getService().getCompanyById(companyId); 391 } 392 393 /** 394 * Returns the company with the logo. 395 * 396 * @param logoId the ID of the company's logo 397 * @return the company with the logo 398 * @throws PortalException if the company with the logo could not be found 399 */ 400 public static com.liferay.portal.model.Company getCompanyByLogoId( 401 long logoId) throws com.liferay.portal.kernel.exception.PortalException { 402 return getService().getCompanyByLogoId(logoId); 403 } 404 405 /** 406 * Returns the company with the mail domain. 407 * 408 * @param mx the company's mail domain 409 * @return the company with the mail domain 410 * @throws PortalException if the company with the mail domain could not be 411 found 412 */ 413 public static com.liferay.portal.model.Company getCompanyByMx( 414 java.lang.String mx) 415 throws com.liferay.portal.kernel.exception.PortalException { 416 return getService().getCompanyByMx(mx); 417 } 418 419 /** 420 * Returns the company with the virtual host name. 421 * 422 * @param virtualHostname the company's virtual host name 423 * @return the company with the virtual host name 424 * @throws PortalException if the company with the virtual host name could 425 not be found or if the virtual host was not associated with a 426 company 427 */ 428 public static com.liferay.portal.model.Company getCompanyByVirtualHost( 429 java.lang.String virtualHostname) 430 throws com.liferay.portal.kernel.exception.PortalException { 431 return getService().getCompanyByVirtualHost(virtualHostname); 432 } 433 434 /** 435 * Returns the company with the web domain. 436 * 437 * @param webId the company's web domain 438 * @return the company with the web domain 439 * @throws PortalException if the company with the web domain could not be 440 found 441 */ 442 public static com.liferay.portal.model.Company getCompanyByWebId( 443 java.lang.String webId) 444 throws com.liferay.portal.kernel.exception.PortalException { 445 return getService().getCompanyByWebId(webId); 446 } 447 448 /** 449 * Returns the user's company. 450 * 451 * @param userId the primary key of the user 452 * @return Returns the first company if there is only one company or the 453 user's company if there are more than one company; <code>0</code> 454 otherwise 455 * @throws Exception if a user with the primary key could not be found 456 */ 457 public static long getCompanyIdByUserId(long userId) 458 throws java.lang.Exception { 459 return getService().getCompanyIdByUserId(userId); 460 } 461 462 public static com.liferay.portal.model.PersistedModel getPersistedModel( 463 java.io.Serializable primaryKeyObj) 464 throws com.liferay.portal.kernel.exception.PortalException { 465 return getService().getPersistedModel(primaryKeyObj); 466 } 467 468 /** 469 * Removes the values that match the keys of the company's preferences. 470 * 471 * This method is called by {@link 472 * com.liferay.portlet.portalsettings.action.EditLDAPServerAction} remotely 473 * through {@link com.liferay.portal.service.CompanyService}. 474 * 475 * @param companyId the primary key of the company 476 * @param keys the company's preferences keys to be remove 477 */ 478 public static void removePreferences(long companyId, java.lang.String[] keys) { 479 getService().removePreferences(companyId, keys); 480 } 481 482 /** 483 * Returns an ordered range of all assets that match the keywords in the 484 * company. 485 * 486 * The method is called in {@link 487 * com.liferay.portal.search.PortalOpenSearchImpl} which is not longer used 488 * by the Search portlet. 489 * 490 * @param companyId the primary key of the company 491 * @param userId the primary key of the user 492 * @param keywords the keywords (space separated),which may occur in assets 493 in the company (optionally <code>null</code>) 494 * @param start the lower bound of the range of assets to return 495 * @param end the upper bound of the range of assets to return (not 496 inclusive) 497 * @return the matching assets in the company 498 */ 499 public static com.liferay.portal.kernel.search.Hits search(long companyId, 500 long userId, java.lang.String keywords, int start, int end) { 501 return getService().search(companyId, userId, keywords, start, end); 502 } 503 504 /** 505 * Returns an ordered range of all assets that match the keywords in the 506 * portlet within the company. 507 * 508 * @param companyId the primary key of the company 509 * @param userId the primary key of the user 510 * @param portletId the primary key of the portlet (optionally 511 <code>null</code>) 512 * @param groupId the primary key of the group (optionally <code>0</code>) 513 * @param type the mime type of assets to return(optionally 514 <code>null</code>) 515 * @param keywords the keywords (space separated), which may occur in any 516 assets in the portlet (optionally <code>null</code>) 517 * @param start the lower bound of the range of assets to return 518 * @param end the upper bound of the range of assets to return (not 519 inclusive) 520 * @return the matching assets in the portlet within the company 521 */ 522 public static com.liferay.portal.kernel.search.Hits search(long companyId, 523 long userId, java.lang.String portletId, long groupId, 524 java.lang.String type, java.lang.String keywords, int start, int end) { 525 return getService() 526 .search(companyId, userId, portletId, groupId, type, 527 keywords, start, end); 528 } 529 530 /** 531 * Sets the Spring bean ID for this bean. 532 * 533 * @param beanIdentifier the Spring bean ID for this bean 534 */ 535 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 536 getService().setBeanIdentifier(beanIdentifier); 537 } 538 539 /** 540 * Updates the company in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 541 * 542 * @param company the company 543 * @return the company that was updated 544 */ 545 public static com.liferay.portal.model.Company updateCompany( 546 com.liferay.portal.model.Company company) { 547 return getService().updateCompany(company); 548 } 549 550 /** 551 * Update the company with additional account information. 552 * 553 * @param companyId the primary key of the company 554 * @param virtualHostname the company's virtual host name 555 * @param mx the company's mail domain 556 * @param homeURL the company's home URL (optionally <code>null</code>) 557 * @param logo whether to update the company's logo 558 * @param logoBytes the new logo image data 559 * @param name the company's account name(optionally <code>null</code>) 560 * @param legalName the company's account legal name (optionally 561 <code>null</code>) 562 * @param legalId the company's account legal ID (optionally 563 <code>null</code>) 564 * @param legalType the company's account legal type (optionally 565 <code>null</code>) 566 * @param sicCode the company's account SIC code (optionally 567 <code>null</code>) 568 * @param tickerSymbol the company's account ticker symbol (optionally 569 <code>null</code>) 570 * @param industry the company's account industry (optionally 571 <code>null</code>) 572 * @param type the company's account type (optionally <code>null</code>) 573 * @param size the company's account size (optionally <code>null</code>) 574 * @return the company with the primary key 575 * @throws PortalException if a company with the primary key could not be 576 found or if the new information was invalid 577 */ 578 public static com.liferay.portal.model.Company updateCompany( 579 long companyId, java.lang.String virtualHostname, java.lang.String mx, 580 java.lang.String homeURL, boolean logo, byte[] logoBytes, 581 java.lang.String name, java.lang.String legalName, 582 java.lang.String legalId, java.lang.String legalType, 583 java.lang.String sicCode, java.lang.String tickerSymbol, 584 java.lang.String industry, java.lang.String type, java.lang.String size) 585 throws com.liferay.portal.kernel.exception.PortalException { 586 return getService() 587 .updateCompany(companyId, virtualHostname, mx, homeURL, 588 logo, logoBytes, name, legalName, legalId, legalType, sicCode, 589 tickerSymbol, industry, type, size); 590 } 591 592 /** 593 * Update the company with additional account information. 594 * 595 * @param companyId the primary key of the company 596 * @param virtualHostname the company's virtual host name 597 * @param mx the company's mail domain 598 * @param homeURL the company's home URL (optionally <code>null</code>) 599 * @param name the company's account name(optionally <code>null</code>) 600 * @param legalName the company's account legal name (optionally 601 <code>null</code>) 602 * @param legalId the company's account legal ID (optionally 603 <code>null</code>) 604 * @param legalType the company's account legal type (optionally 605 <code>null</code>) 606 * @param sicCode the company's account SIC code (optionally 607 <code>null</code>) 608 * @param tickerSymbol the company's account ticker symbol (optionally 609 <code>null</code>) 610 * @param industry the company's account industry (optionally 611 <code>null</code>) 612 * @param type the company's account type (optionally 613 <code>null</code>) 614 * @param size the company's account size (optionally 615 <code>null</code>) 616 * @return the company with the primary key 617 * @throws PortalException if a company with the primary key could not 618 be found or if the new information was invalid 619 * @deprecated As of 7.0.0, replaced by {@link #updateCompany(long, String, 620 String, String, boolean, byte[], String, String, String, 621 String, String, String, String, String, String)} 622 */ 623 @Deprecated 624 public static com.liferay.portal.model.Company updateCompany( 625 long companyId, java.lang.String virtualHostname, java.lang.String mx, 626 java.lang.String homeURL, java.lang.String name, 627 java.lang.String legalName, java.lang.String legalId, 628 java.lang.String legalType, java.lang.String sicCode, 629 java.lang.String tickerSymbol, java.lang.String industry, 630 java.lang.String type, java.lang.String size) 631 throws com.liferay.portal.kernel.exception.PortalException { 632 return getService() 633 .updateCompany(companyId, virtualHostname, mx, homeURL, 634 name, legalName, legalId, legalType, sicCode, tickerSymbol, 635 industry, type, size); 636 } 637 638 /** 639 * Updates the company. 640 * 641 * @param companyId the primary key of the company 642 * @param virtualHostname the company's virtual host name 643 * @param mx the company's mail domain 644 * @param maxUsers the max number of company users (optionally 645 <code>0</code>) 646 * @param active whether the company is active 647 * @return the company with the primary key 648 * @throws PortalException if a company with primary key could not be found 649 or if the new information was invalid 650 */ 651 public static com.liferay.portal.model.Company updateCompany( 652 long companyId, java.lang.String virtualHostname, java.lang.String mx, 653 int maxUsers, boolean active) 654 throws com.liferay.portal.kernel.exception.PortalException { 655 return getService() 656 .updateCompany(companyId, virtualHostname, mx, maxUsers, 657 active); 658 } 659 660 /** 661 * Update the company's display. 662 * 663 * @param companyId the primary key of the company 664 * @param languageId the ID of the company's default user's language 665 * @param timeZoneId the ID of the company's default user's time zone 666 * @throws PortalException if the company's default user could not be found 667 */ 668 public static void updateDisplay(long companyId, 669 java.lang.String languageId, java.lang.String timeZoneId) 670 throws com.liferay.portal.kernel.exception.PortalException { 671 getService().updateDisplay(companyId, languageId, timeZoneId); 672 } 673 674 /** 675 * Updates the company's logo. 676 * 677 * @param companyId the primary key of the company 678 * @param bytes the bytes of the company's logo image 679 * @return the company with the primary key 680 * @throws PortalException if the company's logo ID could not be found or if 681 the logo's image was corrupted 682 */ 683 public static com.liferay.portal.model.Company updateLogo(long companyId, 684 byte[] bytes) 685 throws com.liferay.portal.kernel.exception.PortalException { 686 return getService().updateLogo(companyId, bytes); 687 } 688 689 /** 690 * Updates the company's logo. 691 * 692 * @param companyId the primary key of the company 693 * @param file the file of the company's logo image 694 * @return the company with the primary key 695 * @throws PortalException the company's logo ID could not be found or if 696 the logo's image was corrupted 697 */ 698 public static com.liferay.portal.model.Company updateLogo(long companyId, 699 java.io.File file) 700 throws com.liferay.portal.kernel.exception.PortalException { 701 return getService().updateLogo(companyId, file); 702 } 703 704 /** 705 * Update the company's logo. 706 * 707 * @param companyId the primary key of the company 708 * @param is the input stream of the company's logo image 709 * @return the company with the primary key 710 * @throws PortalException if the company's logo ID could not be found or if 711 the company's logo image was corrupted 712 */ 713 public static com.liferay.portal.model.Company updateLogo(long companyId, 714 java.io.InputStream is) 715 throws com.liferay.portal.kernel.exception.PortalException { 716 return getService().updateLogo(companyId, is); 717 } 718 719 /** 720 * Updates the company's preferences. The company's default properties are 721 * found in portal.properties. 722 * 723 * @param companyId the primary key of the company 724 * @param properties the company's properties. See {@link 725 com.liferay.portal.kernel.util.UnicodeProperties} 726 * @throws PortalException if the properties contained new locales that were 727 not supported 728 */ 729 public static void updatePreferences(long companyId, 730 com.liferay.portal.kernel.util.UnicodeProperties properties) 731 throws com.liferay.portal.kernel.exception.PortalException { 732 getService().updatePreferences(companyId, properties); 733 } 734 735 /** 736 * Updates the company's security properties. 737 * 738 * @param companyId the primary key of the company 739 * @param authType the company's method of authenticating users 740 * @param autoLogin whether to allow users to select the "remember me" 741 feature 742 * @param sendPassword whether to allow users to ask the company to send 743 their password 744 * @param strangers whether to allow strangers to create accounts register 745 themselves in the company 746 * @param strangersWithMx whether to allow strangers to create accounts with 747 email addresses that match the company mail suffix 748 * @param strangersVerify whether to require strangers who create accounts 749 to be verified via email 750 * @param siteLogo whether to allow site administrators to use their own 751 logo instead of the enterprise logo 752 */ 753 public static void updateSecurity(long companyId, 754 java.lang.String authType, boolean autoLogin, boolean sendPassword, 755 boolean strangers, boolean strangersWithMx, boolean strangersVerify, 756 boolean siteLogo) { 757 getService() 758 .updateSecurity(companyId, authType, autoLogin, sendPassword, 759 strangers, strangersWithMx, strangersVerify, siteLogo); 760 } 761 762 public static CompanyLocalService getService() { 763 if (_service == null) { 764 _service = (CompanyLocalService)PortalBeanLocatorUtil.locate(CompanyLocalService.class.getName()); 765 766 ReferenceRegistry.registerReference(CompanyLocalServiceUtil.class, 767 "_service"); 768 } 769 770 return _service; 771 } 772 773 /** 774 * @deprecated As of 6.2.0 775 */ 776 @Deprecated 777 public void setService(CompanyLocalService service) { 778 } 779 780 private static CompanyLocalService _service; 781 }