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.jsonwebservice.JSONWebService;
022 import com.liferay.portal.kernel.lock.Lock;
023 import com.liferay.portal.kernel.search.Hits;
024 import com.liferay.portal.kernel.security.access.control.AccessControlled;
025 import com.liferay.portal.kernel.transaction.Isolation;
026 import com.liferay.portal.kernel.transaction.Propagation;
027 import com.liferay.portal.kernel.transaction.Transactional;
028 import com.liferay.portal.service.BaseService;
029 import com.liferay.portal.service.ServiceContext;
030
031 import com.liferay.portlet.messageboards.model.MBThread;
032
033 import java.util.Date;
034 import java.util.List;
035
036
047 @AccessControlled
048 @JSONWebService
049 @ProviderType
050 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
051 PortalException.class, SystemException.class})
052 public interface MBThreadService extends BaseService {
053
058 public void deleteThread(long threadId) throws PortalException;
059
060 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
061 public List<MBThread> getGroupThreads(long groupId, long userId,
062 Date modifiedDate, int status, int start, int end)
063 throws PortalException;
064
065 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
066 public List<MBThread> getGroupThreads(long groupId, long userId,
067 int status, int start, int end) throws PortalException;
068
069 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
070 public List<MBThread> getGroupThreads(long groupId, long userId,
071 int status, boolean subscribed, boolean includeAnonymous, int start,
072 int end) throws PortalException;
073
074 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
075 public List<MBThread> getGroupThreads(long groupId, long userId,
076 int status, boolean subscribed, int start, int end)
077 throws PortalException;
078
079 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
080 public int getGroupThreadsCount(long groupId, long userId,
081 Date modifiedDate, int status);
082
083 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
084 public int getGroupThreadsCount(long groupId, long userId, int status);
085
086 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
087 public int getGroupThreadsCount(long groupId, long userId, int status,
088 boolean subscribed);
089
090 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
091 public int getGroupThreadsCount(long groupId, long userId, int status,
092 boolean subscribed, boolean includeAnonymous);
093
094
099 public java.lang.String getOSGiServiceIdentifier();
100
101 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
102 public List<MBThread> getThreads(long groupId, long categoryId, int status,
103 int start, int end);
104
105 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
106 public int getThreadsCount(long groupId, long categoryId, int status);
107
108 public Lock lockThread(long threadId) throws PortalException;
109
110 public MBThread moveThread(long categoryId, long threadId)
111 throws PortalException;
112
113 public MBThread moveThreadFromTrash(long categoryId, long threadId)
114 throws PortalException;
115
116 public MBThread moveThreadToTrash(long threadId) throws PortalException;
117
118 public void restoreThreadFromTrash(long threadId) throws PortalException;
119
120 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
121 public Hits search(long groupId, long creatorUserId, long startDate,
122 long endDate, int status, int start, int end) throws PortalException;
123
124 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125 public Hits search(long groupId, long creatorUserId, int status, int start,
126 int end) throws PortalException;
127
128 public MBThread splitThread(long messageId, java.lang.String subject,
129 ServiceContext serviceContext) throws PortalException;
130
131 public void unlockThread(long threadId) throws PortalException;
132 }