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 ServiceContext serviceContext) throws PortalException;
073
074 public MBCategory addCategory(long userId, long parentCategoryId,
075 java.lang.String name, java.lang.String description,
076 java.lang.String displayStyle, java.lang.String emailAddress,
077 java.lang.String inProtocol, java.lang.String inServerName,
078 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
079 java.lang.String inPassword, int inReadInterval,
080 java.lang.String outEmailAddress, boolean outCustom,
081 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
082 java.lang.String outUserName, java.lang.String outPassword,
083 boolean allowAnonymous, boolean mailingListActive,
084 ServiceContext serviceContext) throws PortalException;
085
086
092 @Indexable(type = IndexableType.REINDEX)
093 public MBCategory addMBCategory(MBCategory mbCategory);
094
095
101 public MBCategory createMBCategory(long categoryId);
102
103
109 @Indexable(type = IndexableType.DELETE)
110 public MBCategory deleteMBCategory(MBCategory mbCategory);
111
112
119 @Indexable(type = IndexableType.DELETE)
120 public MBCategory deleteMBCategory(long categoryId)
121 throws PortalException;
122
123 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
124 public MBCategory fetchMBCategory(long categoryId);
125
126
133 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134 public MBCategory fetchMBCategoryByUuidAndGroupId(java.lang.String uuid,
135 long groupId);
136
137 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138 public MBCategory getCategory(long categoryId) throws PortalException;
139
140
147 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
148 public MBCategory getMBCategory(long categoryId) throws PortalException;
149
150
158 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
159 public MBCategory getMBCategoryByUuidAndGroupId(java.lang.String uuid,
160 long groupId) throws PortalException;
161
162 public MBCategory moveCategory(long categoryId, long parentCategoryId,
163 boolean mergeWithParentCategory) throws PortalException;
164
165 public MBCategory moveCategoryFromTrash(long userId, long categoryId,
166 long newCategoryId) throws PortalException;
167
168 public MBCategory moveCategoryToTrash(long userId, long categoryId)
169 throws PortalException;
170
171 public MBCategory updateCategory(long categoryId, long parentCategoryId,
172 java.lang.String name, java.lang.String description,
173 java.lang.String displayStyle, java.lang.String emailAddress,
174 java.lang.String inProtocol, java.lang.String inServerName,
175 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
176 java.lang.String inPassword, int inReadInterval,
177 java.lang.String outEmailAddress, boolean outCustom,
178 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
179 java.lang.String outUserName, java.lang.String outPassword,
180 boolean allowAnonymous, boolean mailingListActive,
181 boolean mergeWithParentCategory, ServiceContext serviceContext)
182 throws PortalException;
183
184
190 @Indexable(type = IndexableType.REINDEX)
191 public MBCategory updateMBCategory(MBCategory mbCategory);
192
193 public MBCategory updateMessageCount(long categoryId);
194
195 public MBCategory updateStatistics(long categoryId);
196
197 public MBCategory updateStatus(long userId, long categoryId, int status)
198 throws PortalException;
199
200 public MBCategory updateThreadCount(long categoryId);
201
202 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203 public ActionableDynamicQuery getActionableDynamicQuery();
204
205 public DynamicQuery dynamicQuery();
206
207 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208 public ExportActionableDynamicQuery getExportActionableDynamicQuery(
209 PortletDataContext portletDataContext);
210
211 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
212 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
213
214
217 @Override
218 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
219 throws PortalException;
220
221 @Override
222 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
224 throws PortalException;
225
226 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
227 public int getCategoriesAndThreadsCount(long groupId, long categoryId);
228
229 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230 public int getCategoriesAndThreadsCount(long groupId, long categoryId,
231 int status);
232
233 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234 public int getCategoriesCount(long groupId);
235
236 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
237 public int getCategoriesCount(long groupId, int status);
238
239 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240 public int getCategoriesCount(long groupId, long excludedCategoryId,
241 long parentCategoryId, int status);
242
243 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
244 public int getCategoriesCount(long groupId, long parentCategoryId);
245
246 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
247 public int getCategoriesCount(long groupId, long parentCategoryId,
248 int status);
249
250 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
251 public int getCategoriesCount(long groupId, long[] excludedCategoryIds,
252 long[] parentCategoryIds, int status);
253
254 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255 public int getCategoriesCount(long groupId, long[] parentCategoryIds);
256
257 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
258 public int getCategoriesCount(long groupId, long[] parentCategoryIds,
259 int status);
260
261 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262 public int getCompanyCategoriesCount(long companyId);
263
264
269 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
270 public int getMBCategoriesCount();
271
272 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273 public int getSubscribedCategoriesCount(long groupId, long userId);
274
275
280 public java.lang.String getOSGiServiceIdentifier();
281
282
288 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
289
290
302 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
303 int end);
304
305
318 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
319 int end, OrderByComparator<T> orderByComparator);
320
321 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
322 public List<MBCategory> getCategories(long groupId);
323
324 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325 public List<MBCategory> getCategories(long groupId, int status);
326
327 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328 public List<MBCategory> getCategories(long groupId,
329 long excludedCategoryId, long parentCategoryId, int status, int start,
330 int end);
331
332 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
333 public List<MBCategory> getCategories(long groupId, long parentCategoryId,
334 int start, int end);
335
336 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
337 public List<MBCategory> getCategories(long groupId, long parentCategoryId,
338 int status, int start, int end);
339
340 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
341 public List<MBCategory> getCategories(long groupId,
342 long[] excludedCategoryIds, long[] parentCategoryIds, int status,
343 int start, int end);
344
345 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
346 public List<MBCategory> getCategories(long groupId,
347 long[] parentCategoryIds, int start, int end);
348
349 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
350 public List<MBCategory> getCategories(long groupId,
351 long[] parentCategoryIds, int status, int start, int end);
352
353 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
354 public List<java.lang.Object> getCategoriesAndThreads(long groupId,
355 long categoryId);
356
357 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
358 public List<java.lang.Object> getCategoriesAndThreads(long groupId,
359 long categoryId, int status);
360
361 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
362 public List<java.lang.Object> getCategoriesAndThreads(long groupId,
363 long categoryId, int status, int start, int end);
364
365 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
366 public List<MBCategory> getCompanyCategories(long companyId, int start,
367 int end);
368
369
380 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
381 public List<MBCategory> getMBCategories(int start, int end);
382
383
390 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
391 public List<MBCategory> getMBCategoriesByUuidAndCompanyId(
392 java.lang.String uuid, long companyId);
393
394
404 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
405 public List<MBCategory> getMBCategoriesByUuidAndCompanyId(
406 java.lang.String uuid, long companyId, int start, int end,
407 OrderByComparator<MBCategory> orderByComparator);
408
409 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
410 public List<java.lang.Long> getSubcategoryIds(
411 List<java.lang.Long> categoryIds, long groupId, long categoryId);
412
413 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
414 public List<MBCategory> getSubscribedCategories(long groupId, long userId,
415 int start, int end);
416
417
423 public long dynamicQueryCount(DynamicQuery dynamicQuery);
424
425
432 public long dynamicQueryCount(DynamicQuery dynamicQuery,
433 Projection projection);
434
435 public void addCategoryResources(MBCategory category,
436 boolean addGroupPermissions, boolean addGuestPermissions)
437 throws PortalException;
438
439 public void addCategoryResources(MBCategory category,
440 ModelPermissions modelPermissions) throws PortalException;
441
442 public void addCategoryResources(long categoryId,
443 boolean addGroupPermissions, boolean addGuestPermissions)
444 throws PortalException;
445
446 public void addCategoryResources(long categoryId,
447 ModelPermissions modelPermissions) throws PortalException;
448
449 public void deleteCategories(long groupId) throws PortalException;
450
451 public void deleteCategory(MBCategory category) throws PortalException;
452
453 @SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
454 public void deleteCategory(MBCategory category,
455 boolean includeTrashedEntries) throws PortalException;
456
457 public void deleteCategory(long categoryId) throws PortalException;
458
459 public void moveCategoriesToTrash(long groupId, long userId)
460 throws PortalException;
461
462 public void restoreCategoryFromTrash(long userId, long categoryId)
463 throws PortalException;
464
465 public void subscribeCategory(long userId, long groupId, long categoryId)
466 throws PortalException;
467
468 public void unsubscribeCategory(long userId, long groupId, long categoryId)
469 throws PortalException;
470 }