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