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 com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.PortalException;
070    
071            public void addCategoryResources(
072                    com.liferay.portlet.messageboards.model.MBCategory category,
073                    boolean addGroupPermissions, boolean addGuestPermissions)
074                    throws com.liferay.portal.kernel.exception.PortalException;
075    
076            public void addCategoryResources(
077                    com.liferay.portlet.messageboards.model.MBCategory category,
078                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
079                    throws com.liferay.portal.kernel.exception.PortalException;
080    
081            public void addCategoryResources(long categoryId,
082                    boolean addGroupPermissions, boolean addGuestPermissions)
083                    throws com.liferay.portal.kernel.exception.PortalException;
084    
085            public void addCategoryResources(long categoryId,
086                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
087                    throws com.liferay.portal.kernel.exception.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)
109                    throws com.liferay.portal.kernel.exception.PortalException;
110    
111            @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
112            public void deleteCategory(
113                    com.liferay.portlet.messageboards.model.MBCategory category)
114                    throws com.liferay.portal.kernel.exception.PortalException;
115    
116            @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
117            public void deleteCategory(
118                    com.liferay.portlet.messageboards.model.MBCategory category,
119                    boolean includeTrashedEntries)
120                    throws com.liferay.portal.kernel.exception.PortalException;
121    
122            public void deleteCategory(long categoryId)
123                    throws com.liferay.portal.kernel.exception.PortalException;
124    
125            /**
126            * Deletes the message boards category with the primary key from the database. Also notifies the appropriate model listeners.
127            *
128            * @param categoryId the primary key of the message boards category
129            * @return the message boards category that was removed
130            * @throws PortalException if a message boards category with the primary key could not be found
131            */
132            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
133            public com.liferay.portlet.messageboards.model.MBCategory deleteMBCategory(
134                    long categoryId)
135                    throws com.liferay.portal.kernel.exception.PortalException;
136    
137            /**
138            * Deletes the message boards category from the database. Also notifies the appropriate model listeners.
139            *
140            * @param mbCategory the message boards category
141            * @return the message boards category that was removed
142            */
143            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
144            public com.liferay.portlet.messageboards.model.MBCategory deleteMBCategory(
145                    com.liferay.portlet.messageboards.model.MBCategory mbCategory);
146    
147            /**
148            * @throws PortalException
149            */
150            @Override
151            public com.liferay.portal.model.PersistedModel deletePersistedModel(
152                    com.liferay.portal.model.PersistedModel persistedModel)
153                    throws com.liferay.portal.kernel.exception.PortalException;
154    
155            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
156    
157            /**
158            * Performs a dynamic query on the database and returns the matching rows.
159            *
160            * @param dynamicQuery the dynamic query
161            * @return the matching rows
162            */
163            public <T> java.util.List<T> dynamicQuery(
164                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
165    
166            /**
167            * Performs a dynamic query on the database and returns a range of the matching rows.
168            *
169            * <p>
170            * 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.
171            * </p>
172            *
173            * @param dynamicQuery the dynamic query
174            * @param start the lower bound of the range of model instances
175            * @param end the upper bound of the range of model instances (not inclusive)
176            * @return the range of matching rows
177            */
178            public <T> java.util.List<T> dynamicQuery(
179                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
180                    int end);
181    
182            /**
183            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
184            *
185            * <p>
186            * 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.
187            * </p>
188            *
189            * @param dynamicQuery the dynamic query
190            * @param start the lower bound of the range of model instances
191            * @param end the upper bound of the range of model instances (not inclusive)
192            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
193            * @return the ordered range of matching rows
194            */
195            public <T> java.util.List<T> dynamicQuery(
196                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
197                    int end,
198                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
199    
200            /**
201            * Returns the number of rows that match the dynamic query.
202            *
203            * @param dynamicQuery the dynamic query
204            * @return the number of rows that match the dynamic query
205            */
206            public long dynamicQueryCount(
207                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
208    
209            /**
210            * Returns the number of rows that match the dynamic query.
211            *
212            * @param dynamicQuery the dynamic query
213            * @param projection the projection to apply to the query
214            * @return the number of rows that match the dynamic query
215            */
216            public long dynamicQueryCount(
217                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
218                    com.liferay.portal.kernel.dao.orm.Projection projection);
219    
220            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221            public com.liferay.portlet.messageboards.model.MBCategory fetchMBCategory(
222                    long categoryId);
223    
224            /**
225            * Returns the message boards category matching the UUID and group.
226            *
227            * @param uuid the message boards category's UUID
228            * @param groupId the primary key of the group
229            * @return the matching message boards category, or <code>null</code> if a matching message boards category could not be found
230            */
231            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
232            public com.liferay.portlet.messageboards.model.MBCategory fetchMBCategoryByUuidAndGroupId(
233                    java.lang.String uuid, long groupId);
234    
235            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
237    
238            /**
239            * Returns the Spring bean ID for this bean.
240            *
241            * @return the Spring bean ID for this bean
242            */
243            public java.lang.String getBeanIdentifier();
244    
245            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
247                    long groupId);
248    
249            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
251                    long groupId, long excludedCategoryId, long parentCategoryId,
252                    int status, int start, int end);
253    
254            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
256                    long groupId, long[] excludedCategoryIds, long[] parentCategoryIds,
257                    int status, 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 parentCategoryId, 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, long parentCategoryId, int status, int start, int end);
266    
267            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
269                    long groupId, long[] parentCategoryIds, int start, int end);
270    
271            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
272            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
273                    long groupId, long[] parentCategoryIds, int status, int start, int end);
274    
275            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
277                    long groupId, int status);
278    
279            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
280            public java.util.List<java.lang.Object> getCategoriesAndThreads(
281                    long groupId, long categoryId);
282    
283            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
284            public int getCategoriesCount(long groupId);
285    
286            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287            public int getCategoriesCount(long groupId, long excludedCategoryId,
288                    long parentCategoryId, int status);
289    
290            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
291            public int getCategoriesCount(long groupId, long[] excludedCategoryIds,
292                    long[] parentCategoryIds, int status);
293    
294            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
295            public int getCategoriesCount(long groupId, long parentCategoryId);
296    
297            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
298            public int getCategoriesCount(long groupId, long parentCategoryId,
299                    int status);
300    
301            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302            public int getCategoriesCount(long groupId, long[] parentCategoryIds);
303    
304            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305            public int getCategoriesCount(long groupId, long[] parentCategoryIds,
306                    int status);
307    
308            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309            public int getCategoriesCount(long groupId, int status);
310    
311            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
312            public com.liferay.portlet.messageboards.model.MBCategory getCategory(
313                    long categoryId)
314                    throws com.liferay.portal.kernel.exception.PortalException;
315    
316            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
317            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCompanyCategories(
318                    long companyId, int start, int end);
319    
320            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
321            public int getCompanyCategoriesCount(long companyId);
322    
323            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
324            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
325                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext);
326    
327            /**
328            * Returns a range of all the message boards categories.
329            *
330            * <p>
331            * 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.
332            * </p>
333            *
334            * @param start the lower bound of the range of message boards categories
335            * @param end the upper bound of the range of message boards categories (not inclusive)
336            * @return the range of message boards categories
337            */
338            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
339            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getMBCategories(
340                    int start, int end);
341    
342            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
343            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getMBCategoriesByUuidAndCompanyId(
344                    java.lang.String uuid, long companyId);
345    
346            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
347            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getMBCategoriesByUuidAndCompanyId(
348                    java.lang.String uuid, long companyId, int start, int end,
349                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBCategory> orderByComparator);
350    
351            /**
352            * Returns the number of message boards categories.
353            *
354            * @return the number of message boards categories
355            */
356            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
357            public int getMBCategoriesCount();
358    
359            /**
360            * Returns the message boards category with the primary key.
361            *
362            * @param categoryId the primary key of the message boards category
363            * @return the message boards category
364            * @throws PortalException if a message boards category with the primary key could not be found
365            */
366            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
367            public com.liferay.portlet.messageboards.model.MBCategory getMBCategory(
368                    long categoryId)
369                    throws com.liferay.portal.kernel.exception.PortalException;
370    
371            /**
372            * Returns the message boards category matching the UUID and group.
373            *
374            * @param uuid the message boards category's UUID
375            * @param groupId the primary key of the group
376            * @return the matching message boards category
377            * @throws PortalException if a matching message boards category could not be found
378            */
379            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
380            public com.liferay.portlet.messageboards.model.MBCategory getMBCategoryByUuidAndGroupId(
381                    java.lang.String uuid, long groupId)
382                    throws com.liferay.portal.kernel.exception.PortalException;
383    
384            @Override
385            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
386            public com.liferay.portal.model.PersistedModel getPersistedModel(
387                    java.io.Serializable primaryKeyObj)
388                    throws com.liferay.portal.kernel.exception.PortalException;
389    
390            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
391            public java.util.List<java.lang.Long> getSubcategoryIds(
392                    java.util.List<java.lang.Long> categoryIds, long groupId,
393                    long categoryId);
394    
395            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
396            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
397                    long groupId, long userId, int start, int end);
398    
399            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
400            public int getSubscribedCategoriesCount(long groupId, long userId);
401    
402            public void moveCategoriesToTrash(long groupId, long userId)
403                    throws com.liferay.portal.kernel.exception.PortalException;
404    
405            public com.liferay.portlet.messageboards.model.MBCategory moveCategory(
406                    long categoryId, long parentCategoryId, boolean mergeWithParentCategory)
407                    throws com.liferay.portal.kernel.exception.PortalException;
408    
409            public com.liferay.portlet.messageboards.model.MBCategory moveCategoryFromTrash(
410                    long userId, long categoryId, long newCategoryId)
411                    throws com.liferay.portal.kernel.exception.PortalException;
412    
413            public com.liferay.portlet.messageboards.model.MBCategory moveCategoryToTrash(
414                    long userId, long categoryId)
415                    throws com.liferay.portal.kernel.exception.PortalException;
416    
417            public void restoreCategoryFromTrash(long userId, long categoryId)
418                    throws com.liferay.portal.kernel.exception.PortalException;
419    
420            /**
421            * Sets the Spring bean ID for this bean.
422            *
423            * @param beanIdentifier the Spring bean ID for this bean
424            */
425            public void setBeanIdentifier(java.lang.String beanIdentifier);
426    
427            public void subscribeCategory(long userId, long groupId, long categoryId)
428                    throws com.liferay.portal.kernel.exception.PortalException;
429    
430            public void unsubscribeCategory(long userId, long groupId, long categoryId)
431                    throws com.liferay.portal.kernel.exception.PortalException;
432    
433            public com.liferay.portlet.messageboards.model.MBCategory updateCategory(
434                    long categoryId, long parentCategoryId, java.lang.String name,
435                    java.lang.String description, java.lang.String displayStyle,
436                    java.lang.String emailAddress, java.lang.String inProtocol,
437                    java.lang.String inServerName, int inServerPort, boolean inUseSSL,
438                    java.lang.String inUserName, java.lang.String inPassword,
439                    int inReadInterval, java.lang.String outEmailAddress,
440                    boolean outCustom, java.lang.String outServerName, int outServerPort,
441                    boolean outUseSSL, java.lang.String outUserName,
442                    java.lang.String outPassword, boolean allowAnonymous,
443                    boolean mailingListActive, boolean mergeWithParentCategory,
444                    com.liferay.portal.service.ServiceContext serviceContext)
445                    throws com.liferay.portal.kernel.exception.PortalException;
446    
447            /**
448            * Updates the message boards category in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
449            *
450            * @param mbCategory the message boards category
451            * @return the message boards category that was updated
452            */
453            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
454            public com.liferay.portlet.messageboards.model.MBCategory updateMBCategory(
455                    com.liferay.portlet.messageboards.model.MBCategory mbCategory);
456    
457            public com.liferay.portlet.messageboards.model.MBCategory updateStatus(
458                    long userId, long categoryId, int status)
459                    throws com.liferay.portal.kernel.exception.PortalException;
460    }