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.exception.PortalException; 020 import com.liferay.portal.kernel.exception.SystemException; 021 import com.liferay.portal.kernel.jsonwebservice.JSONWebService; 022 import com.liferay.portal.kernel.jsonwebservice.JSONWebServiceMode; 023 import com.liferay.portal.kernel.transaction.Isolation; 024 import com.liferay.portal.kernel.transaction.Propagation; 025 import com.liferay.portal.kernel.transaction.Transactional; 026 import com.liferay.portal.security.ac.AccessControlled; 027 028 /** 029 * Provides the remote service interface for Company. Methods of this 030 * service are expected to have security checks based on the propagated JAAS 031 * credentials because this service can be accessed remotely. 032 * 033 * @author Brian Wing Shun Chan 034 * @see CompanyServiceUtil 035 * @see com.liferay.portal.service.base.CompanyServiceBaseImpl 036 * @see com.liferay.portal.service.impl.CompanyServiceImpl 037 * @generated 038 */ 039 @AccessControlled 040 @JSONWebService 041 @ProviderType 042 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 043 PortalException.class, SystemException.class}) 044 public interface CompanyService extends BaseService { 045 /* 046 * NOTE FOR DEVELOPERS: 047 * 048 * Never modify or reference this interface directly. Always use {@link CompanyServiceUtil} to access the company remote service. Add custom service methods to {@link com.liferay.portal.service.impl.CompanyServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 049 */ 050 051 /** 052 * Adds a company. 053 * 054 * @param webId the company's web domain 055 * @param virtualHost the company's virtual host name 056 * @param mx the company's mail domain 057 * @param shardName the company's shard 058 * @param system whether the company is the very first company (i.e., the 059 * @param maxUsers the max number of company users (optionally 060 <code>0</code>) 061 * @param active whether the company is active 062 * @return the company 063 * @throws PortalException if the web domain, virtual host name, or mail 064 domain was invalid or if the user was not a universal 065 administrator 066 */ 067 @com.liferay.portal.kernel.jsonwebservice.JSONWebService(mode = JSONWebServiceMode.IGNORE) 068 public com.liferay.portal.model.Company addCompany(java.lang.String webId, 069 java.lang.String virtualHost, java.lang.String mx, 070 java.lang.String shardName, boolean system, int maxUsers, boolean active) 071 throws com.liferay.portal.kernel.exception.PortalException; 072 073 @com.liferay.portal.kernel.jsonwebservice.JSONWebService(mode = JSONWebServiceMode.IGNORE) 074 public com.liferay.portal.model.Company deleteCompany(long companyId) 075 throws com.liferay.portal.kernel.exception.PortalException; 076 077 /** 078 * Deletes the company's logo. 079 * 080 * @param companyId the primary key of the company 081 * @throws PortalException if the company with the primary key could not be 082 found or if the company's logo could not be found or if the user 083 was not an administrator 084 */ 085 public void deleteLogo(long companyId) 086 throws com.liferay.portal.kernel.exception.PortalException; 087 088 /** 089 * Returns the Spring bean ID for this bean. 090 * 091 * @return the Spring bean ID for this bean 092 */ 093 public java.lang.String getBeanIdentifier(); 094 095 /** 096 * Returns the company with the primary key. 097 * 098 * @param companyId the primary key of the company 099 * @return Returns the company with the primary key 100 * @throws PortalException if a company with the primary key could not be 101 found 102 */ 103 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 104 public com.liferay.portal.model.Company getCompanyById(long companyId) 105 throws com.liferay.portal.kernel.exception.PortalException; 106 107 /** 108 * Returns the company with the logo. 109 * 110 * @param logoId the ID of the company's logo 111 * @return Returns the company with the logo 112 * @throws PortalException if the company with the logo could not be found 113 */ 114 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 115 public com.liferay.portal.model.Company getCompanyByLogoId(long logoId) 116 throws com.liferay.portal.kernel.exception.PortalException; 117 118 /** 119 * Returns the company with the mail domian. 120 * 121 * @param mx the company's mail domain 122 * @return Returns the company with the mail domain 123 * @throws PortalException if the company with the mail domain could not be 124 found 125 */ 126 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 127 public com.liferay.portal.model.Company getCompanyByMx(java.lang.String mx) 128 throws com.liferay.portal.kernel.exception.PortalException; 129 130 /** 131 * Returns the company with the virtual host name. 132 * 133 * @param virtualHost the company's virtual host name 134 * @return Returns the company with the virtual host name 135 * @throws PortalException if the company with the virtual host name could 136 not be found or if the virtual host was not associated with a 137 company 138 */ 139 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 140 public com.liferay.portal.model.Company getCompanyByVirtualHost( 141 java.lang.String virtualHost) 142 throws com.liferay.portal.kernel.exception.PortalException; 143 144 /** 145 * Returns the company with the web domain. 146 * 147 * @param webId the company's web domain 148 * @return Returns the company with the web domain 149 * @throws PortalException if the company with the web domain could not be 150 found 151 */ 152 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 153 public com.liferay.portal.model.Company getCompanyByWebId( 154 java.lang.String webId) 155 throws com.liferay.portal.kernel.exception.PortalException; 156 157 /** 158 * Removes the values that match the keys of the company's preferences. 159 * 160 * This method is called by {@link 161 * com.liferay.portlet.portalsettings.action.EditLDAPServerAction} remotely 162 * through {@link com.liferay.portal.service.CompanyService}. 163 * 164 * @param companyId the primary key of the company 165 * @param keys the company's preferences keys to be remove 166 * @throws PortalException if the user was not an administrator 167 */ 168 @com.liferay.portal.kernel.jsonwebservice.JSONWebService(mode = JSONWebServiceMode.IGNORE) 169 public void removePreferences(long companyId, java.lang.String[] keys) 170 throws com.liferay.portal.kernel.exception.PortalException; 171 172 /** 173 * Sets the Spring bean ID for this bean. 174 * 175 * @param beanIdentifier the Spring bean ID for this bean 176 */ 177 public void setBeanIdentifier(java.lang.String beanIdentifier); 178 179 /** 180 * Updates the company with additional account information. 181 * 182 * @param companyId the primary key of the company 183 * @param virtualHost the company's virtual host name 184 * @param mx the company's mail domain 185 * @param homeURL the company's home URL (optionally <code>null</code>) 186 * @param logo whether to update the company's logo 187 * @param logoBytes the new logo image data 188 * @param name the company's account name (optionally <code>null</code>) 189 * @param legalName the company's account legal name (optionally 190 <code>null</code>) 191 * @param legalId the company's account legal ID (optionally 192 <code>null</code>) 193 * @param legalType the company's account legal type (optionally 194 <code>null</code>) 195 * @param sicCode the company's account SIC code (optionally 196 <code>null</code>) 197 * @param tickerSymbol the company's account ticker symbol (optionally 198 <code>null</code>) 199 * @param industry the the company's account industry (optionally 200 <code>null</code>) 201 * @param type the company's account type (optionally <code>null</code>) 202 * @param size the company's account size (optionally <code>null</code>) 203 * @return the the company with the primary key 204 * @throws PortalException if a company with the primary key could not be 205 found or if the new information was invalid or if the user was 206 not an administrator 207 */ 208 public com.liferay.portal.model.Company updateCompany(long companyId, 209 java.lang.String virtualHost, java.lang.String mx, 210 java.lang.String homeURL, boolean logo, byte[] logoBytes, 211 java.lang.String name, java.lang.String legalName, 212 java.lang.String legalId, java.lang.String legalType, 213 java.lang.String sicCode, java.lang.String tickerSymbol, 214 java.lang.String industry, java.lang.String type, java.lang.String size) 215 throws com.liferay.portal.kernel.exception.PortalException; 216 217 /** 218 * Updates the company with addition information. 219 * 220 * @param companyId the primary key of the company 221 * @param virtualHost the company's virtual host name 222 * @param mx the company's mail domain 223 * @param homeURL the company's home URL (optionally <code>null</code>) 224 * @param logo if the company has a custom logo 225 * @param logoBytes the new logo image data 226 * @param name the company's account name (optionally <code>null</code>) 227 * @param legalName the company's account legal name (optionally 228 <code>null</code>) 229 * @param legalId the company's accout legal ID (optionally 230 <code>null</code>) 231 * @param legalType the company's account legal type (optionally 232 <code>null</code>) 233 * @param sicCode the company's account SIC code (optionally 234 <code>null</code>) 235 * @param tickerSymbol the company's account ticker symbol (optionally 236 <code>null</code>) 237 * @param industry the the company's account industry (optionally 238 <code>null</code>) 239 * @param type the company's account type (optionally <code>null</code>) 240 * @param size the company's account size (optionally <code>null</code>) 241 * @param languageId the ID of the company's default user's language 242 * @param timeZoneId the ID of the company's default user's time zone 243 * @param addresses the company's addresses 244 * @param emailAddresses the company's email addresses 245 * @param phones the company's phone numbers 246 * @param websites the company's websites 247 * @param properties the company's properties 248 * @return the company with the primary key 249 * @throws PortalException the company with the primary key could not be 250 found or if the new information was invalid or if the user was 251 not an administrator 252 */ 253 @com.liferay.portal.kernel.jsonwebservice.JSONWebService(mode = JSONWebServiceMode.IGNORE) 254 public com.liferay.portal.model.Company updateCompany(long companyId, 255 java.lang.String virtualHost, java.lang.String mx, 256 java.lang.String homeURL, boolean logo, byte[] logoBytes, 257 java.lang.String name, java.lang.String legalName, 258 java.lang.String legalId, java.lang.String legalType, 259 java.lang.String sicCode, java.lang.String tickerSymbol, 260 java.lang.String industry, java.lang.String type, 261 java.lang.String size, java.lang.String languageId, 262 java.lang.String timeZoneId, 263 java.util.List<com.liferay.portal.model.Address> addresses, 264 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses, 265 java.util.List<com.liferay.portal.model.Phone> phones, 266 java.util.List<com.liferay.portal.model.Website> websites, 267 com.liferay.portal.kernel.util.UnicodeProperties properties) 268 throws com.liferay.portal.kernel.exception.PortalException; 269 270 /** 271 * Updates the company with additional account information. 272 * 273 * @param companyId the primary key of the company 274 * @param virtualHost the company's virtual host name 275 * @param mx the company's mail domain 276 * @param homeURL the company's home URL (optionally <code>null</code>) 277 * @param name the company's account name (optionally 278 <code>null</code>) 279 * @param legalName the company's account legal name (optionally 280 <code>null</code>) 281 * @param legalId the company's account legal ID (optionally 282 <code>null</code>) 283 * @param legalType the company's account legal type (optionally 284 <code>null</code>) 285 * @param sicCode the company's account SIC code (optionally 286 <code>null</code>) 287 * @param tickerSymbol the company's account ticker symbol (optionally 288 <code>null</code>) 289 * @param industry the the company's account industry (optionally 290 <code>null</code>) 291 * @param type the company's account type (optionally 292 <code>null</code>) 293 * @param size the company's account size (optionally 294 <code>null</code>) 295 * @return the the company with the primary key 296 * @throws PortalException if a company with the primary key could not 297 be found or if the new information was invalid or if the user 298 was not an administrator 299 * @deprecated As of 7.0.0, replaced by {@link #updateCompany(long, String, 300 String, String, boolean, byte[], String, String, String, 301 String, String, String, String, String, String)} 302 */ 303 @java.lang.Deprecated 304 public com.liferay.portal.model.Company updateCompany(long companyId, 305 java.lang.String virtualHost, java.lang.String mx, 306 java.lang.String homeURL, java.lang.String name, 307 java.lang.String legalName, java.lang.String legalId, 308 java.lang.String legalType, java.lang.String sicCode, 309 java.lang.String tickerSymbol, java.lang.String industry, 310 java.lang.String type, java.lang.String size) 311 throws com.liferay.portal.kernel.exception.PortalException; 312 313 /** 314 * Updates the company with addition information. 315 * 316 * @param companyId the primary key of the company 317 * @param virtualHost the company's virtual host name 318 * @param mx the company's mail domain 319 * @param homeURL the company's home URL (optionally <code>null</code>) 320 * @param name the company's account name (optionally 321 <code>null</code>) 322 * @param legalName the company's account legal name (optionally 323 <code>null</code>) 324 * @param legalId the company's accout legal ID (optionally 325 <code>null</code>) 326 * @param legalType the company's account legal type (optionally 327 <code>null</code>) 328 * @param sicCode the company's account SIC code (optionally 329 <code>null</code>) 330 * @param tickerSymbol the company's account ticker symbol (optionally 331 <code>null</code>) 332 * @param industry the the company's account industry (optionally 333 <code>null</code>) 334 * @param type the company's account type (optionally 335 <code>null</code>) 336 * @param size the company's account size (optionally 337 <code>null</code>) 338 * @param languageId the ID of the company's default user's language 339 * @param timeZoneId the ID of the company's default user's time zone 340 * @param addresses the company's addresses 341 * @param emailAddresses the company's email addresses 342 * @param phones the company's phone numbers 343 * @param websites the company's websites 344 * @param properties the company's properties 345 * @return the company with the primary key 346 * @throws PortalException the company with the primary key could not be 347 found or if the new information was invalid or if the user 348 was not an administrator 349 * @deprecated As of 7.0.0, replaced by {@link #updateCompany(long, String, 350 String, String, boolean, byte[], String, String, String, 351 String, String, String, String, String, String, String, 352 String, java.util.List, java.util.List, java.util.List, 353 java.util.List, UnicodeProperties)} 354 */ 355 @java.lang.Deprecated 356 @com.liferay.portal.kernel.jsonwebservice.JSONWebService(mode = JSONWebServiceMode.IGNORE) 357 public com.liferay.portal.model.Company updateCompany(long companyId, 358 java.lang.String virtualHost, java.lang.String mx, 359 java.lang.String homeURL, java.lang.String name, 360 java.lang.String legalName, java.lang.String legalId, 361 java.lang.String legalType, java.lang.String sicCode, 362 java.lang.String tickerSymbol, java.lang.String industry, 363 java.lang.String type, java.lang.String size, 364 java.lang.String languageId, java.lang.String timeZoneId, 365 java.util.List<com.liferay.portal.model.Address> addresses, 366 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses, 367 java.util.List<com.liferay.portal.model.Phone> phones, 368 java.util.List<com.liferay.portal.model.Website> websites, 369 com.liferay.portal.kernel.util.UnicodeProperties properties) 370 throws com.liferay.portal.kernel.exception.PortalException; 371 372 /** 373 * Updates the company 374 * 375 * @param companyId the primary key of the company 376 * @param virtualHost the company's virtual host name 377 * @param mx the company's mail domain 378 * @param maxUsers the max number of company users (optionally 379 <code>0</code>) 380 * @param active whether the company is active 381 * @return the company with the primary key 382 * @throws PortalException if a company with the primary key could not be 383 found or if the new information was invalid or if the user was 384 not a universal administrator 385 */ 386 public com.liferay.portal.model.Company updateCompany(long companyId, 387 java.lang.String virtualHost, java.lang.String mx, int maxUsers, 388 boolean active) 389 throws com.liferay.portal.kernel.exception.PortalException; 390 391 /** 392 * Update the company's display. 393 * 394 * @param companyId the primary key of the company 395 * @param languageId the ID of the company's default user's language 396 * @param timeZoneId the ID of the company's default user's time zone 397 * @throws PortalException if the company's default user could not be found 398 or if the user was not an administrator 399 */ 400 public void updateDisplay(long companyId, java.lang.String languageId, 401 java.lang.String timeZoneId) 402 throws com.liferay.portal.kernel.exception.PortalException; 403 404 /** 405 * Updates the company's logo. 406 * 407 * @param companyId the primary key of the company 408 * @param bytes the bytes of the company's logo image 409 * @return the company with the primary key 410 * @throws PortalException if the company's logo ID could not be found or if 411 the logo's image was corrupted or if the user was an 412 administrator 413 */ 414 public com.liferay.portal.model.Company updateLogo(long companyId, 415 byte[] bytes) 416 throws com.liferay.portal.kernel.exception.PortalException; 417 418 /** 419 * Updates the company's logo. 420 * 421 * @param companyId the primary key of the company 422 * @param inputStream the input stream of the company's logo image 423 * @return the company with the primary key 424 * @throws PortalException if the company's logo ID could not be found or if 425 the logo's image was corrupted or if the user was an 426 administrator 427 */ 428 @com.liferay.portal.kernel.jsonwebservice.JSONWebService(mode = JSONWebServiceMode.IGNORE) 429 public com.liferay.portal.model.Company updateLogo(long companyId, 430 java.io.InputStream inputStream) 431 throws com.liferay.portal.kernel.exception.PortalException; 432 433 /** 434 * Updates the company's preferences. The company's default properties are 435 * found in portal.properties. 436 * 437 * @param companyId the primary key of the company 438 * @param properties the company's properties. See {@link 439 com.liferay.portal.kernel.util.UnicodeProperties} 440 * @throws PortalException if the user was not an administrator 441 */ 442 @com.liferay.portal.kernel.jsonwebservice.JSONWebService(mode = JSONWebServiceMode.IGNORE) 443 public void updatePreferences(long companyId, 444 com.liferay.portal.kernel.util.UnicodeProperties properties) 445 throws com.liferay.portal.kernel.exception.PortalException; 446 447 /** 448 * Updates the company's security properties. 449 * 450 * @param companyId the primary key of the company 451 * @param authType the company's method of authenticating users 452 * @param autoLogin whether to allow users to select the "remember me" 453 feature 454 * @param sendPassword whether to allow users to ask the company to send 455 their passwords 456 * @param strangers whether to allow strangers to create accounts to 457 register themselves in the company 458 * @param strangersWithMx whether to allow strangers to create accounts 459 with email addresses that match the company mail suffix 460 * @param strangersVerify whether to require strangers who create accounts 461 to be verified via email 462 * @param siteLogo whether to to allow site administrators to use their own 463 logo instead of the enterprise logo 464 * @throws PortalException if the user was not an administrator 465 */ 466 @com.liferay.portal.kernel.jsonwebservice.JSONWebService(mode = JSONWebServiceMode.IGNORE) 467 public void updateSecurity(long companyId, java.lang.String authType, 468 boolean autoLogin, boolean sendPassword, boolean strangers, 469 boolean strangersWithMx, boolean strangersVerify, boolean siteLogo) 470 throws com.liferay.portal.kernel.exception.PortalException; 471 }