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.MBCategory;
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.security.access.control.AccessControlled;
025 import com.liferay.portal.kernel.service.BaseService;
026 import com.liferay.portal.kernel.service.ServiceContext;
027 import com.liferay.portal.kernel.transaction.Isolation;
028 import com.liferay.portal.kernel.transaction.Propagation;
029 import com.liferay.portal.kernel.transaction.Transactional;
030
031 import java.util.List;
032
033
044 @AccessControlled
045 @JSONWebService
046 @ProviderType
047 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
048 PortalException.class, SystemException.class})
049 public interface MBCategoryService extends BaseService {
050
055 public MBCategory addCategory(long parentCategoryId, java.lang.String name,
056 java.lang.String description, java.lang.String displayStyle,
057 java.lang.String emailAddress, java.lang.String inProtocol,
058 java.lang.String inServerName, int inServerPort, boolean inUseSSL,
059 java.lang.String inUserName, java.lang.String inPassword,
060 int inReadInterval, java.lang.String outEmailAddress,
061 boolean outCustom, java.lang.String outServerName, int outServerPort,
062 boolean outUseSSL, java.lang.String outUserName,
063 java.lang.String outPassword, boolean mailingListActive,
064 boolean allowAnonymousEmail, ServiceContext serviceContext)
065 throws PortalException;
066
067 public MBCategory addCategory(long userId, long parentCategoryId,
068 java.lang.String name, java.lang.String description,
069 ServiceContext serviceContext) throws PortalException;
070
071 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
072 public MBCategory getCategory(long categoryId) throws PortalException;
073
074 public MBCategory moveCategory(long categoryId, long parentCategoryId,
075 boolean mergeWithParentCategory) throws PortalException;
076
077 public MBCategory moveCategoryFromTrash(long categoryId, long newCategoryId)
078 throws PortalException;
079
080 public MBCategory moveCategoryToTrash(long categoryId)
081 throws PortalException;
082
083 public MBCategory updateCategory(long categoryId, long parentCategoryId,
084 java.lang.String name, java.lang.String description,
085 java.lang.String displayStyle, java.lang.String emailAddress,
086 java.lang.String inProtocol, java.lang.String inServerName,
087 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
088 java.lang.String inPassword, int inReadInterval,
089 java.lang.String outEmailAddress, boolean outCustom,
090 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
091 java.lang.String outUserName, java.lang.String outPassword,
092 boolean mailingListActive, boolean allowAnonymousEmail,
093 boolean mergeWithParentCategory, ServiceContext serviceContext)
094 throws PortalException;
095
096 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
097 public int getCategoriesAndThreadsCount(long groupId, long categoryId);
098
099 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
100 public int getCategoriesAndThreadsCount(long groupId, long categoryId,
101 int status);
102
103 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
104 public int getCategoriesCount(long groupId, long excludedCategoryId,
105 long parentCategoryId, int status);
106
107 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
108 public int getCategoriesCount(long groupId, long parentCategoryId);
109
110 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
111 public int getCategoriesCount(long groupId, long parentCategoryId,
112 int status);
113
114 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
115 public int getCategoriesCount(long groupId, long[] excludedCategoryIds,
116 long[] parentCategoryIds, int status);
117
118 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119 public int getCategoriesCount(long groupId, long[] parentCategoryIds);
120
121 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
122 public int getCategoriesCount(long groupId, long[] parentCategoryIds,
123 int status);
124
125 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
126 public int getSubscribedCategoriesCount(long groupId, long userId);
127
128
133 public java.lang.String getOSGiServiceIdentifier();
134
135 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
136 public List<MBCategory> getCategories(long groupId);
137
138 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139 public List<MBCategory> getCategories(long groupId, int status);
140
141 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
142 public List<MBCategory> getCategories(long groupId,
143 long excludedCategoryId, long parentCategoryId, int status, int start,
144 int end);
145
146 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
147 public List<MBCategory> getCategories(long groupId, long parentCategoryId,
148 int start, int end);
149
150 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
151 public List<MBCategory> getCategories(long groupId, long parentCategoryId,
152 int status, int start, int end);
153
154 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155 public List<MBCategory> getCategories(long groupId,
156 long[] excludedCategoryIds, long[] parentCategoryIds, int status,
157 int start, int end);
158
159 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160 public List<MBCategory> getCategories(long groupId,
161 long[] parentCategoryIds, int start, int end);
162
163 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164 public List<MBCategory> getCategories(long groupId,
165 long[] parentCategoryIds, int status, int start, int end);
166
167 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
168 public List<java.lang.Object> getCategoriesAndThreads(long groupId,
169 long categoryId);
170
171 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172 public List<java.lang.Object> getCategoriesAndThreads(long groupId,
173 long categoryId, int status);
174
175 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176 public List<java.lang.Object> getCategoriesAndThreads(long groupId,
177 long categoryId, int status, int start, int end);
178
179 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180 public List<java.lang.Long> getSubcategoryIds(
181 List<java.lang.Long> categoryIds, long groupId, long categoryId);
182
183 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
184 public List<MBCategory> getSubscribedCategories(long groupId, long userId,
185 int start, int end);
186
187 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
188 public long[] getCategoryIds(long groupId, long categoryId);
189
190 public void deleteCategory(long categoryId, boolean includeTrashedEntries)
191 throws PortalException;
192
193 public void deleteCategory(long groupId, long categoryId)
194 throws PortalException;
195
196 public void restoreCategoryFromTrash(long categoryId)
197 throws PortalException;
198
199 public void subscribeCategory(long groupId, long categoryId)
200 throws PortalException;
201
202 public void unsubscribeCategory(long groupId, long categoryId)
203 throws PortalException;
204 }