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