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