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