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