001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 PersistedModelLocalService {
039            /*
040             * NOTE FOR DEVELOPERS:
041             *
042             * 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.
043             */
044    
045            /**
046            * Adds the company to the database. Also notifies the appropriate model listeners.
047            *
048            * @param company the company
049            * @return the company that was added
050            * @throws SystemException if a system exception occurred
051            */
052            public com.liferay.portal.model.Company addCompany(
053                    com.liferay.portal.model.Company company)
054                    throws com.liferay.portal.kernel.exception.SystemException;
055    
056            /**
057            * Creates a new company with the primary key. Does not add the company to the database.
058            *
059            * @param companyId the primary key for the new company
060            * @return the new company
061            */
062            public com.liferay.portal.model.Company createCompany(long companyId);
063    
064            /**
065            * Deletes the company with the primary key from the database. Also notifies the appropriate model listeners.
066            *
067            * @param companyId the primary key of the company
068            * @throws PortalException if a company with the primary key could not be found
069            * @throws SystemException if a system exception occurred
070            */
071            public void deleteCompany(long companyId)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException;
074    
075            /**
076            * Deletes the company from the database. Also notifies the appropriate model listeners.
077            *
078            * @param company the company
079            * @throws SystemException if a system exception occurred
080            */
081            public void deleteCompany(com.liferay.portal.model.Company company)
082                    throws com.liferay.portal.kernel.exception.SystemException;
083    
084            /**
085            * Performs a dynamic query on the database and returns the matching rows.
086            *
087            * @param dynamicQuery the dynamic query
088            * @return the matching rows
089            * @throws SystemException if a system exception occurred
090            */
091            @SuppressWarnings("rawtypes")
092            public java.util.List dynamicQuery(
093                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
094                    throws com.liferay.portal.kernel.exception.SystemException;
095    
096            /**
097            * Performs a dynamic query on the database and returns a range of the matching rows.
098            *
099            * <p>
100            * 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.
101            * </p>
102            *
103            * @param dynamicQuery the dynamic query
104            * @param start the lower bound of the range of model instances
105            * @param end the upper bound of the range of model instances (not inclusive)
106            * @return the range of matching rows
107            * @throws SystemException if a system exception occurred
108            */
109            @SuppressWarnings("rawtypes")
110            public java.util.List dynamicQuery(
111                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
112                    int end) throws com.liferay.portal.kernel.exception.SystemException;
113    
114            /**
115            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
116            *
117            * <p>
118            * 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.
119            * </p>
120            *
121            * @param dynamicQuery the dynamic query
122            * @param start the lower bound of the range of model instances
123            * @param end the upper bound of the range of model instances (not inclusive)
124            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
125            * @return the ordered range of matching rows
126            * @throws SystemException if a system exception occurred
127            */
128            @SuppressWarnings("rawtypes")
129            public java.util.List dynamicQuery(
130                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
131                    int end,
132                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
133                    throws com.liferay.portal.kernel.exception.SystemException;
134    
135            /**
136            * Returns the number of rows that match the dynamic query.
137            *
138            * @param dynamicQuery the dynamic query
139            * @return the number of rows that match the dynamic query
140            * @throws SystemException if a system exception occurred
141            */
142            public long dynamicQueryCount(
143                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
144                    throws com.liferay.portal.kernel.exception.SystemException;
145    
146            /**
147            * Returns the company with the primary key.
148            *
149            * @param companyId the primary key of the company
150            * @return the company
151            * @throws PortalException if a company with the primary key could not be found
152            * @throws SystemException if a system exception occurred
153            */
154            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155            public com.liferay.portal.model.Company getCompany(long companyId)
156                    throws com.liferay.portal.kernel.exception.PortalException,
157                            com.liferay.portal.kernel.exception.SystemException;
158    
159            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160            public com.liferay.portal.model.PersistedModel getPersistedModel(
161                    java.io.Serializable primaryKeyObj)
162                    throws com.liferay.portal.kernel.exception.PortalException,
163                            com.liferay.portal.kernel.exception.SystemException;
164    
165            /**
166            * Returns a range of all the companies.
167            *
168            * <p>
169            * 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.
170            * </p>
171            *
172            * @param start the lower bound of the range of companies
173            * @param end the upper bound of the range of companies (not inclusive)
174            * @return the range of companies
175            * @throws SystemException if a system exception occurred
176            */
177            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
178            public java.util.List<com.liferay.portal.model.Company> getCompanies(
179                    int start, int end)
180                    throws com.liferay.portal.kernel.exception.SystemException;
181    
182            /**
183            * Returns the number of companies.
184            *
185            * @return the number of companies
186            * @throws SystemException if a system exception occurred
187            */
188            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
189            public int getCompaniesCount()
190                    throws com.liferay.portal.kernel.exception.SystemException;
191    
192            /**
193            * Updates the company in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
194            *
195            * @param company the company
196            * @return the company that was updated
197            * @throws SystemException if a system exception occurred
198            */
199            public com.liferay.portal.model.Company updateCompany(
200                    com.liferay.portal.model.Company company)
201                    throws com.liferay.portal.kernel.exception.SystemException;
202    
203            /**
204            * Updates the company in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
205            *
206            * @param company the company
207            * @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.
208            * @return the company that was updated
209            * @throws SystemException if a system exception occurred
210            */
211            public com.liferay.portal.model.Company updateCompany(
212                    com.liferay.portal.model.Company company, boolean merge)
213                    throws com.liferay.portal.kernel.exception.SystemException;
214    
215            /**
216            * Returns the Spring bean ID for this bean.
217            *
218            * @return the Spring bean ID for this bean
219            */
220            public java.lang.String getBeanIdentifier();
221    
222            /**
223            * Sets the Spring bean ID for this bean.
224            *
225            * @param beanIdentifier the Spring bean ID for this bean
226            */
227            public void setBeanIdentifier(java.lang.String beanIdentifier);
228    
229            public com.liferay.portal.model.Company addCompany(java.lang.String webId,
230                    java.lang.String virtualHostname, java.lang.String mx,
231                    java.lang.String shardName, boolean system, int maxUsers)
232                    throws com.liferay.portal.kernel.exception.PortalException,
233                            com.liferay.portal.kernel.exception.SystemException;
234    
235            public com.liferay.portal.model.Company checkCompany(java.lang.String webId)
236                    throws com.liferay.portal.kernel.exception.PortalException,
237                            com.liferay.portal.kernel.exception.SystemException;
238    
239            public com.liferay.portal.model.Company checkCompany(
240                    java.lang.String webId, java.lang.String mx, java.lang.String shardName)
241                    throws com.liferay.portal.kernel.exception.PortalException,
242                            com.liferay.portal.kernel.exception.SystemException;
243    
244            public void checkCompanyKey(long companyId)
245                    throws com.liferay.portal.kernel.exception.PortalException,
246                            com.liferay.portal.kernel.exception.SystemException;
247    
248            public void deleteLogo(long companyId)
249                    throws com.liferay.portal.kernel.exception.PortalException,
250                            com.liferay.portal.kernel.exception.SystemException;
251    
252            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
253            public java.util.List<com.liferay.portal.model.Company> getCompanies()
254                    throws com.liferay.portal.kernel.exception.SystemException;
255    
256            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
257            public java.util.List<com.liferay.portal.model.Company> getCompanies(
258                    boolean system)
259                    throws com.liferay.portal.kernel.exception.SystemException;
260    
261            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262            public int getCompaniesCount(boolean system)
263                    throws com.liferay.portal.kernel.exception.SystemException;
264    
265            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
266            public com.liferay.portal.model.Company getCompanyById(long companyId)
267                    throws com.liferay.portal.kernel.exception.PortalException,
268                            com.liferay.portal.kernel.exception.SystemException;
269    
270            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
271            public com.liferay.portal.model.Company getCompanyByLogoId(long logoId)
272                    throws com.liferay.portal.kernel.exception.PortalException,
273                            com.liferay.portal.kernel.exception.SystemException;
274    
275            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276            public com.liferay.portal.model.Company getCompanyByMx(java.lang.String mx)
277                    throws com.liferay.portal.kernel.exception.PortalException,
278                            com.liferay.portal.kernel.exception.SystemException;
279    
280            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281            public com.liferay.portal.model.Company getCompanyByVirtualHost(
282                    java.lang.String virtualHostname)
283                    throws com.liferay.portal.kernel.exception.PortalException,
284                            com.liferay.portal.kernel.exception.SystemException;
285    
286            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287            public com.liferay.portal.model.Company getCompanyByWebId(
288                    java.lang.String webId)
289                    throws com.liferay.portal.kernel.exception.PortalException,
290                            com.liferay.portal.kernel.exception.SystemException;
291    
292            public void removePreferences(long companyId, java.lang.String[] keys)
293                    throws com.liferay.portal.kernel.exception.SystemException;
294    
295            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
296            public com.liferay.portal.kernel.search.Hits search(long companyId,
297                    long userId, java.lang.String keywords, int start, int end)
298                    throws com.liferay.portal.kernel.exception.SystemException;
299    
300            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301            public com.liferay.portal.kernel.search.Hits search(long companyId,
302                    long userId, java.lang.String portletId, long groupId,
303                    java.lang.String type, java.lang.String keywords, int start, int end)
304                    throws com.liferay.portal.kernel.exception.SystemException;
305    
306            public com.liferay.portal.model.Company updateCompany(long companyId,
307                    java.lang.String virtualHostname, java.lang.String mx, int maxUsers)
308                    throws com.liferay.portal.kernel.exception.PortalException,
309                            com.liferay.portal.kernel.exception.SystemException;
310    
311            public com.liferay.portal.model.Company updateCompany(long companyId,
312                    java.lang.String virtualHostname, java.lang.String mx,
313                    java.lang.String homeURL, java.lang.String name,
314                    java.lang.String legalName, java.lang.String legalId,
315                    java.lang.String legalType, java.lang.String sicCode,
316                    java.lang.String tickerSymbol, java.lang.String industry,
317                    java.lang.String type, java.lang.String size)
318                    throws com.liferay.portal.kernel.exception.PortalException,
319                            com.liferay.portal.kernel.exception.SystemException;
320    
321            public void updateDisplay(long companyId, java.lang.String languageId,
322                    java.lang.String timeZoneId)
323                    throws com.liferay.portal.kernel.exception.PortalException,
324                            com.liferay.portal.kernel.exception.SystemException;
325    
326            public void updateLogo(long companyId, byte[] bytes)
327                    throws com.liferay.portal.kernel.exception.PortalException,
328                            com.liferay.portal.kernel.exception.SystemException;
329    
330            public void updateLogo(long companyId, java.io.File file)
331                    throws com.liferay.portal.kernel.exception.PortalException,
332                            com.liferay.portal.kernel.exception.SystemException;
333    
334            public void updateLogo(long companyId, java.io.InputStream is)
335                    throws com.liferay.portal.kernel.exception.PortalException,
336                            com.liferay.portal.kernel.exception.SystemException;
337    
338            public void updatePreferences(long companyId,
339                    com.liferay.portal.kernel.util.UnicodeProperties properties)
340                    throws com.liferay.portal.kernel.exception.SystemException;
341    
342            public void updateSecurity(long companyId, java.lang.String authType,
343                    boolean autoLogin, boolean sendPassword, boolean strangers,
344                    boolean strangersWithMx, boolean strangersVerify, boolean communityLogo)
345                    throws com.liferay.portal.kernel.exception.SystemException;
346    }