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