1
22
23 package com.liferay.portlet.messageboards.service;
24
25
26
53 public class MBCategoryLocalServiceUtil {
54 public static com.liferay.portlet.messageboards.model.MBCategory addMBCategory(
55 com.liferay.portlet.messageboards.model.MBCategory mbCategory)
56 throws com.liferay.portal.SystemException {
57 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
58
59 return mbCategoryLocalService.addMBCategory(mbCategory);
60 }
61
62 public static void deleteMBCategory(long categoryId)
63 throws com.liferay.portal.PortalException,
64 com.liferay.portal.SystemException {
65 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
66
67 mbCategoryLocalService.deleteMBCategory(categoryId);
68 }
69
70 public static void deleteMBCategory(
71 com.liferay.portlet.messageboards.model.MBCategory mbCategory)
72 throws com.liferay.portal.SystemException {
73 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
74
75 mbCategoryLocalService.deleteMBCategory(mbCategory);
76 }
77
78 public static java.util.List<Object> dynamicQuery(
79 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
80 throws com.liferay.portal.SystemException {
81 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
82
83 return mbCategoryLocalService.dynamicQuery(dynamicQuery);
84 }
85
86 public static java.util.List<Object> dynamicQuery(
87 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
88 int end) throws com.liferay.portal.SystemException {
89 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
90
91 return mbCategoryLocalService.dynamicQuery(dynamicQuery, start, end);
92 }
93
94 public static com.liferay.portlet.messageboards.model.MBCategory getMBCategory(
95 long categoryId)
96 throws com.liferay.portal.PortalException,
97 com.liferay.portal.SystemException {
98 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
99
100 return mbCategoryLocalService.getMBCategory(categoryId);
101 }
102
103 public static com.liferay.portlet.messageboards.model.MBCategory updateMBCategory(
104 com.liferay.portlet.messageboards.model.MBCategory mbCategory)
105 throws com.liferay.portal.SystemException {
106 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
107
108 return mbCategoryLocalService.updateMBCategory(mbCategory);
109 }
110
111 public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
112 long userId, long plid, long parentCategoryId, java.lang.String name,
113 java.lang.String description, boolean addCommunityPermissions,
114 boolean addGuestPermissions)
115 throws com.liferay.portal.PortalException,
116 com.liferay.portal.SystemException {
117 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
118
119 return mbCategoryLocalService.addCategory(userId, plid,
120 parentCategoryId, name, description, addCommunityPermissions,
121 addGuestPermissions);
122 }
123
124 public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
125 java.lang.String uuid, long userId, long plid, long parentCategoryId,
126 java.lang.String name, java.lang.String description,
127 boolean addCommunityPermissions, boolean addGuestPermissions)
128 throws com.liferay.portal.PortalException,
129 com.liferay.portal.SystemException {
130 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
131
132 return mbCategoryLocalService.addCategory(uuid, userId, plid,
133 parentCategoryId, name, description, addCommunityPermissions,
134 addGuestPermissions);
135 }
136
137 public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
138 long userId, long plid, long parentCategoryId, java.lang.String name,
139 java.lang.String description, java.lang.String[] communityPermissions,
140 java.lang.String[] guestPermissions)
141 throws com.liferay.portal.PortalException,
142 com.liferay.portal.SystemException {
143 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
144
145 return mbCategoryLocalService.addCategory(userId, plid,
146 parentCategoryId, name, description, communityPermissions,
147 guestPermissions);
148 }
149
150 public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
151 java.lang.String uuid, long userId, long plid, long parentCategoryId,
152 java.lang.String name, java.lang.String description,
153 java.lang.Boolean addCommunityPermissions,
154 java.lang.Boolean addGuestPermissions,
155 java.lang.String[] communityPermissions,
156 java.lang.String[] guestPermissions)
157 throws com.liferay.portal.PortalException,
158 com.liferay.portal.SystemException {
159 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
160
161 return mbCategoryLocalService.addCategory(uuid, userId, plid,
162 parentCategoryId, name, description, addCommunityPermissions,
163 addGuestPermissions, communityPermissions, guestPermissions);
164 }
165
166 public static void addCategoryResources(long categoryId,
167 boolean addCommunityPermissions, boolean addGuestPermissions)
168 throws com.liferay.portal.PortalException,
169 com.liferay.portal.SystemException {
170 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
171
172 mbCategoryLocalService.addCategoryResources(categoryId,
173 addCommunityPermissions, addGuestPermissions);
174 }
175
176 public static void addCategoryResources(
177 com.liferay.portlet.messageboards.model.MBCategory category,
178 boolean addCommunityPermissions, boolean addGuestPermissions)
179 throws com.liferay.portal.PortalException,
180 com.liferay.portal.SystemException {
181 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
182
183 mbCategoryLocalService.addCategoryResources(category,
184 addCommunityPermissions, addGuestPermissions);
185 }
186
187 public static void addCategoryResources(long categoryId,
188 java.lang.String[] communityPermissions,
189 java.lang.String[] guestPermissions)
190 throws com.liferay.portal.PortalException,
191 com.liferay.portal.SystemException {
192 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
193
194 mbCategoryLocalService.addCategoryResources(categoryId,
195 communityPermissions, guestPermissions);
196 }
197
198 public static void addCategoryResources(
199 com.liferay.portlet.messageboards.model.MBCategory category,
200 java.lang.String[] communityPermissions,
201 java.lang.String[] guestPermissions)
202 throws com.liferay.portal.PortalException,
203 com.liferay.portal.SystemException {
204 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
205
206 mbCategoryLocalService.addCategoryResources(category,
207 communityPermissions, guestPermissions);
208 }
209
210 public static void deleteCategories(long groupId)
211 throws com.liferay.portal.PortalException,
212 com.liferay.portal.SystemException {
213 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
214
215 mbCategoryLocalService.deleteCategories(groupId);
216 }
217
218 public static void deleteCategory(long categoryId)
219 throws com.liferay.portal.PortalException,
220 com.liferay.portal.SystemException {
221 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
222
223 mbCategoryLocalService.deleteCategory(categoryId);
224 }
225
226 public static void deleteCategory(
227 com.liferay.portlet.messageboards.model.MBCategory category)
228 throws com.liferay.portal.PortalException,
229 com.liferay.portal.SystemException {
230 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
231
232 mbCategoryLocalService.deleteCategory(category);
233 }
234
235 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
236 long groupId, long parentCategoryId)
237 throws com.liferay.portal.SystemException {
238 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
239
240 return mbCategoryLocalService.getCategories(groupId, parentCategoryId);
241 }
242
243 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
244 long groupId, long parentCategoryId, int start, int end)
245 throws com.liferay.portal.SystemException {
246 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
247
248 return mbCategoryLocalService.getCategories(groupId, parentCategoryId,
249 start, end);
250 }
251
252 public static int getCategoriesCount(long groupId)
253 throws com.liferay.portal.SystemException {
254 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
255
256 return mbCategoryLocalService.getCategoriesCount(groupId);
257 }
258
259 public static int getCategoriesCount(long groupId, long parentCategoryId)
260 throws com.liferay.portal.SystemException {
261 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
262
263 return mbCategoryLocalService.getCategoriesCount(groupId,
264 parentCategoryId);
265 }
266
267 public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
268 long categoryId)
269 throws com.liferay.portal.PortalException,
270 com.liferay.portal.SystemException {
271 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
272
273 return mbCategoryLocalService.getCategory(categoryId);
274 }
275
276 public static void getSubcategoryIds(java.util.List<Long> categoryIds,
277 long groupId, long categoryId)
278 throws com.liferay.portal.SystemException {
279 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
280
281 mbCategoryLocalService.getSubcategoryIds(categoryIds, groupId,
282 categoryId);
283 }
284
285 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
286 long groupId, long userId, int start, int end)
287 throws com.liferay.portal.SystemException {
288 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
289
290 return mbCategoryLocalService.getSubscribedCategories(groupId, userId,
291 start, end);
292 }
293
294 public static int getSubscribedCategoriesCount(long groupId, long userId)
295 throws com.liferay.portal.SystemException {
296 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
297
298 return mbCategoryLocalService.getSubscribedCategoriesCount(groupId,
299 userId);
300 }
301
302 public static com.liferay.portlet.messageboards.model.MBCategory getSystemCategory()
303 throws com.liferay.portal.SystemException {
304 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
305
306 return mbCategoryLocalService.getSystemCategory();
307 }
308
309 public static void reIndex(java.lang.String[] ids)
310 throws com.liferay.portal.SystemException {
311 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
312
313 mbCategoryLocalService.reIndex(ids);
314 }
315
316 public static com.liferay.portal.kernel.search.Hits search(long companyId,
317 long groupId, long[] categoryIds, long threadId,
318 java.lang.String keywords, int start, int end)
319 throws com.liferay.portal.SystemException {
320 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
321
322 return mbCategoryLocalService.search(companyId, groupId, categoryIds,
323 threadId, keywords, start, end);
324 }
325
326 public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
327 long categoryId, long parentCategoryId, java.lang.String name,
328 java.lang.String description, boolean mergeWithParentCategory)
329 throws com.liferay.portal.PortalException,
330 com.liferay.portal.SystemException {
331 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
332
333 return mbCategoryLocalService.updateCategory(categoryId,
334 parentCategoryId, name, description, mergeWithParentCategory);
335 }
336
337 public static void subscribeCategory(long userId, long categoryId)
338 throws com.liferay.portal.PortalException,
339 com.liferay.portal.SystemException {
340 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
341
342 mbCategoryLocalService.subscribeCategory(userId, categoryId);
343 }
344
345 public static void unsubscribeCategory(long userId, long categoryId)
346 throws com.liferay.portal.PortalException,
347 com.liferay.portal.SystemException {
348 MBCategoryLocalService mbCategoryLocalService = MBCategoryLocalServiceFactory.getService();
349
350 mbCategoryLocalService.unsubscribeCategory(userId, categoryId);
351 }
352 }