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