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