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 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 433 return getService().getIndexableActionableDynamicQuery(); 434 } 435 436 /** 437 * Returns the OSGi service identifier. 438 * 439 * @return the OSGi service identifier 440 */ 441 public static java.lang.String getOSGiServiceIdentifier() { 442 return getService().getOSGiServiceIdentifier(); 443 } 444 445 public static com.liferay.portal.model.PersistedModel getPersistedModel( 446 java.io.Serializable primaryKeyObj) 447 throws com.liferay.portal.kernel.exception.PortalException { 448 return getService().getPersistedModel(primaryKeyObj); 449 } 450 451 /** 452 * Removes the values that match the keys of the company's preferences. 453 * 454 * This method is called by {@link 455 * com.liferay.portlet.portalsettings.action.EditLDAPServerAction} remotely 456 * through {@link com.liferay.portal.service.CompanyService}. 457 * 458 * @param companyId the primary key of the company 459 * @param keys the company's preferences keys to be remove 460 */ 461 public static void removePreferences(long companyId, java.lang.String[] keys) { 462 getService().removePreferences(companyId, keys); 463 } 464 465 /** 466 * Returns an ordered range of all assets that match the keywords in the 467 * company. 468 * 469 * The method is called in {@link 470 * com.liferay.portal.search.PortalOpenSearchImpl} which is not longer used 471 * by the Search portlet. 472 * 473 * @param companyId the primary key of the company 474 * @param userId the primary key of the user 475 * @param keywords the keywords (space separated),which may occur in assets 476 in the company (optionally <code>null</code>) 477 * @param start the lower bound of the range of assets to return 478 * @param end the upper bound of the range of assets to return (not 479 inclusive) 480 * @return the matching assets in the company 481 */ 482 public static com.liferay.portal.kernel.search.Hits search(long companyId, 483 long userId, java.lang.String keywords, int start, int end) { 484 return getService().search(companyId, userId, keywords, start, end); 485 } 486 487 /** 488 * Returns an ordered range of all assets that match the keywords in the 489 * portlet within the company. 490 * 491 * @param companyId the primary key of the company 492 * @param userId the primary key of the user 493 * @param portletId the primary key of the portlet (optionally 494 <code>null</code>) 495 * @param groupId the primary key of the group (optionally <code>0</code>) 496 * @param type the mime type of assets to return(optionally 497 <code>null</code>) 498 * @param keywords the keywords (space separated), which may occur in any 499 assets in the portlet (optionally <code>null</code>) 500 * @param start the lower bound of the range of assets to return 501 * @param end the upper bound of the range of assets to return (not 502 inclusive) 503 * @return the matching assets in the portlet within the company 504 */ 505 public static com.liferay.portal.kernel.search.Hits search(long companyId, 506 long userId, java.lang.String portletId, long groupId, 507 java.lang.String type, java.lang.String keywords, int start, int end) { 508 return getService() 509 .search(companyId, userId, portletId, groupId, type, 510 keywords, start, end); 511 } 512 513 /** 514 * Updates the company in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 515 * 516 * @param company the company 517 * @return the company that was updated 518 */ 519 public static com.liferay.portal.model.Company updateCompany( 520 com.liferay.portal.model.Company company) { 521 return getService().updateCompany(company); 522 } 523 524 /** 525 * Update the company with additional account information. 526 * 527 * @param companyId the primary key of the company 528 * @param virtualHostname the company's virtual host name 529 * @param mx the company's mail domain 530 * @param homeURL the company's home URL (optionally <code>null</code>) 531 * @param logo whether to update the company's logo 532 * @param logoBytes the new logo image data 533 * @param name the company's account name(optionally <code>null</code>) 534 * @param legalName the company's account legal name (optionally 535 <code>null</code>) 536 * @param legalId the company's account legal ID (optionally 537 <code>null</code>) 538 * @param legalType the company's account legal type (optionally 539 <code>null</code>) 540 * @param sicCode the company's account SIC code (optionally 541 <code>null</code>) 542 * @param tickerSymbol the company's account ticker symbol (optionally 543 <code>null</code>) 544 * @param industry the company's account industry (optionally 545 <code>null</code>) 546 * @param type the company's account type (optionally <code>null</code>) 547 * @param size the company's account size (optionally <code>null</code>) 548 * @return the company with the primary key 549 */ 550 public static com.liferay.portal.model.Company updateCompany( 551 long companyId, java.lang.String virtualHostname, java.lang.String mx, 552 java.lang.String homeURL, boolean logo, byte[] logoBytes, 553 java.lang.String name, java.lang.String legalName, 554 java.lang.String legalId, java.lang.String legalType, 555 java.lang.String sicCode, java.lang.String tickerSymbol, 556 java.lang.String industry, java.lang.String type, java.lang.String size) 557 throws com.liferay.portal.kernel.exception.PortalException { 558 return getService() 559 .updateCompany(companyId, virtualHostname, mx, homeURL, 560 logo, logoBytes, name, legalName, legalId, legalType, sicCode, 561 tickerSymbol, industry, type, size); 562 } 563 564 /** 565 * Update the company with additional account information. 566 * 567 * @param companyId the primary key of the company 568 * @param virtualHostname the company's virtual host name 569 * @param mx the company's mail domain 570 * @param homeURL the company's home URL (optionally <code>null</code>) 571 * @param name the company's account name(optionally <code>null</code>) 572 * @param legalName the company's account legal name (optionally 573 <code>null</code>) 574 * @param legalId the company's account legal ID (optionally 575 <code>null</code>) 576 * @param legalType the company's account legal type (optionally 577 <code>null</code>) 578 * @param sicCode the company's account SIC code (optionally 579 <code>null</code>) 580 * @param tickerSymbol the company's account ticker symbol (optionally 581 <code>null</code>) 582 * @param industry the company's account industry (optionally 583 <code>null</code>) 584 * @param type the company's account type (optionally 585 <code>null</code>) 586 * @param size the company's account size (optionally 587 <code>null</code>) 588 * @return the company with the primary key 589 * @deprecated As of 7.0.0, replaced by {@link #updateCompany(long, String, 590 String, String, boolean, byte[], String, String, String, 591 String, String, String, String, String, String)} 592 */ 593 @Deprecated 594 public static com.liferay.portal.model.Company updateCompany( 595 long companyId, java.lang.String virtualHostname, java.lang.String mx, 596 java.lang.String homeURL, java.lang.String name, 597 java.lang.String legalName, java.lang.String legalId, 598 java.lang.String legalType, java.lang.String sicCode, 599 java.lang.String tickerSymbol, java.lang.String industry, 600 java.lang.String type, java.lang.String size) 601 throws com.liferay.portal.kernel.exception.PortalException { 602 return getService() 603 .updateCompany(companyId, virtualHostname, mx, homeURL, 604 name, legalName, legalId, legalType, sicCode, tickerSymbol, 605 industry, type, size); 606 } 607 608 /** 609 * Updates the company. 610 * 611 * @param companyId the primary key of the company 612 * @param virtualHostname the company's virtual host name 613 * @param mx the company's mail domain 614 * @param maxUsers the max number of company users (optionally 615 <code>0</code>) 616 * @param active whether the company is active 617 * @return the company with the primary key 618 */ 619 public static com.liferay.portal.model.Company updateCompany( 620 long companyId, java.lang.String virtualHostname, java.lang.String mx, 621 int maxUsers, boolean active) 622 throws com.liferay.portal.kernel.exception.PortalException { 623 return getService() 624 .updateCompany(companyId, virtualHostname, mx, maxUsers, 625 active); 626 } 627 628 /** 629 * Update the company's display. 630 * 631 * @param companyId the primary key of the company 632 * @param languageId the ID of the company's default user's language 633 * @param timeZoneId the ID of the company's default user's time zone 634 */ 635 public static void updateDisplay(long companyId, 636 java.lang.String languageId, java.lang.String timeZoneId) 637 throws com.liferay.portal.kernel.exception.PortalException { 638 getService().updateDisplay(companyId, languageId, timeZoneId); 639 } 640 641 /** 642 * Updates the company's logo. 643 * 644 * @param companyId the primary key of the company 645 * @param bytes the bytes of the company's logo image 646 * @return the company with the primary key 647 */ 648 public static com.liferay.portal.model.Company updateLogo(long companyId, 649 byte[] bytes) 650 throws com.liferay.portal.kernel.exception.PortalException { 651 return getService().updateLogo(companyId, bytes); 652 } 653 654 /** 655 * Updates the company's logo. 656 * 657 * @param companyId the primary key of the company 658 * @param file the file of the company's logo image 659 * @return the company with the primary key 660 */ 661 public static com.liferay.portal.model.Company updateLogo(long companyId, 662 java.io.File file) 663 throws com.liferay.portal.kernel.exception.PortalException { 664 return getService().updateLogo(companyId, file); 665 } 666 667 /** 668 * Update the company's logo. 669 * 670 * @param companyId the primary key of the company 671 * @param is the input stream of the company's logo image 672 * @return the company with the primary key 673 */ 674 public static com.liferay.portal.model.Company updateLogo(long companyId, 675 java.io.InputStream is) 676 throws com.liferay.portal.kernel.exception.PortalException { 677 return getService().updateLogo(companyId, is); 678 } 679 680 /** 681 * Updates the company's preferences. The company's default properties are 682 * found in portal.properties. 683 * 684 * @param companyId the primary key of the company 685 * @param properties the company's properties. See {@link UnicodeProperties} 686 */ 687 public static void updatePreferences(long companyId, 688 com.liferay.portal.kernel.util.UnicodeProperties properties) 689 throws com.liferay.portal.kernel.exception.PortalException { 690 getService().updatePreferences(companyId, properties); 691 } 692 693 /** 694 * Updates the company's security properties. 695 * 696 * @param companyId the primary key of the company 697 * @param authType the company's method of authenticating users 698 * @param autoLogin whether to allow users to select the "remember me" 699 feature 700 * @param sendPassword whether to allow users to ask the company to send 701 their password 702 * @param strangers whether to allow strangers to create accounts register 703 themselves in the company 704 * @param strangersWithMx whether to allow strangers to create accounts with 705 email addresses that match the company mail suffix 706 * @param strangersVerify whether to require strangers who create accounts 707 to be verified via email 708 * @param siteLogo whether to allow site administrators to use their own 709 logo instead of the enterprise logo 710 */ 711 public static void updateSecurity(long companyId, 712 java.lang.String authType, boolean autoLogin, boolean sendPassword, 713 boolean strangers, boolean strangersWithMx, boolean strangersVerify, 714 boolean siteLogo) { 715 getService() 716 .updateSecurity(companyId, authType, autoLogin, sendPassword, 717 strangers, strangersWithMx, strangersVerify, siteLogo); 718 } 719 720 public static CompanyLocalService getService() { 721 if (_service == null) { 722 _service = (CompanyLocalService)PortalBeanLocatorUtil.locate(CompanyLocalService.class.getName()); 723 724 ReferenceRegistry.registerReference(CompanyLocalServiceUtil.class, 725 "_service"); 726 } 727 728 return _service; 729 } 730 731 private static CompanyLocalService _service; 732 }