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