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.MBMessage;
022 import com.liferay.message.boards.kernel.model.MBThread;
023
024 import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
025 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
026 import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
027 import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
028 import com.liferay.portal.kernel.dao.orm.Projection;
029 import com.liferay.portal.kernel.dao.orm.QueryDefinition;
030 import com.liferay.portal.kernel.exception.PortalException;
031 import com.liferay.portal.kernel.exception.SystemException;
032 import com.liferay.portal.kernel.increment.BufferedIncrement;
033 import com.liferay.portal.kernel.model.PersistedModel;
034 import com.liferay.portal.kernel.model.SystemEventConstants;
035 import com.liferay.portal.kernel.search.Hits;
036 import com.liferay.portal.kernel.search.Indexable;
037 import com.liferay.portal.kernel.search.IndexableType;
038 import com.liferay.portal.kernel.service.BaseLocalService;
039 import com.liferay.portal.kernel.service.PersistedModelLocalService;
040 import com.liferay.portal.kernel.service.ServiceContext;
041 import com.liferay.portal.kernel.systemevent.SystemEvent;
042 import com.liferay.portal.kernel.transaction.Isolation;
043 import com.liferay.portal.kernel.transaction.Propagation;
044 import com.liferay.portal.kernel.transaction.Transactional;
045 import com.liferay.portal.kernel.util.OrderByComparator;
046
047 import java.io.Serializable;
048
049 import java.util.List;
050
051
063 @ProviderType
064 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
065 PortalException.class, SystemException.class})
066 public interface MBThreadLocalService extends BaseLocalService,
067 PersistedModelLocalService {
068
073
074
080 @Indexable(type = IndexableType.REINDEX)
081 public MBThread addMBThread(MBThread mbThread);
082
083 public MBThread addThread(long categoryId, MBMessage message,
084 ServiceContext serviceContext) throws PortalException;
085
086
092 public MBThread createMBThread(long threadId);
093
094
100 @Indexable(type = IndexableType.DELETE)
101 public MBThread deleteMBThread(MBThread mbThread);
102
103
110 @Indexable(type = IndexableType.DELETE)
111 public MBThread deleteMBThread(long threadId) throws PortalException;
112
113
116 @Override
117 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
118 throws PortalException;
119
120 @SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
121 public void deleteThread(MBThread thread) throws PortalException;
122
123 public void deleteThread(long threadId) throws PortalException;
124
125 public void deleteThreads(long groupId, long categoryId)
126 throws PortalException;
127
128 public void deleteThreads(long groupId, long categoryId,
129 boolean includeTrashedEntries) throws PortalException;
130
131 public DynamicQuery dynamicQuery();
132
133
139 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
140
141
153 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
154 int end);
155
156
169 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
170 int end, OrderByComparator<T> orderByComparator);
171
172
178 public long dynamicQueryCount(DynamicQuery dynamicQuery);
179
180
187 public long dynamicQueryCount(DynamicQuery dynamicQuery,
188 Projection projection);
189
190 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191 public MBThread fetchMBThread(long threadId);
192
193
200 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201 public MBThread fetchMBThreadByUuidAndGroupId(java.lang.String uuid,
202 long groupId);
203
204 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205 public MBThread fetchThread(long threadId);
206
207 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208 public ActionableDynamicQuery getActionableDynamicQuery();
209
210 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211 public int getCategoryThreadsCount(long groupId, long categoryId, int status);
212
213 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214 public ExportActionableDynamicQuery getExportActionableDynamicQuery(
215 PortletDataContext portletDataContext);
216
217 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218 public List<MBThread> getGroupThreads(long groupId,
219 QueryDefinition<MBThread> queryDefinition);
220
221 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222 public List<MBThread> getGroupThreads(long groupId, long userId,
223 QueryDefinition<MBThread> queryDefinition);
224
225 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
226 public List<MBThread> getGroupThreads(long groupId, long userId,
227 boolean subscribed, boolean includeAnonymous,
228 QueryDefinition<MBThread> queryDefinition);
229
230 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231 public List<MBThread> getGroupThreads(long groupId, long userId,
232 boolean subscribed, QueryDefinition<MBThread> queryDefinition);
233
234 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
235 public int getGroupThreadsCount(long groupId,
236 QueryDefinition<MBThread> queryDefinition);
237
238 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239 public int getGroupThreadsCount(long groupId, long userId,
240 QueryDefinition<MBThread> queryDefinition);
241
242 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243 public int getGroupThreadsCount(long groupId, long userId,
244 boolean subscribed, boolean includeAnonymous,
245 QueryDefinition<MBThread> queryDefinition);
246
247 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248 public int getGroupThreadsCount(long groupId, long userId,
249 boolean subscribed, QueryDefinition<MBThread> queryDefinition);
250
251 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
252 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
253
254
261 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262 public MBThread getMBThread(long threadId) throws PortalException;
263
264
272 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273 public MBThread getMBThreadByUuidAndGroupId(java.lang.String uuid,
274 long groupId) throws PortalException;
275
276
287 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
288 public List<MBThread> getMBThreads(int start, int end);
289
290
297 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
298 public List<MBThread> getMBThreadsByUuidAndCompanyId(
299 java.lang.String uuid, long companyId);
300
301
311 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
312 public List<MBThread> getMBThreadsByUuidAndCompanyId(
313 java.lang.String uuid, long companyId, int start, int end,
314 OrderByComparator<MBThread> orderByComparator);
315
316
321 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
322 public int getMBThreadsCount();
323
324 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325 public List<MBThread> getNoAssetThreads();
326
327
332 public java.lang.String getOSGiServiceIdentifier();
333
334 @Override
335 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
336 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
337 throws PortalException;
338
339 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
340 public List<MBThread> getPriorityThreads(long categoryId, double priority)
341 throws PortalException;
342
343 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
344 public List<MBThread> getPriorityThreads(long categoryId, double priority,
345 boolean inherit) throws PortalException;
346
347 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
348 public MBThread getThread(long threadId) throws PortalException;
349
350 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
351 public List<MBThread> getThreads(long groupId, long categoryId, int status,
352 int start, int end);
353
354 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
355 public int getThreadsCount(long groupId, long categoryId, int status);
356
357 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
358 public boolean hasAnswerMessage(long threadId);
359
360 @BufferedIncrement(configuration = "MBThread", incrementClass = com.liferay.portal.kernel.increment.NumberIncrement.class)
361 public void incrementViewCounter(long threadId, int increment)
362 throws PortalException;
363
364 public void moveDependentsToTrash(long groupId, long threadId,
365 long trashEntryId) throws PortalException;
366
367 public MBThread moveThread(long groupId, long categoryId, long threadId)
368 throws PortalException;
369
370 public MBThread moveThreadFromTrash(long userId, long categoryId,
371 long threadId) throws PortalException;
372
373 public MBThread moveThreadToTrash(long userId, MBThread thread)
374 throws PortalException;
375
376 public MBThread moveThreadToTrash(long userId, long threadId)
377 throws PortalException;
378
379 public void moveThreadsToTrash(long groupId, long userId)
380 throws PortalException;
381
382 public void restoreDependentsFromTrash(long groupId, long threadId)
383 throws PortalException;
384
385
389 @java.lang.Deprecated
390 public void restoreDependentsFromTrash(long groupId, long threadId,
391 long trashEntryId) throws PortalException;
392
393 public void restoreThreadFromTrash(long userId, long threadId)
394 throws PortalException;
395
396 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
397 public Hits search(long groupId, long userId, long creatorUserId,
398 long startDate, long endDate, int status, int start, int end)
399 throws PortalException;
400
401 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
402 public Hits search(long groupId, long userId, long creatorUserId,
403 int status, int start, int end) throws PortalException;
404
405 public MBThread splitThread(long userId, long messageId,
406 java.lang.String subject, ServiceContext serviceContext)
407 throws PortalException;
408
409
415 @Indexable(type = IndexableType.REINDEX)
416 public MBThread updateMBThread(MBThread mbThread);
417
418 public MBThread updateMessageCount(long threadId);
419
420 public void updateQuestion(long threadId, boolean question)
421 throws PortalException;
422
423 public MBThread updateStatus(long userId, long threadId, int status)
424 throws PortalException;
425 }