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