001
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
041 @ProviderType
042 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
043 PortalException.class, SystemException.class})
044 public interface MBThreadLocalService extends BaseLocalService,
045 PersistedModelLocalService {
046
051
052
058 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
059 public com.liferay.portlet.messageboards.model.MBThread addMBThread(
060 com.liferay.portlet.messageboards.model.MBThread mbThread);
061
062 public com.liferay.portlet.messageboards.model.MBThread addThread(
063 long categoryId,
064 com.liferay.portlet.messageboards.model.MBMessage message,
065 com.liferay.portal.service.ServiceContext serviceContext)
066 throws PortalException;
067
068
074 public com.liferay.portlet.messageboards.model.MBThread createMBThread(
075 long threadId);
076
077
083 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
084 public com.liferay.portlet.messageboards.model.MBThread deleteMBThread(
085 com.liferay.portlet.messageboards.model.MBThread mbThread);
086
087
094 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
095 public com.liferay.portlet.messageboards.model.MBThread deleteMBThread(
096 long threadId) throws PortalException;
097
098
101 @Override
102 public com.liferay.portal.model.PersistedModel deletePersistedModel(
103 com.liferay.portal.model.PersistedModel persistedModel)
104 throws PortalException;
105
106 @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
107 public void deleteThread(
108 com.liferay.portlet.messageboards.model.MBThread thread)
109 throws PortalException;
110
111 public void deleteThread(long threadId) throws PortalException;
112
113 public void deleteThreads(long groupId, long categoryId)
114 throws PortalException;
115
116 public void deleteThreads(long groupId, long categoryId,
117 boolean includeTrashedEntries) throws PortalException;
118
119 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
120
121
127 public <T> java.util.List<T> dynamicQuery(
128 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
129
130
142 public <T> java.util.List<T> dynamicQuery(
143 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
144 int end);
145
146
159 public <T> java.util.List<T> dynamicQuery(
160 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
161 int end,
162 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
163
164
170 public long dynamicQueryCount(
171 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
172
173
180 public long dynamicQueryCount(
181 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
182 com.liferay.portal.kernel.dao.orm.Projection projection);
183
184 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
185 public com.liferay.portlet.messageboards.model.MBThread fetchMBThread(
186 long threadId);
187
188
195 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196 public com.liferay.portlet.messageboards.model.MBThread fetchMBThreadByUuidAndGroupId(
197 java.lang.String uuid, long groupId);
198
199 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200 public com.liferay.portlet.messageboards.model.MBThread fetchThread(
201 long threadId);
202
203 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
205
206 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207 public int getCategoryThreadsCount(long groupId, long categoryId, int status);
208
209 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
211 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
212
213 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214 public java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
215 long groupId,
216 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition);
217
218 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219 public java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
220 long groupId, long userId,
221 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition);
222
223 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224 public java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
225 long groupId, long userId, boolean subscribed,
226 boolean includeAnonymous,
227 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition);
228
229 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230 public java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
231 long groupId, long userId, boolean subscribed,
232 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition);
233
234 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
235 public int getGroupThreadsCount(long groupId,
236 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition);
237
238 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239 public int getGroupThreadsCount(long groupId, long userId,
240 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition);
241
242 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243 public int getGroupThreadsCount(long groupId, long userId,
244 boolean subscribed, boolean includeAnonymous,
245 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition);
246
247 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248 public int getGroupThreadsCount(long groupId, long userId,
249 boolean subscribed,
250 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition);
251
252 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
253 public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
254
255
262 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
263 public com.liferay.portlet.messageboards.model.MBThread getMBThread(
264 long threadId) throws PortalException;
265
266
274 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
275 public com.liferay.portlet.messageboards.model.MBThread getMBThreadByUuidAndGroupId(
276 java.lang.String uuid, long groupId) throws PortalException;
277
278
289 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
290 public java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreads(
291 int start, int end);
292
293
300 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301 public java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreadsByUuidAndCompanyId(
302 java.lang.String uuid, long companyId);
303
304
314 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
315 public java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreadsByUuidAndCompanyId(
316 java.lang.String uuid, long companyId, int start, int end,
317 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBThread> orderByComparator);
318
319
324 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325 public int getMBThreadsCount();
326
327 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328 public java.util.List<com.liferay.portlet.messageboards.model.MBThread> getNoAssetThreads();
329
330
335 public java.lang.String getOSGiServiceIdentifier();
336
337 @Override
338 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
339 public com.liferay.portal.model.PersistedModel getPersistedModel(
340 java.io.Serializable primaryKeyObj) throws PortalException;
341
342 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
343 public java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
344 long categoryId, double priority) throws PortalException;
345
346 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
347 public java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
348 long categoryId, double priority, boolean inherit)
349 throws PortalException;
350
351 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
352 public com.liferay.portlet.messageboards.model.MBThread getThread(
353 long threadId) throws PortalException;
354
355 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
356 public java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
357 long groupId, long categoryId, int status, int start, int end);
358
359 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
360 public int getThreadsCount(long groupId, long categoryId, int status);
361
362 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
363 public boolean hasAnswerMessage(long threadId);
364
365 @com.liferay.portal.kernel.increment.BufferedIncrement(configuration = "MBThread", incrementClass = com.liferay.portal.kernel.increment.NumberIncrement.class)
366 public void incrementViewCounter(long threadId, int increment)
367 throws PortalException;
368
369 public void moveDependentsToTrash(long groupId, long threadId,
370 long trashEntryId) throws PortalException;
371
372 public com.liferay.portlet.messageboards.model.MBThread moveThread(
373 long groupId, long categoryId, long threadId) throws PortalException;
374
375 public com.liferay.portlet.messageboards.model.MBThread moveThreadFromTrash(
376 long userId, long categoryId, long threadId) throws PortalException;
377
378 public com.liferay.portlet.messageboards.model.MBThread moveThreadToTrash(
379 long userId, com.liferay.portlet.messageboards.model.MBThread thread)
380 throws PortalException;
381
382 public com.liferay.portlet.messageboards.model.MBThread moveThreadToTrash(
383 long userId, long threadId) throws PortalException;
384
385 public void moveThreadsToTrash(long groupId, long userId)
386 throws PortalException;
387
388 public void restoreDependentsFromTrash(long groupId, long threadId)
389 throws PortalException;
390
391
395 @java.lang.Deprecated
396 public void restoreDependentsFromTrash(long groupId, long threadId,
397 long trashEntryId) throws PortalException;
398
399 public void restoreThreadFromTrash(long userId, long threadId)
400 throws PortalException;
401
402 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
403 public com.liferay.portal.kernel.search.Hits search(long groupId,
404 long userId, long creatorUserId, long startDate, long endDate,
405 int status, int start, int end) throws PortalException;
406
407 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
408 public com.liferay.portal.kernel.search.Hits search(long groupId,
409 long userId, long creatorUserId, int status, int start, int end)
410 throws PortalException;
411
412 public com.liferay.portlet.messageboards.model.MBThread splitThread(
413 long userId, long messageId, java.lang.String subject,
414 com.liferay.portal.service.ServiceContext serviceContext)
415 throws PortalException;
416
417
423 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
424 public com.liferay.portlet.messageboards.model.MBThread updateMBThread(
425 com.liferay.portlet.messageboards.model.MBThread mbThread);
426
427 public com.liferay.portlet.messageboards.model.MBThread updateMessageCount(
428 long threadId);
429
430 public void updateQuestion(long threadId, boolean question)
431 throws PortalException;
432
433 public com.liferay.portlet.messageboards.model.MBThread updateStatus(
434 long userId, long threadId, int status) throws PortalException;
435 }