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