001
014
015 package com.liferay.message.boards.kernel.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.message.boards.kernel.model.MBThread;
020
021 import com.liferay.portal.kernel.exception.PortalException;
022 import com.liferay.portal.kernel.exception.SystemException;
023 import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
024 import com.liferay.portal.kernel.lock.Lock;
025 import com.liferay.portal.kernel.search.Hits;
026 import com.liferay.portal.kernel.security.access.control.AccessControlled;
027 import com.liferay.portal.kernel.service.BaseService;
028 import com.liferay.portal.kernel.service.ServiceContext;
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
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 MBThread moveThread(long categoryId, long threadId)
059 throws PortalException;
060
061 public MBThread moveThreadFromTrash(long categoryId, long threadId)
062 throws PortalException;
063
064 public MBThread moveThreadToTrash(long threadId) throws PortalException;
065
066 public MBThread splitThread(long messageId, java.lang.String subject,
067 ServiceContext serviceContext) throws PortalException;
068
069 public Lock lockThread(long threadId) throws PortalException;
070
071 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
072 public Hits search(long groupId, long creatorUserId, int status, int start,
073 int end) throws PortalException;
074
075 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
076 public Hits search(long groupId, long creatorUserId, long startDate,
077 long endDate, int status, int start, int end) throws PortalException;
078
079 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
080 public int getGroupThreadsCount(long groupId, long userId, int status);
081
082 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
083 public int getGroupThreadsCount(long groupId, long userId, int status,
084 boolean subscribed);
085
086 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
087 public int getGroupThreadsCount(long groupId, long userId, int status,
088 boolean subscribed, boolean includeAnonymous);
089
090 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
091 public int getGroupThreadsCount(long groupId, long userId,
092 Date modifiedDate, int status);
093
094 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
095 public int getThreadsCount(long groupId, long categoryId, int status);
096
097
102 public java.lang.String getOSGiServiceIdentifier();
103
104 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
105 public List<MBThread> getGroupThreads(long groupId, long userId,
106 int status, boolean subscribed, boolean includeAnonymous, int start,
107 int end) throws PortalException;
108
109 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
110 public List<MBThread> getGroupThreads(long groupId, long userId,
111 int status, boolean subscribed, int start, int end)
112 throws PortalException;
113
114 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
115 public List<MBThread> getGroupThreads(long groupId, long userId,
116 int status, int start, int end) throws PortalException;
117
118 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119 public List<MBThread> getGroupThreads(long groupId, long userId,
120 Date modifiedDate, int status, int start, int end)
121 throws PortalException;
122
123 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
124 public List<MBThread> getThreads(long groupId, long categoryId, int status,
125 int start, int end);
126
127 public void deleteThread(long threadId) throws PortalException;
128
129 public void restoreThreadFromTrash(long threadId) throws PortalException;
130
131 public void unlockThread(long threadId) throws PortalException;
132 }