001
014
015 package com.liferay.message.boards.kernel.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.exportimport.kernel.lar.PortletDataContext;
020
021 import com.liferay.message.boards.kernel.model.MBCategory;
022
023 import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
024 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
025 import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
026 import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
027 import com.liferay.portal.kernel.dao.orm.Projection;
028 import com.liferay.portal.kernel.exception.PortalException;
029 import com.liferay.portal.kernel.exception.SystemException;
030 import com.liferay.portal.kernel.model.PersistedModel;
031 import com.liferay.portal.kernel.model.SystemEventConstants;
032 import com.liferay.portal.kernel.search.Indexable;
033 import com.liferay.portal.kernel.search.IndexableType;
034 import com.liferay.portal.kernel.service.BaseLocalService;
035 import com.liferay.portal.kernel.service.PersistedModelLocalService;
036 import com.liferay.portal.kernel.service.ServiceContext;
037 import com.liferay.portal.kernel.service.permission.ModelPermissions;
038 import com.liferay.portal.kernel.systemevent.SystemEvent;
039 import com.liferay.portal.kernel.transaction.Isolation;
040 import com.liferay.portal.kernel.transaction.Propagation;
041 import com.liferay.portal.kernel.transaction.Transactional;
042 import com.liferay.portal.kernel.util.OrderByComparator;
043
044 import java.io.Serializable;
045
046 import java.util.List;
047
048
060 @ProviderType
061 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
062 PortalException.class, SystemException.class})
063 public interface MBCategoryLocalService extends BaseLocalService,
064 PersistedModelLocalService {
065
070 public MBCategory addCategory(long userId, long parentCategoryId,
071 java.lang.String name, java.lang.String description,
072 java.lang.String displayStyle, java.lang.String emailAddress,
073 java.lang.String inProtocol, java.lang.String inServerName,
074 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
075 java.lang.String inPassword, int inReadInterval,
076 java.lang.String outEmailAddress, boolean outCustom,
077 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
078 java.lang.String outUserName, java.lang.String outPassword,
079 boolean allowAnonymous, boolean mailingListActive,
080 ServiceContext serviceContext) throws PortalException;
081
082 public MBCategory addCategory(long userId, long parentCategoryId,
083 java.lang.String name, java.lang.String description,
084 ServiceContext serviceContext) throws PortalException;
085
086 public void addCategoryResources(MBCategory category,
087 boolean addGroupPermissions, boolean addGuestPermissions)
088 throws PortalException;
089
090 public void addCategoryResources(MBCategory category,
091 ModelPermissions modelPermissions) throws PortalException;
092
093 public void addCategoryResources(long categoryId,
094 boolean addGroupPermissions, boolean addGuestPermissions)
095 throws PortalException;
096
097 public void addCategoryResources(long categoryId,
098 ModelPermissions modelPermissions) throws PortalException;
099
100
106 @Indexable(type = IndexableType.REINDEX)
107 public MBCategory addMBCategory(MBCategory mbCategory);
108
109
115 public MBCategory createMBCategory(long categoryId);
116
117 public void deleteCategories(long groupId) throws PortalException;
118
119 public void deleteCategory(MBCategory category) throws PortalException;
120
121 @SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
122 public void deleteCategory(MBCategory category,
123 boolean includeTrashedEntries) throws PortalException;
124
125 public void deleteCategory(long categoryId) throws PortalException;
126
127
134 @Indexable(type = IndexableType.DELETE)
135 public MBCategory deleteMBCategory(long categoryId)
136 throws PortalException;
137
138
144 @Indexable(type = IndexableType.DELETE)
145 public MBCategory deleteMBCategory(MBCategory mbCategory);
146
147
150 @Override
151 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
152 throws PortalException;
153
154 public DynamicQuery dynamicQuery();
155
156
162 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
163
164
176 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
177 int end);
178
179
192 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
193 int end, OrderByComparator<T> orderByComparator);
194
195
201 public long dynamicQueryCount(DynamicQuery dynamicQuery);
202
203
210 public long dynamicQueryCount(DynamicQuery dynamicQuery,
211 Projection projection);
212
213 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214 public MBCategory fetchMBCategory(long categoryId);
215
216
223 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224 public MBCategory fetchMBCategoryByUuidAndGroupId(java.lang.String uuid,
225 long groupId);
226
227 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
228 public ActionableDynamicQuery getActionableDynamicQuery();
229
230 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231 public List<MBCategory> getCategories(long groupId);
232
233 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234 public List<MBCategory> getCategories(long groupId,
235 long excludedCategoryId, long parentCategoryId, int status, int start,
236 int end);
237
238 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239 public List<MBCategory> getCategories(long groupId,
240 long[] excludedCategoryIds, long[] parentCategoryIds, int status,
241 int start, int end);
242
243 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
244 public List<MBCategory> getCategories(long groupId, long parentCategoryId,
245 int start, int end);
246
247 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248 public List<MBCategory> getCategories(long groupId, long parentCategoryId,
249 int status, int start, int end);
250
251 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
252 public List<MBCategory> getCategories(long groupId,
253 long[] parentCategoryIds, int start, int end);
254
255 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256 public List<MBCategory> getCategories(long groupId,
257 long[] parentCategoryIds, int status, int start, int end);
258
259 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
260 public List<MBCategory> getCategories(long groupId, int status);
261
262 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
263 public List<java.lang.Object> getCategoriesAndThreads(long groupId,
264 long categoryId);
265
266 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
267 public List<java.lang.Object> getCategoriesAndThreads(long groupId,
268 long categoryId, int status);
269
270 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
271 public List<java.lang.Object> getCategoriesAndThreads(long groupId,
272 long categoryId, int status, int start, int end);
273
274 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
275 public int getCategoriesAndThreadsCount(long groupId, long categoryId);
276
277 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
278 public int getCategoriesAndThreadsCount(long groupId, long categoryId,
279 int status);
280
281 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
282 public int getCategoriesCount(long groupId);
283
284 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
285 public int getCategoriesCount(long groupId, long excludedCategoryId,
286 long parentCategoryId, int status);
287
288 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
289 public int getCategoriesCount(long groupId, long[] excludedCategoryIds,
290 long[] parentCategoryIds, int status);
291
292 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293 public int getCategoriesCount(long groupId, long parentCategoryId);
294
295 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
296 public int getCategoriesCount(long groupId, long parentCategoryId,
297 int status);
298
299 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
300 public int getCategoriesCount(long groupId, long[] parentCategoryIds);
301
302 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
303 public int getCategoriesCount(long groupId, long[] parentCategoryIds,
304 int status);
305
306 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
307 public int getCategoriesCount(long groupId, int status);
308
309 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
310 public MBCategory getCategory(long categoryId) throws PortalException;
311
312 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
313 public List<MBCategory> getCompanyCategories(long companyId, int start,
314 int end);
315
316 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
317 public int getCompanyCategoriesCount(long companyId);
318
319 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
320 public ExportActionableDynamicQuery getExportActionableDynamicQuery(
321 PortletDataContext portletDataContext);
322
323 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
324 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
325
326
337 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
338 public List<MBCategory> getMBCategories(int start, int end);
339
340
347 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
348 public List<MBCategory> getMBCategoriesByUuidAndCompanyId(
349 java.lang.String uuid, long companyId);
350
351
361 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
362 public List<MBCategory> getMBCategoriesByUuidAndCompanyId(
363 java.lang.String uuid, long companyId, int start, int end,
364 OrderByComparator<MBCategory> orderByComparator);
365
366
371 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
372 public int getMBCategoriesCount();
373
374
381 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
382 public MBCategory getMBCategory(long categoryId) throws PortalException;
383
384
392 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
393 public MBCategory getMBCategoryByUuidAndGroupId(java.lang.String uuid,
394 long groupId) throws PortalException;
395
396
401 public java.lang.String getOSGiServiceIdentifier();
402
403 @Override
404 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
405 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
406 throws PortalException;
407
408 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
409 public List<java.lang.Long> getSubcategoryIds(
410 List<java.lang.Long> categoryIds, long groupId, long categoryId);
411
412 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
413 public List<MBCategory> getSubscribedCategories(long groupId, long userId,
414 int start, int end);
415
416 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
417 public int getSubscribedCategoriesCount(long groupId, long userId);
418
419 public void moveCategoriesToTrash(long groupId, long userId)
420 throws PortalException;
421
422 public MBCategory moveCategory(long categoryId, long parentCategoryId,
423 boolean mergeWithParentCategory) throws PortalException;
424
425 public MBCategory moveCategoryFromTrash(long userId, long categoryId,
426 long newCategoryId) throws PortalException;
427
428 public MBCategory moveCategoryToTrash(long userId, long categoryId)
429 throws PortalException;
430
431 public void restoreCategoryFromTrash(long userId, long categoryId)
432 throws PortalException;
433
434 public void subscribeCategory(long userId, long groupId, long categoryId)
435 throws PortalException;
436
437 public void unsubscribeCategory(long userId, long groupId, long categoryId)
438 throws PortalException;
439
440 public MBCategory updateCategory(long categoryId, long parentCategoryId,
441 java.lang.String name, java.lang.String description,
442 java.lang.String displayStyle, java.lang.String emailAddress,
443 java.lang.String inProtocol, java.lang.String inServerName,
444 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
445 java.lang.String inPassword, int inReadInterval,
446 java.lang.String outEmailAddress, boolean outCustom,
447 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
448 java.lang.String outUserName, java.lang.String outPassword,
449 boolean allowAnonymous, boolean mailingListActive,
450 boolean mergeWithParentCategory, ServiceContext serviceContext)
451 throws PortalException;
452
453
459 @Indexable(type = IndexableType.REINDEX)
460 public MBCategory updateMBCategory(MBCategory mbCategory);
461
462 public MBCategory updateMessageCount(long categoryId);
463
464 public MBCategory updateStatistics(long categoryId);
465
466 public MBCategory updateStatus(long userId, long categoryId, int status)
467 throws PortalException;
468
469 public MBCategory updateThreadCount(long categoryId);
470 }