001
014
015 package com.liferay.portlet.messageboards.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020 import com.liferay.portal.kernel.util.ReferenceRegistry;
021
022
036 @ProviderType
037 public class MBCategoryServiceUtil {
038
043 public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
044 long parentCategoryId, java.lang.String name,
045 java.lang.String description, java.lang.String displayStyle,
046 java.lang.String emailAddress, java.lang.String inProtocol,
047 java.lang.String inServerName, int inServerPort, boolean inUseSSL,
048 java.lang.String inUserName, java.lang.String inPassword,
049 int inReadInterval, java.lang.String outEmailAddress,
050 boolean outCustom, java.lang.String outServerName, int outServerPort,
051 boolean outUseSSL, java.lang.String outUserName,
052 java.lang.String outPassword, boolean mailingListActive,
053 boolean allowAnonymousEmail,
054 com.liferay.portal.service.ServiceContext serviceContext)
055 throws com.liferay.portal.kernel.exception.PortalException {
056 return getService()
057 .addCategory(parentCategoryId, name, description,
058 displayStyle, emailAddress, inProtocol, inServerName, inServerPort,
059 inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
060 outCustom, outServerName, outServerPort, outUseSSL, outUserName,
061 outPassword, mailingListActive, allowAnonymousEmail, serviceContext);
062 }
063
064 public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
065 long userId, long parentCategoryId, java.lang.String name,
066 java.lang.String description,
067 com.liferay.portal.service.ServiceContext serviceContext)
068 throws com.liferay.portal.kernel.exception.PortalException {
069 return getService()
070 .addCategory(userId, parentCategoryId, name, description,
071 serviceContext);
072 }
073
074 public static void deleteCategory(long categoryId,
075 boolean includeTrashedEntries)
076 throws com.liferay.portal.kernel.exception.PortalException {
077 getService().deleteCategory(categoryId, includeTrashedEntries);
078 }
079
080 public static void deleteCategory(long groupId, long categoryId)
081 throws com.liferay.portal.kernel.exception.PortalException {
082 getService().deleteCategory(groupId, categoryId);
083 }
084
085
090 public static java.lang.String getBeanIdentifier() {
091 return getService().getBeanIdentifier();
092 }
093
094 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
095 long groupId) {
096 return getService().getCategories(groupId);
097 }
098
099 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
100 long groupId, long excludedCategoryId, long parentCategoryId,
101 int status, int start, int end) {
102 return getService()
103 .getCategories(groupId, excludedCategoryId,
104 parentCategoryId, status, start, end);
105 }
106
107 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
108 long groupId, long[] excludedCategoryIds, long[] parentCategoryIds,
109 int status, int start, int end) {
110 return getService()
111 .getCategories(groupId, excludedCategoryIds,
112 parentCategoryIds, status, start, end);
113 }
114
115 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
116 long groupId, long parentCategoryId, int start, int end) {
117 return getService().getCategories(groupId, parentCategoryId, start, end);
118 }
119
120 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
121 long groupId, long parentCategoryId, int status, int start, int end) {
122 return getService()
123 .getCategories(groupId, parentCategoryId, status, start, end);
124 }
125
126 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
127 long groupId, long[] parentCategoryIds, int start, int end) {
128 return getService().getCategories(groupId, parentCategoryIds, start, end);
129 }
130
131 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
132 long groupId, long[] parentCategoryIds, int status, int start, int end) {
133 return getService()
134 .getCategories(groupId, parentCategoryIds, status, start, end);
135 }
136
137 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
138 long groupId, int status) {
139 return getService().getCategories(groupId, status);
140 }
141
142 public static int getCategoriesCount(long groupId, long excludedCategoryId,
143 long parentCategoryId, int status) {
144 return getService()
145 .getCategoriesCount(groupId, excludedCategoryId,
146 parentCategoryId, status);
147 }
148
149 public static int getCategoriesCount(long groupId,
150 long[] excludedCategoryIds, long[] parentCategoryIds, int status) {
151 return getService()
152 .getCategoriesCount(groupId, excludedCategoryIds,
153 parentCategoryIds, status);
154 }
155
156 public static int getCategoriesCount(long groupId, long parentCategoryId) {
157 return getService().getCategoriesCount(groupId, parentCategoryId);
158 }
159
160 public static int getCategoriesCount(long groupId, long parentCategoryId,
161 int status) {
162 return getService().getCategoriesCount(groupId, parentCategoryId, status);
163 }
164
165 public static int getCategoriesCount(long groupId, long[] parentCategoryIds) {
166 return getService().getCategoriesCount(groupId, parentCategoryIds);
167 }
168
169 public static int getCategoriesCount(long groupId,
170 long[] parentCategoryIds, int status) {
171 return getService()
172 .getCategoriesCount(groupId, parentCategoryIds, status);
173 }
174
175 public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
176 long categoryId)
177 throws com.liferay.portal.kernel.exception.PortalException {
178 return getService().getCategory(categoryId);
179 }
180
181 public static long[] getCategoryIds(long groupId, long categoryId) {
182 return getService().getCategoryIds(groupId, categoryId);
183 }
184
185 public static java.util.List<java.lang.Long> getSubcategoryIds(
186 java.util.List<java.lang.Long> categoryIds, long groupId,
187 long categoryId) {
188 return getService().getSubcategoryIds(categoryIds, groupId, categoryId);
189 }
190
191 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
192 long groupId, long userId, int start, int end) {
193 return getService().getSubscribedCategories(groupId, userId, start, end);
194 }
195
196 public static int getSubscribedCategoriesCount(long groupId, long userId) {
197 return getService().getSubscribedCategoriesCount(groupId, userId);
198 }
199
200 public static com.liferay.portlet.messageboards.model.MBCategory moveCategory(
201 long categoryId, long parentCategoryId, boolean mergeWithParentCategory)
202 throws com.liferay.portal.kernel.exception.PortalException {
203 return getService()
204 .moveCategory(categoryId, parentCategoryId,
205 mergeWithParentCategory);
206 }
207
208 public static com.liferay.portlet.messageboards.model.MBCategory moveCategoryFromTrash(
209 long categoryId, long newCategoryId)
210 throws com.liferay.portal.kernel.exception.PortalException {
211 return getService().moveCategoryFromTrash(categoryId, newCategoryId);
212 }
213
214 public static com.liferay.portlet.messageboards.model.MBCategory moveCategoryToTrash(
215 long categoryId)
216 throws com.liferay.portal.kernel.exception.PortalException {
217 return getService().moveCategoryToTrash(categoryId);
218 }
219
220 public static void restoreCategoryFromTrash(long categoryId)
221 throws com.liferay.portal.kernel.exception.PortalException {
222 getService().restoreCategoryFromTrash(categoryId);
223 }
224
225
230 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
231 getService().setBeanIdentifier(beanIdentifier);
232 }
233
234 public static void subscribeCategory(long groupId, long categoryId)
235 throws com.liferay.portal.kernel.exception.PortalException {
236 getService().subscribeCategory(groupId, categoryId);
237 }
238
239 public static void unsubscribeCategory(long groupId, long categoryId)
240 throws com.liferay.portal.kernel.exception.PortalException {
241 getService().unsubscribeCategory(groupId, categoryId);
242 }
243
244 public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
245 long categoryId, long parentCategoryId, java.lang.String name,
246 java.lang.String description, java.lang.String displayStyle,
247 java.lang.String emailAddress, java.lang.String inProtocol,
248 java.lang.String inServerName, int inServerPort, boolean inUseSSL,
249 java.lang.String inUserName, java.lang.String inPassword,
250 int inReadInterval, java.lang.String outEmailAddress,
251 boolean outCustom, java.lang.String outServerName, int outServerPort,
252 boolean outUseSSL, java.lang.String outUserName,
253 java.lang.String outPassword, boolean mailingListActive,
254 boolean allowAnonymousEmail, boolean mergeWithParentCategory,
255 com.liferay.portal.service.ServiceContext serviceContext)
256 throws com.liferay.portal.kernel.exception.PortalException {
257 return getService()
258 .updateCategory(categoryId, parentCategoryId, name,
259 description, displayStyle, emailAddress, inProtocol, inServerName,
260 inServerPort, inUseSSL, inUserName, inPassword, inReadInterval,
261 outEmailAddress, outCustom, outServerName, outServerPort,
262 outUseSSL, outUserName, outPassword, mailingListActive,
263 allowAnonymousEmail, mergeWithParentCategory, serviceContext);
264 }
265
266 public static MBCategoryService getService() {
267 if (_service == null) {
268 _service = (MBCategoryService)PortalBeanLocatorUtil.locate(MBCategoryService.class.getName());
269
270 ReferenceRegistry.registerReference(MBCategoryServiceUtil.class,
271 "_service");
272 }
273
274 return _service;
275 }
276
277
280 @Deprecated
281 public void setService(MBCategoryService service) {
282 }
283
284 private static MBCategoryService _service;
285 }