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