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 public void deleteCategory(long categoryId, boolean includeTrashedEntries)
072 throws PortalException;
073
074 public void deleteCategory(long groupId, long categoryId)
075 throws PortalException;
076
077 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
078 public List<MBCategory> getCategories(long groupId);
079
080 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
081 public List<MBCategory> getCategories(long groupId,
082 long excludedCategoryId, long parentCategoryId, int status, int start,
083 int end);
084
085 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
086 public List<MBCategory> getCategories(long groupId,
087 long[] excludedCategoryIds, long[] parentCategoryIds, int status,
088 int start, int end);
089
090 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
091 public List<MBCategory> getCategories(long groupId, long parentCategoryId,
092 int start, int end);
093
094 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
095 public List<MBCategory> getCategories(long groupId, long parentCategoryId,
096 int status, int start, int end);
097
098 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
099 public List<MBCategory> getCategories(long groupId,
100 long[] parentCategoryIds, int start, int end);
101
102 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
103 public List<MBCategory> getCategories(long groupId,
104 long[] parentCategoryIds, int status, int start, int end);
105
106 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
107 public List<MBCategory> getCategories(long groupId, int status);
108
109 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
110 public List<java.lang.Object> getCategoriesAndThreads(long groupId,
111 long categoryId);
112
113 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
114 public List<java.lang.Object> getCategoriesAndThreads(long groupId,
115 long categoryId, int status);
116
117 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
118 public List<java.lang.Object> getCategoriesAndThreads(long groupId,
119 long categoryId, int status, int start, int end);
120
121 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
122 public int getCategoriesAndThreadsCount(long groupId, long categoryId);
123
124 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125 public int getCategoriesAndThreadsCount(long groupId, long categoryId,
126 int status);
127
128 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129 public int getCategoriesCount(long groupId, long excludedCategoryId,
130 long parentCategoryId, int status);
131
132 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
133 public int getCategoriesCount(long groupId, long[] excludedCategoryIds,
134 long[] parentCategoryIds, int status);
135
136 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
137 public int getCategoriesCount(long groupId, long parentCategoryId);
138
139 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
140 public int getCategoriesCount(long groupId, long parentCategoryId,
141 int status);
142
143 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144 public int getCategoriesCount(long groupId, long[] parentCategoryIds);
145
146 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
147 public int getCategoriesCount(long groupId, long[] parentCategoryIds,
148 int status);
149
150 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
151 public MBCategory getCategory(long categoryId) throws PortalException;
152
153 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
154 public long[] getCategoryIds(long groupId, long categoryId);
155
156
161 public java.lang.String getOSGiServiceIdentifier();
162
163 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164 public List<java.lang.Long> getSubcategoryIds(
165 List<java.lang.Long> categoryIds, long groupId, long categoryId);
166
167 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
168 public List<MBCategory> getSubscribedCategories(long groupId, long userId,
169 int start, int end);
170
171 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172 public int getSubscribedCategoriesCount(long groupId, long userId);
173
174 public MBCategory moveCategory(long categoryId, long parentCategoryId,
175 boolean mergeWithParentCategory) throws PortalException;
176
177 public MBCategory moveCategoryFromTrash(long categoryId, long newCategoryId)
178 throws PortalException;
179
180 public MBCategory moveCategoryToTrash(long categoryId)
181 throws PortalException;
182
183 public void restoreCategoryFromTrash(long categoryId)
184 throws PortalException;
185
186 public void subscribeCategory(long groupId, long categoryId)
187 throws PortalException;
188
189 public void unsubscribeCategory(long groupId, long categoryId)
190 throws PortalException;
191
192 public MBCategory updateCategory(long categoryId, long parentCategoryId,
193 java.lang.String name, java.lang.String description,
194 java.lang.String displayStyle, java.lang.String emailAddress,
195 java.lang.String inProtocol, java.lang.String inServerName,
196 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
197 java.lang.String inPassword, int inReadInterval,
198 java.lang.String outEmailAddress, boolean outCustom,
199 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
200 java.lang.String outUserName, java.lang.String outPassword,
201 boolean mailingListActive, boolean allowAnonymousEmail,
202 boolean mergeWithParentCategory, ServiceContext serviceContext)
203 throws PortalException;
204 }