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.portlet.messageboards.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    import com.liferay.portal.model.SystemEventConstants;
026    import com.liferay.portal.service.BaseLocalService;
027    import com.liferay.portal.service.PersistedModelLocalService;
028    
029    /**
030     * Provides the local service interface for MBCategory. Methods of this
031     * service will not have security checks based on the propagated JAAS
032     * credentials because this service can only be accessed from within the same
033     * VM.
034     *
035     * @author Brian Wing Shun Chan
036     * @see MBCategoryLocalServiceUtil
037     * @see com.liferay.portlet.messageboards.service.base.MBCategoryLocalServiceBaseImpl
038     * @see com.liferay.portlet.messageboards.service.impl.MBCategoryLocalServiceImpl
039     * @generated
040     */
041    @ProviderType
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface MBCategoryLocalService extends BaseLocalService,
045            PersistedModelLocalService {
046            /*
047             * NOTE FOR DEVELOPERS:
048             *
049             * Never modify or reference this interface directly. Always use {@link MBCategoryLocalServiceUtil} to access the message boards category local service. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBCategoryLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
050             */
051            public com.liferay.portlet.messageboards.model.MBCategory addCategory(
052                    long userId, long parentCategoryId, java.lang.String name,
053                    java.lang.String description, java.lang.String displayStyle,
054                    java.lang.String emailAddress, java.lang.String inProtocol,
055                    java.lang.String inServerName, int inServerPort, boolean inUseSSL,
056                    java.lang.String inUserName, java.lang.String inPassword,
057                    int inReadInterval, java.lang.String outEmailAddress,
058                    boolean outCustom, java.lang.String outServerName, int outServerPort,
059                    boolean outUseSSL, java.lang.String outUserName,
060                    java.lang.String outPassword, boolean allowAnonymous,
061                    boolean mailingListActive,
062                    com.liferay.portal.service.ServiceContext serviceContext)
063                    throws PortalException;
064    
065            public com.liferay.portlet.messageboards.model.MBCategory addCategory(
066                    long userId, long parentCategoryId, java.lang.String name,
067                    java.lang.String description,
068                    com.liferay.portal.service.ServiceContext serviceContext)
069                    throws PortalException;
070    
071            public void addCategoryResources(
072                    com.liferay.portlet.messageboards.model.MBCategory category,
073                    boolean addGroupPermissions, boolean addGuestPermissions)
074                    throws PortalException;
075    
076            public void addCategoryResources(
077                    com.liferay.portlet.messageboards.model.MBCategory category,
078                    com.liferay.portal.service.permission.ModelPermissions modelPermissions)
079                    throws PortalException;
080    
081            public void addCategoryResources(long categoryId,
082                    boolean addGroupPermissions, boolean addGuestPermissions)
083                    throws PortalException;
084    
085            public void addCategoryResources(long categoryId,
086                    com.liferay.portal.service.permission.ModelPermissions modelPermissions)
087                    throws PortalException;
088    
089            /**
090            * Adds the message boards category to the database. Also notifies the appropriate model listeners.
091            *
092            * @param mbCategory the message boards category
093            * @return the message boards category that was added
094            */
095            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
096            public com.liferay.portlet.messageboards.model.MBCategory addMBCategory(
097                    com.liferay.portlet.messageboards.model.MBCategory mbCategory);
098    
099            /**
100            * Creates a new message boards category with the primary key. Does not add the message boards category to the database.
101            *
102            * @param categoryId the primary key for the new message boards category
103            * @return the new message boards category
104            */
105            public com.liferay.portlet.messageboards.model.MBCategory createMBCategory(
106                    long categoryId);
107    
108            public void deleteCategories(long groupId) throws PortalException;
109    
110            public void deleteCategory(
111                    com.liferay.portlet.messageboards.model.MBCategory category)
112                    throws PortalException;
113    
114            @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
115            public void deleteCategory(
116                    com.liferay.portlet.messageboards.model.MBCategory category,
117                    boolean includeTrashedEntries) throws PortalException;
118    
119            public void deleteCategory(long categoryId) throws PortalException;
120    
121            /**
122            * Deletes the message boards category with the primary key from the database. Also notifies the appropriate model listeners.
123            *
124            * @param categoryId the primary key of the message boards category
125            * @return the message boards category that was removed
126            * @throws PortalException if a message boards category with the primary key could not be found
127            */
128            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
129            public com.liferay.portlet.messageboards.model.MBCategory deleteMBCategory(
130                    long categoryId) throws PortalException;
131    
132            /**
133            * Deletes the message boards category from the database. Also notifies the appropriate model listeners.
134            *
135            * @param mbCategory the message boards category
136            * @return the message boards category that was removed
137            */
138            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
139            public com.liferay.portlet.messageboards.model.MBCategory deleteMBCategory(
140                    com.liferay.portlet.messageboards.model.MBCategory mbCategory);
141    
142            /**
143            * @throws PortalException
144            */
145            @Override
146            public com.liferay.portal.model.PersistedModel deletePersistedModel(
147                    com.liferay.portal.model.PersistedModel persistedModel)
148                    throws PortalException;
149    
150            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
151    
152            /**
153            * Performs a dynamic query on the database and returns the matching rows.
154            *
155            * @param dynamicQuery the dynamic query
156            * @return the matching rows
157            */
158            public <T> java.util.List<T> dynamicQuery(
159                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
160    
161            /**
162            * Performs a dynamic query on the database and returns a range of the matching rows.
163            *
164            * <p>
165            * 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.portlet.messageboards.model.impl.MBCategoryModelImpl}. 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.
166            * </p>
167            *
168            * @param dynamicQuery the dynamic query
169            * @param start the lower bound of the range of model instances
170            * @param end the upper bound of the range of model instances (not inclusive)
171            * @return the range of matching rows
172            */
173            public <T> java.util.List<T> dynamicQuery(
174                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
175                    int end);
176    
177            /**
178            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
179            *
180            * <p>
181            * 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.portlet.messageboards.model.impl.MBCategoryModelImpl}. 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.
182            * </p>
183            *
184            * @param dynamicQuery the dynamic query
185            * @param start the lower bound of the range of model instances
186            * @param end the upper bound of the range of model instances (not inclusive)
187            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
188            * @return the ordered range of matching rows
189            */
190            public <T> java.util.List<T> dynamicQuery(
191                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
192                    int end,
193                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
194    
195            /**
196            * Returns the number of rows matching the dynamic query.
197            *
198            * @param dynamicQuery the dynamic query
199            * @return the number of rows matching the dynamic query
200            */
201            public long dynamicQueryCount(
202                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
203    
204            /**
205            * Returns the number of rows matching the dynamic query.
206            *
207            * @param dynamicQuery the dynamic query
208            * @param projection the projection to apply to the query
209            * @return the number of rows matching the dynamic query
210            */
211            public long dynamicQueryCount(
212                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
213                    com.liferay.portal.kernel.dao.orm.Projection projection);
214    
215            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216            public com.liferay.portlet.messageboards.model.MBCategory fetchMBCategory(
217                    long categoryId);
218    
219            /**
220            * Returns the message boards category matching the UUID and group.
221            *
222            * @param uuid the message boards category's UUID
223            * @param groupId the primary key of the group
224            * @return the matching message boards category, or <code>null</code> if a matching message boards category could not be found
225            */
226            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
227            public com.liferay.portlet.messageboards.model.MBCategory fetchMBCategoryByUuidAndGroupId(
228                    java.lang.String uuid, long groupId);
229    
230            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
232    
233            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
235                    long groupId);
236    
237            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
239                    long groupId, long excludedCategoryId, long parentCategoryId,
240                    int status, int start, int end);
241    
242            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
244                    long groupId, long[] excludedCategoryIds, long[] parentCategoryIds,
245                    int status, int start, int end);
246    
247            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
249                    long groupId, long parentCategoryId, int start, int end);
250    
251            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
252            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
253                    long groupId, long parentCategoryId, int status, int start, int end);
254    
255            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
257                    long groupId, long[] parentCategoryIds, int start, int end);
258    
259            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
260            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
261                    long groupId, long[] parentCategoryIds, int status, int start, int end);
262    
263            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
264            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
265                    long groupId, int status);
266    
267            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268            public java.util.List<java.lang.Object> getCategoriesAndThreads(
269                    long groupId, long categoryId);
270    
271            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
272            public int getCategoriesCount(long groupId);
273    
274            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
275            public int getCategoriesCount(long groupId, long excludedCategoryId,
276                    long parentCategoryId, int status);
277    
278            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279            public int getCategoriesCount(long groupId, long[] excludedCategoryIds,
280                    long[] parentCategoryIds, int status);
281    
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public int getCategoriesCount(long groupId, long parentCategoryId);
284    
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public int getCategoriesCount(long groupId, long parentCategoryId,
287                    int status);
288    
289            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
290            public int getCategoriesCount(long groupId, long[] parentCategoryIds);
291    
292            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293            public int getCategoriesCount(long groupId, long[] parentCategoryIds,
294                    int status);
295    
296            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297            public int getCategoriesCount(long groupId, int status);
298    
299            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
300            public com.liferay.portlet.messageboards.model.MBCategory getCategory(
301                    long categoryId) throws PortalException;
302    
303            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
304            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCompanyCategories(
305                    long companyId, int start, int end);
306    
307            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
308            public int getCompanyCategoriesCount(long companyId);
309    
310            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
312                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
313    
314            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
315            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
316    
317            /**
318            * Returns a range of all the message boards categories.
319            *
320            * <p>
321            * 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.portlet.messageboards.model.impl.MBCategoryModelImpl}. 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.
322            * </p>
323            *
324            * @param start the lower bound of the range of message boards categories
325            * @param end the upper bound of the range of message boards categories (not inclusive)
326            * @return the range of message boards categories
327            */
328            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
329            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getMBCategories(
330                    int start, int end);
331    
332            /**
333            * Returns all the message boards categories matching the UUID and company.
334            *
335            * @param uuid the UUID of the message boards categories
336            * @param companyId the primary key of the company
337            * @return the matching message boards categories, or an empty list if no matches were found
338            */
339            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
340            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getMBCategoriesByUuidAndCompanyId(
341                    java.lang.String uuid, long companyId);
342    
343            /**
344            * Returns a range of message boards categories matching the UUID and company.
345            *
346            * @param uuid the UUID of the message boards categories
347            * @param companyId the primary key of the company
348            * @param start the lower bound of the range of message boards categories
349            * @param end the upper bound of the range of message boards categories (not inclusive)
350            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
351            * @return the range of matching message boards categories, or an empty list if no matches were found
352            */
353            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
354            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getMBCategoriesByUuidAndCompanyId(
355                    java.lang.String uuid, long companyId, int start, int end,
356                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBCategory> orderByComparator);
357    
358            /**
359            * Returns the number of message boards categories.
360            *
361            * @return the number of message boards categories
362            */
363            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
364            public int getMBCategoriesCount();
365    
366            /**
367            * Returns the message boards category with the primary key.
368            *
369            * @param categoryId the primary key of the message boards category
370            * @return the message boards category
371            * @throws PortalException if a message boards category with the primary key could not be found
372            */
373            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
374            public com.liferay.portlet.messageboards.model.MBCategory getMBCategory(
375                    long categoryId) throws PortalException;
376    
377            /**
378            * Returns the message boards category matching the UUID and group.
379            *
380            * @param uuid the message boards category's UUID
381            * @param groupId the primary key of the group
382            * @return the matching message boards category
383            * @throws PortalException if a matching message boards category could not be found
384            */
385            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
386            public com.liferay.portlet.messageboards.model.MBCategory getMBCategoryByUuidAndGroupId(
387                    java.lang.String uuid, long groupId) throws PortalException;
388    
389            /**
390            * Returns the OSGi service identifier.
391            *
392            * @return the OSGi service identifier
393            */
394            public java.lang.String getOSGiServiceIdentifier();
395    
396            @Override
397            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
398            public com.liferay.portal.model.PersistedModel getPersistedModel(
399                    java.io.Serializable primaryKeyObj) throws PortalException;
400    
401            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
402            public java.util.List<java.lang.Long> getSubcategoryIds(
403                    java.util.List<java.lang.Long> categoryIds, long groupId,
404                    long categoryId);
405    
406            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
407            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
408                    long groupId, long userId, int start, int end);
409    
410            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
411            public int getSubscribedCategoriesCount(long groupId, long userId);
412    
413            public void moveCategoriesToTrash(long groupId, long userId)
414                    throws PortalException;
415    
416            public com.liferay.portlet.messageboards.model.MBCategory moveCategory(
417                    long categoryId, long parentCategoryId, boolean mergeWithParentCategory)
418                    throws PortalException;
419    
420            public com.liferay.portlet.messageboards.model.MBCategory moveCategoryFromTrash(
421                    long userId, long categoryId, long newCategoryId)
422                    throws PortalException;
423    
424            public com.liferay.portlet.messageboards.model.MBCategory moveCategoryToTrash(
425                    long userId, long categoryId) throws PortalException;
426    
427            public void restoreCategoryFromTrash(long userId, long categoryId)
428                    throws PortalException;
429    
430            public void subscribeCategory(long userId, long groupId, long categoryId)
431                    throws PortalException;
432    
433            public void unsubscribeCategory(long userId, long groupId, long categoryId)
434                    throws PortalException;
435    
436            public com.liferay.portlet.messageboards.model.MBCategory updateCategory(
437                    long categoryId, long parentCategoryId, java.lang.String name,
438                    java.lang.String description, java.lang.String displayStyle,
439                    java.lang.String emailAddress, java.lang.String inProtocol,
440                    java.lang.String inServerName, int inServerPort, boolean inUseSSL,
441                    java.lang.String inUserName, java.lang.String inPassword,
442                    int inReadInterval, java.lang.String outEmailAddress,
443                    boolean outCustom, java.lang.String outServerName, int outServerPort,
444                    boolean outUseSSL, java.lang.String outUserName,
445                    java.lang.String outPassword, boolean allowAnonymous,
446                    boolean mailingListActive, boolean mergeWithParentCategory,
447                    com.liferay.portal.service.ServiceContext serviceContext)
448                    throws PortalException;
449    
450            /**
451            * Updates the message boards category in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
452            *
453            * @param mbCategory the message boards category
454            * @return the message boards category that was updated
455            */
456            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
457            public com.liferay.portlet.messageboards.model.MBCategory updateMBCategory(
458                    com.liferay.portlet.messageboards.model.MBCategory mbCategory);
459    
460            public com.liferay.portlet.messageboards.model.MBCategory updateMessageCount(
461                    long categoryId);
462    
463            public com.liferay.portlet.messageboards.model.MBCategory updateStatistics(
464                    long categoryId);
465    
466            public com.liferay.portlet.messageboards.model.MBCategory updateStatus(
467                    long userId, long categoryId, int status) throws PortalException;
468    
469            public com.liferay.portlet.messageboards.model.MBCategory updateThreadCount(
470                    long categoryId);
471    }