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.transaction.Isolation;
020    import com.liferay.portal.kernel.transaction.Propagation;
021    import com.liferay.portal.kernel.transaction.Transactional;
022    
023    /**
024     * The interface for the company local service.
025     *
026     * <p>
027     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see CompanyLocalServiceUtil
032     * @see com.liferay.portal.service.base.CompanyLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.CompanyLocalServiceImpl
034     * @generated
035     */
036    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
037            PortalException.class, SystemException.class})
038    public interface CompanyLocalService extends BaseLocalService,
039            PersistedModelLocalService {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify or reference this interface directly. Always use {@link CompanyLocalServiceUtil} to access the company local service. Add custom service methods to {@link com.liferay.portal.service.impl.CompanyLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
044             */
045    
046            /**
047            * Adds the company to the database. Also notifies the appropriate model listeners.
048            *
049            * @param company the company
050            * @return the company that was added
051            * @throws SystemException if a system exception occurred
052            */
053            public com.liferay.portal.model.Company addCompany(
054                    com.liferay.portal.model.Company company)
055                    throws com.liferay.portal.kernel.exception.SystemException;
056    
057            /**
058            * Creates a new company with the primary key. Does not add the company to the database.
059            *
060            * @param companyId the primary key for the new company
061            * @return the new company
062            */
063            public com.liferay.portal.model.Company createCompany(long companyId);
064    
065            /**
066            * Deletes the company with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param companyId the primary key of the company
069            * @return the company that was removed
070            * @throws PortalException if a company with the primary key could not be found
071            * @throws SystemException if a system exception occurred
072            */
073            public com.liferay.portal.model.Company deleteCompany(long companyId)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException;
076    
077            /**
078            * Deletes the company from the database. Also notifies the appropriate model listeners.
079            *
080            * @param company the company
081            * @return the company that was removed
082            * @throws SystemException if a system exception occurred
083            */
084            public com.liferay.portal.model.Company deleteCompany(
085                    com.liferay.portal.model.Company company)
086                    throws com.liferay.portal.kernel.exception.SystemException;
087    
088            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
089    
090            /**
091            * Performs a dynamic query on the database and returns the matching rows.
092            *
093            * @param dynamicQuery the dynamic query
094            * @return the matching rows
095            * @throws SystemException if a system exception occurred
096            */
097            @SuppressWarnings("rawtypes")
098            public java.util.List dynamicQuery(
099                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
100                    throws com.liferay.portal.kernel.exception.SystemException;
101    
102            /**
103            * Performs a dynamic query on the database and returns a range of the matching rows.
104            *
105            * <p>
106            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
107            * </p>
108            *
109            * @param dynamicQuery the dynamic query
110            * @param start the lower bound of the range of model instances
111            * @param end the upper bound of the range of model instances (not inclusive)
112            * @return the range of matching rows
113            * @throws SystemException if a system exception occurred
114            */
115            @SuppressWarnings("rawtypes")
116            public java.util.List dynamicQuery(
117                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
118                    int end) throws com.liferay.portal.kernel.exception.SystemException;
119    
120            /**
121            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
122            *
123            * <p>
124            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
125            * </p>
126            *
127            * @param dynamicQuery the dynamic query
128            * @param start the lower bound of the range of model instances
129            * @param end the upper bound of the range of model instances (not inclusive)
130            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
131            * @return the ordered range of matching rows
132            * @throws SystemException if a system exception occurred
133            */
134            @SuppressWarnings("rawtypes")
135            public java.util.List dynamicQuery(
136                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
137                    int end,
138                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
139                    throws com.liferay.portal.kernel.exception.SystemException;
140    
141            /**
142            * Returns the number of rows that match the dynamic query.
143            *
144            * @param dynamicQuery the dynamic query
145            * @return the number of rows that match the dynamic query
146            * @throws SystemException if a system exception occurred
147            */
148            public long dynamicQueryCount(
149                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
150                    throws com.liferay.portal.kernel.exception.SystemException;
151    
152            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
153            public com.liferay.portal.model.Company fetchCompany(long companyId)
154                    throws com.liferay.portal.kernel.exception.SystemException;
155    
156            /**
157            * Returns the company with the primary key.
158            *
159            * @param companyId the primary key of the company
160            * @return the company
161            * @throws PortalException if a company with the primary key could not be found
162            * @throws SystemException if a system exception occurred
163            */
164            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
165            public com.liferay.portal.model.Company getCompany(long companyId)
166                    throws com.liferay.portal.kernel.exception.PortalException,
167                            com.liferay.portal.kernel.exception.SystemException;
168    
169            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170            public com.liferay.portal.model.PersistedModel getPersistedModel(
171                    java.io.Serializable primaryKeyObj)
172                    throws com.liferay.portal.kernel.exception.PortalException,
173                            com.liferay.portal.kernel.exception.SystemException;
174    
175            /**
176            * Returns a range of all the companies.
177            *
178            * <p>
179            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
180            * </p>
181            *
182            * @param start the lower bound of the range of companies
183            * @param end the upper bound of the range of companies (not inclusive)
184            * @return the range of companies
185            * @throws SystemException if a system exception occurred
186            */
187            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
188            public java.util.List<com.liferay.portal.model.Company> getCompanies(
189                    int start, int end)
190                    throws com.liferay.portal.kernel.exception.SystemException;
191    
192            /**
193            * Returns the number of companies.
194            *
195            * @return the number of companies
196            * @throws SystemException if a system exception occurred
197            */
198            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
199            public int getCompaniesCount()
200                    throws com.liferay.portal.kernel.exception.SystemException;
201    
202            /**
203            * Updates the company in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
204            *
205            * @param company the company
206            * @return the company that was updated
207            * @throws SystemException if a system exception occurred
208            */
209            public com.liferay.portal.model.Company updateCompany(
210                    com.liferay.portal.model.Company company)
211                    throws com.liferay.portal.kernel.exception.SystemException;
212    
213            /**
214            * Updates the company in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
215            *
216            * @param company the company
217            * @param merge whether to merge the company with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
218            * @return the company that was updated
219            * @throws SystemException if a system exception occurred
220            */
221            public com.liferay.portal.model.Company updateCompany(
222                    com.liferay.portal.model.Company company, boolean merge)
223                    throws com.liferay.portal.kernel.exception.SystemException;
224    
225            /**
226            * Returns the Spring bean ID for this bean.
227            *
228            * @return the Spring bean ID for this bean
229            */
230            public java.lang.String getBeanIdentifier();
231    
232            /**
233            * Sets the Spring bean ID for this bean.
234            *
235            * @param beanIdentifier the Spring bean ID for this bean
236            */
237            public void setBeanIdentifier(java.lang.String beanIdentifier);
238    
239            /**
240            * Adds a company.
241            *
242            * @param webId the the company's web domain
243            * @param virtualHostname the company's virtual host name
244            * @param mx the company's mail domain
245            * @param shardName the company's shard
246            * @param system whether the company is the very first company (i.e., the
247            super company)
248            * @param maxUsers the max number of company users (optionally
249            <code>0</code>)
250            * @param active whether the company is active
251            * @return the company
252            * @throws PortalException if the web domain, virtual host name, or mail
253            domain was invalid
254            * @throws SystemException if a system exception occurred
255            */
256            public com.liferay.portal.model.Company addCompany(java.lang.String webId,
257                    java.lang.String virtualHostname, java.lang.String mx,
258                    java.lang.String shardName, boolean system, int maxUsers, boolean active)
259                    throws com.liferay.portal.kernel.exception.PortalException,
260                            com.liferay.portal.kernel.exception.SystemException;
261    
262            /**
263            * Returns the company with the web domain.
264            *
265            * The method sets mail domain to the web domain, and the shard name to
266            * the default name set in portal.properties
267            *
268            * @param webId the company's web domain
269            * @return the company with the web domain
270            * @throws PortalException if a portal exception occurred
271            * @throws SystemException if a system exception occurred
272            */
273            public com.liferay.portal.model.Company checkCompany(java.lang.String webId)
274                    throws com.liferay.portal.kernel.exception.PortalException,
275                            com.liferay.portal.kernel.exception.SystemException;
276    
277            /**
278            * Returns the company with the web domain, mail domain, and shard. If no
279            * such company exits, the method will create a new company.
280            *
281            * The method goes through a series of checks to ensure that the company
282            * contains default users, groups, etc.
283            *
284            * @param webId the company's web domain
285            * @param mx the company's mail domain
286            * @param shardName the company's shard
287            * @return the company with the web domain, mail domain, and shard
288            * @throws PortalException if a portal exception occurred
289            * @throws SystemException if a system exception occurred
290            */
291            public com.liferay.portal.model.Company checkCompany(
292                    java.lang.String webId, java.lang.String mx, java.lang.String shardName)
293                    throws com.liferay.portal.kernel.exception.PortalException,
294                            com.liferay.portal.kernel.exception.SystemException;
295    
296            /**
297            * Checks if the company has an encryption key. It will create a key if one
298            * does not exist.
299            *
300            * @param companyId the primary key of the company
301            * @throws PortalException if a company with the primary key could not be
302            found
303            * @throws SystemException if a system exception occurred
304            */
305            public void checkCompanyKey(long companyId)
306                    throws com.liferay.portal.kernel.exception.PortalException,
307                            com.liferay.portal.kernel.exception.SystemException;
308    
309            /**
310            * Deletes the company's logo.
311            *
312            * @param companyId the primary key of the company
313            * @throws PortalException if the company with the primary key could not be
314            found or if the company's logo could not be found
315            * @throws SystemException if a system exception occurred
316            */
317            public void deleteLogo(long companyId)
318                    throws com.liferay.portal.kernel.exception.PortalException,
319                            com.liferay.portal.kernel.exception.SystemException;
320    
321            /**
322            * Returns the company with the primary key.
323            *
324            * @param companyId the primary key of the company
325            * @return the company with the primary key, <code>null</code> if a company
326            with the primary key could not be found
327            * @throws SystemException if a system exception occurred
328            */
329            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
330            public com.liferay.portal.model.Company fetchCompanyById(long companyId)
331                    throws com.liferay.portal.kernel.exception.SystemException;
332    
333            /**
334            * Returns the company with the virtual host name.
335            *
336            * @param virtualHostname the virtual host name
337            * @return the company with the virtual host name, <code>null</code> if a
338            company with the virtual host could not be found
339            * @throws SystemException if a system exception occurred
340            */
341            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
342            public com.liferay.portal.model.Company fetchCompanyByVirtualHost(
343                    java.lang.String virtualHostname)
344                    throws com.liferay.portal.kernel.exception.SystemException;
345    
346            /**
347            * Returns all the companies.
348            *
349            * @return the companies
350            * @throws SystemException if a system exception occurred
351            */
352            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
353            public java.util.List<com.liferay.portal.model.Company> getCompanies()
354                    throws com.liferay.portal.kernel.exception.SystemException;
355    
356            /**
357            * Returns all the companies used by WSRP.
358            *
359            * @param system whether the company is the very first company (i.e., the
360            super company)
361            * @return the companies used by WSRP
362            * @throws SystemException if a system exception occurred
363            */
364            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
365            public java.util.List<com.liferay.portal.model.Company> getCompanies(
366                    boolean system)
367                    throws com.liferay.portal.kernel.exception.SystemException;
368    
369            /**
370            * Returns the number of companies used by WSRP.
371            *
372            * @param system whether the company is the very first company (i.e., the
373            super company)
374            * @return the number of companies used by WSRP
375            * @throws SystemException if a system exception occurred
376            */
377            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
378            public int getCompaniesCount(boolean system)
379                    throws com.liferay.portal.kernel.exception.SystemException;
380    
381            /**
382            * Returns the company with the primary key.
383            *
384            * @param companyId the primary key of the company
385            * @return the company with the primary key
386            * @throws PortalException if a company with the primary key could not be
387            found
388            * @throws SystemException if a system exception occurred
389            */
390            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
391            public com.liferay.portal.model.Company getCompanyById(long companyId)
392                    throws com.liferay.portal.kernel.exception.PortalException,
393                            com.liferay.portal.kernel.exception.SystemException;
394    
395            /**
396            * Returns the company with the logo.
397            *
398            * @param logoId the ID of the company's logo
399            * @return the company with the logo
400            * @throws PortalException if the company with the logo could not be found
401            * @throws SystemException if a system exception occurred
402            */
403            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
404            public com.liferay.portal.model.Company getCompanyByLogoId(long logoId)
405                    throws com.liferay.portal.kernel.exception.PortalException,
406                            com.liferay.portal.kernel.exception.SystemException;
407    
408            /**
409            * Returns the company with the mail domain.
410            *
411            * @param mx the company's mail domain
412            * @return the company with the mail domain
413            * @throws PortalException if the company with the mail domain could not be
414            found
415            * @throws SystemException if a system exception occurred
416            */
417            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
418            public com.liferay.portal.model.Company getCompanyByMx(java.lang.String mx)
419                    throws com.liferay.portal.kernel.exception.PortalException,
420                            com.liferay.portal.kernel.exception.SystemException;
421    
422            /**
423            * Returns the company with the virtual host name.
424            *
425            * @param virtualHostname the company's virtual host name
426            * @return the company with the virtual host name
427            * @throws PortalException if the company with the virtual host name could
428            not be found or if the virtual host was not associated with a
429            company
430            * @throws SystemException if a system exception occurred
431            */
432            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
433            public com.liferay.portal.model.Company getCompanyByVirtualHost(
434                    java.lang.String virtualHostname)
435                    throws com.liferay.portal.kernel.exception.PortalException,
436                            com.liferay.portal.kernel.exception.SystemException;
437    
438            /**
439            * Returns the company with the web domain.
440            *
441            * @param webId the company's web domain
442            * @return the company with the web domain
443            * @throws PortalException if the company with the web domain could not be
444            found
445            * @throws SystemException if a system exception occurred
446            */
447            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
448            public com.liferay.portal.model.Company getCompanyByWebId(
449                    java.lang.String webId)
450                    throws com.liferay.portal.kernel.exception.PortalException,
451                            com.liferay.portal.kernel.exception.SystemException;
452    
453            /**
454            * Returns the user's company.
455            *
456            * @param userId the primary key of the user
457            * @return Returns the first company if there is only one company or the
458            user's company if there are more than one company; <code>0</code>
459            otherwise
460            * @throws Exception if a user with the primary key could not be found
461            */
462            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
463            public long getCompanyIdByUserId(long userId) throws java.lang.Exception;
464    
465            /**
466            * Removes the values that match the keys of the company's preferences.
467            *
468            * This method is called by {@link
469            * com.liferay.portlet.portalsettings.action.EditLDAPServerAction} remotely
470            * through {@link com.liferay.portal.service.CompanyService}.
471            *
472            * @param companyId the primary key of the company
473            * @param keys the company's preferences keys to be remove
474            * @throws SystemException if a system exception occurred
475            */
476            public void removePreferences(long companyId, java.lang.String[] keys)
477                    throws com.liferay.portal.kernel.exception.SystemException;
478    
479            /**
480            * Returns an ordered range of all assets that match the keywords in the
481            * company.
482            *
483            * The method is called in {@link
484            * com.liferay.portal.search.PortalOpenSearchImpl} which is not longer used
485            * by the Search portlet.
486            *
487            * @param companyId the primary key of the company
488            * @param userId the primary key of the user
489            * @param keywords the keywords (space separated),which may occur in assets
490            in the company (optionally <code>null</code>)
491            * @param start the lower bound of the range of assets to return
492            * @param end the upper bound of the range of assets to return (not
493            inclusive)
494            * @return the matching assets in the company
495            * @throws SystemException if a system exception occurred
496            */
497            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
498            public com.liferay.portal.kernel.search.Hits search(long companyId,
499                    long userId, java.lang.String keywords, int start, int end)
500                    throws com.liferay.portal.kernel.exception.SystemException;
501    
502            /**
503            * Returns an ordered range of all assets that match the keywords in the
504            * portlet within the company.
505            *
506            * @param companyId the primary key of the company
507            * @param userId the primary key of the user
508            * @param portletId the primary key of the portlet (optionally
509            <code>null</code>)
510            * @param groupId the primary key of the group (optionally <code>0</code>)
511            * @param type the mime type of assets to return(optionally
512            <code>null</code>)
513            * @param keywords the keywords (space separated), which may occur in any
514            assets in the portlet (optionally <code>null</code>)
515            * @param start the lower bound of the range of assets to return
516            * @param end the upper bound of the range of assets to return (not
517            inclusive)
518            * @return the matching assets in the portlet within the company
519            * @throws SystemException if a system exception occurred
520            */
521            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
522            public com.liferay.portal.kernel.search.Hits search(long companyId,
523                    long userId, java.lang.String portletId, long groupId,
524                    java.lang.String type, java.lang.String keywords, int start, int end)
525                    throws com.liferay.portal.kernel.exception.SystemException;
526    
527            /**
528            * Updates the company.
529            *
530            * @param companyId the primary key of the company
531            * @param virtualHostname the company's virtual host name
532            * @param mx the company's mail domain
533            * @param maxUsers the max number of company users (optionally
534            <code>0</code>)
535            * @param active whether the company is active
536            * @return the company with the primary key
537            * @throws PortalException if a company with primary key could not be found
538            or if the new information was invalid
539            * @throws SystemException if a system exception occurred
540            */
541            public com.liferay.portal.model.Company updateCompany(long companyId,
542                    java.lang.String virtualHostname, java.lang.String mx, int maxUsers,
543                    boolean active)
544                    throws com.liferay.portal.kernel.exception.PortalException,
545                            com.liferay.portal.kernel.exception.SystemException;
546    
547            /**
548            * Update the company with additional account information.
549            *
550            * @param companyId the primary key of the company
551            * @param virtualHostname the company's virtual host name
552            * @param mx the company's mail domain
553            * @param homeURL the company's home URL (optionally <code>null</code>)
554            * @param name the company's account name(optionally <code>null</code>)
555            * @param legalName the company's account legal name (optionally
556            <code>null</code>)
557            * @param legalId the company's account legal ID (optionally
558            <code>null</code>)
559            * @param legalType the company's account legal type (optionally
560            <code>null</code>)
561            * @param sicCode the company's account SIC code (optionally
562            <code>null</code>)
563            * @param tickerSymbol the company's account ticker symbol (optionally
564            <code>null</code>)
565            * @param industry the company's account industry (optionally
566            <code>null</code>)
567            * @param type the company's account type (optionally <code>null</code>)
568            * @param size the company's account size (optionally <code>null</code>)
569            * @return the company with the primary key
570            * @throws PortalException if a company with the primary key could not be
571            found or if the new information was invalid
572            * @throws SystemException if a system exception occurred
573            */
574            public com.liferay.portal.model.Company updateCompany(long companyId,
575                    java.lang.String virtualHostname, java.lang.String mx,
576                    java.lang.String homeURL, java.lang.String name,
577                    java.lang.String legalName, java.lang.String legalId,
578                    java.lang.String legalType, java.lang.String sicCode,
579                    java.lang.String tickerSymbol, java.lang.String industry,
580                    java.lang.String type, java.lang.String size)
581                    throws com.liferay.portal.kernel.exception.PortalException,
582                            com.liferay.portal.kernel.exception.SystemException;
583    
584            /**
585            * Update the company's display.
586            *
587            * @param companyId the primary key of the company
588            * @param languageId the ID of the company's default user's language
589            * @param timeZoneId the ID of the company's default user's time zone
590            * @throws PortalException if the company's default user could not be found
591            * @throws SystemException if a system exception occurred
592            */
593            public void updateDisplay(long companyId, java.lang.String languageId,
594                    java.lang.String timeZoneId)
595                    throws com.liferay.portal.kernel.exception.PortalException,
596                            com.liferay.portal.kernel.exception.SystemException;
597    
598            /**
599            * Updates the company's logo.
600            *
601            * @param companyId the primary key of the company
602            * @param bytes the bytes of the company's logo image
603            * @return the company with the primary key
604            * @throws PortalException if the company's logo ID could not be found or if
605            the logo's image was corrupted
606            * @throws SystemException if a system exception occurred
607            */
608            public com.liferay.portal.model.Company updateLogo(long companyId,
609                    byte[] bytes)
610                    throws com.liferay.portal.kernel.exception.PortalException,
611                            com.liferay.portal.kernel.exception.SystemException;
612    
613            /**
614            * Updates the company's logo.
615            *
616            * @param companyId the primary key of the company
617            * @param file the file of the company's logo image
618            * @return the company with the primary key
619            * @throws PortalException the company's logo ID could not be found or if
620            the logo's image was corrupted
621            * @throws SystemException if a system exception occurred
622            */
623            public com.liferay.portal.model.Company updateLogo(long companyId,
624                    java.io.File file)
625                    throws com.liferay.portal.kernel.exception.PortalException,
626                            com.liferay.portal.kernel.exception.SystemException;
627    
628            /**
629            * Update the company's logo.
630            *
631            * @param companyId the primary key of the company
632            * @param is the input stream of the company's logo image
633            * @return the company with the primary key
634            * @throws PortalException if the company's logo ID could not be found or if
635            the company's logo image was corrupted
636            * @throws SystemException if a system exception occurred
637            */
638            public com.liferay.portal.model.Company updateLogo(long companyId,
639                    java.io.InputStream is)
640                    throws com.liferay.portal.kernel.exception.PortalException,
641                            com.liferay.portal.kernel.exception.SystemException;
642    
643            /**
644            * Updates the company's preferences. The company's default properties are
645            * found in portal.properties.
646            *
647            * @param companyId the primary key of the company
648            * @param properties the company's properties. See {@link
649            com.liferay.portal.kernel.util.UnicodeProperties}
650            * @throws PortalException if the properties contained new locales that were
651            not supported
652            * @throws SystemException if a system exception occurred
653            */
654            public void updatePreferences(long companyId,
655                    com.liferay.portal.kernel.util.UnicodeProperties properties)
656                    throws com.liferay.portal.kernel.exception.PortalException,
657                            com.liferay.portal.kernel.exception.SystemException;
658    
659            /**
660            * Updates the company's security properties.
661            *
662            * @param companyId the primary key of the company
663            * @param authType the company's method of authenticating users
664            * @param autoLogin whether to allow users to select the "remember me"
665            feature
666            * @param sendPassword whether to allow users to ask the company to send
667            their password
668            * @param strangers whether to allow strangers to create accounts register
669            themselves in the company
670            * @param strangersWithMx whether to allow strangers to create accounts
671            with email addresses that match the company mail suffix
672            * @param strangersVerify whether to require strangers who create accounts
673            to be verified via email
674            * @param siteLogo whether to allow site administrators to use their own
675            logo instead of the enterprise logo
676            * @throws SystemException if a system exception occurred
677            */
678            public void updateSecurity(long companyId, java.lang.String authType,
679                    boolean autoLogin, boolean sendPassword, boolean strangers,
680                    boolean strangersWithMx, boolean strangersVerify, boolean siteLogo)
681                    throws com.liferay.portal.kernel.exception.SystemException;
682    }