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