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