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