1
14
15 package com.liferay.portlet.messageboards.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class MBCategoryLocalServiceUtil {
42 public static com.liferay.portlet.messageboards.model.MBCategory addMBCategory(
43 com.liferay.portlet.messageboards.model.MBCategory mbCategory)
44 throws com.liferay.portal.SystemException {
45 return getService().addMBCategory(mbCategory);
46 }
47
48 public static com.liferay.portlet.messageboards.model.MBCategory createMBCategory(
49 long categoryId) {
50 return getService().createMBCategory(categoryId);
51 }
52
53 public static void deleteMBCategory(long categoryId)
54 throws com.liferay.portal.PortalException,
55 com.liferay.portal.SystemException {
56 getService().deleteMBCategory(categoryId);
57 }
58
59 public static void deleteMBCategory(
60 com.liferay.portlet.messageboards.model.MBCategory mbCategory)
61 throws com.liferay.portal.SystemException {
62 getService().deleteMBCategory(mbCategory);
63 }
64
65 @SuppressWarnings("rawtypes")
66 public static java.util.List dynamicQuery(
67 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68 throws com.liferay.portal.SystemException {
69 return getService().dynamicQuery(dynamicQuery);
70 }
71
72 @SuppressWarnings("rawtypes")
73 public static java.util.List dynamicQuery(
74 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75 int end) throws com.liferay.portal.SystemException {
76 return getService().dynamicQuery(dynamicQuery, start, end);
77 }
78
79 @SuppressWarnings("rawtypes")
80 public static java.util.List dynamicQuery(
81 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82 int end,
83 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84 throws com.liferay.portal.SystemException {
85 return getService()
86 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87 }
88
89 public static int dynamicQueryCount(
90 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91 throws com.liferay.portal.SystemException {
92 return getService().dynamicQueryCount(dynamicQuery);
93 }
94
95 public static com.liferay.portlet.messageboards.model.MBCategory getMBCategory(
96 long categoryId)
97 throws com.liferay.portal.PortalException,
98 com.liferay.portal.SystemException {
99 return getService().getMBCategory(categoryId);
100 }
101
102 public static com.liferay.portlet.messageboards.model.MBCategory getMBCategoryByUuidAndGroupId(
103 java.lang.String uuid, long groupId)
104 throws com.liferay.portal.PortalException,
105 com.liferay.portal.SystemException {
106 return getService().getMBCategoryByUuidAndGroupId(uuid, groupId);
107 }
108
109 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getMBCategories(
110 int start, int end) throws com.liferay.portal.SystemException {
111 return getService().getMBCategories(start, end);
112 }
113
114 public static int getMBCategoriesCount()
115 throws com.liferay.portal.SystemException {
116 return getService().getMBCategoriesCount();
117 }
118
119 public static com.liferay.portlet.messageboards.model.MBCategory updateMBCategory(
120 com.liferay.portlet.messageboards.model.MBCategory mbCategory)
121 throws com.liferay.portal.SystemException {
122 return getService().updateMBCategory(mbCategory);
123 }
124
125 public static com.liferay.portlet.messageboards.model.MBCategory updateMBCategory(
126 com.liferay.portlet.messageboards.model.MBCategory mbCategory,
127 boolean merge) throws com.liferay.portal.SystemException {
128 return getService().updateMBCategory(mbCategory, merge);
129 }
130
131 public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
132 long userId, long parentCategoryId, java.lang.String name,
133 java.lang.String description, java.lang.String emailAddress,
134 java.lang.String inProtocol, java.lang.String inServerName,
135 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
136 java.lang.String inPassword, int inReadInterval,
137 java.lang.String outEmailAddress, boolean outCustom,
138 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
139 java.lang.String outUserName, java.lang.String outPassword,
140 boolean mailingListActive,
141 com.liferay.portal.service.ServiceContext serviceContext)
142 throws com.liferay.portal.PortalException,
143 com.liferay.portal.SystemException {
144 return getService()
145 .addCategory(userId, parentCategoryId, name, description,
146 emailAddress, inProtocol, inServerName, inServerPort, inUseSSL,
147 inUserName, inPassword, inReadInterval, outEmailAddress, outCustom,
148 outServerName, outServerPort, outUseSSL, outUserName, outPassword,
149 mailingListActive, serviceContext);
150 }
151
152 public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
153 java.lang.String uuid, long userId, long parentCategoryId,
154 java.lang.String name, java.lang.String description,
155 java.lang.String emailAddress, java.lang.String inProtocol,
156 java.lang.String inServerName, int inServerPort, boolean inUseSSL,
157 java.lang.String inUserName, java.lang.String inPassword,
158 int inReadInterval, java.lang.String outEmailAddress,
159 boolean outCustom, java.lang.String outServerName, int outServerPort,
160 boolean outUseSSL, java.lang.String outUserName,
161 java.lang.String outPassword, boolean mailingListActive,
162 com.liferay.portal.service.ServiceContext serviceContext)
163 throws com.liferay.portal.PortalException,
164 com.liferay.portal.SystemException {
165 return getService()
166 .addCategory(uuid, userId, parentCategoryId, name,
167 description, emailAddress, inProtocol, inServerName, inServerPort,
168 inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
169 outCustom, outServerName, outServerPort, outUseSSL, outUserName,
170 outPassword, mailingListActive, serviceContext);
171 }
172
173 public static void addCategoryResources(long categoryId,
174 boolean addCommunityPermissions, boolean addGuestPermissions)
175 throws com.liferay.portal.PortalException,
176 com.liferay.portal.SystemException {
177 getService()
178 .addCategoryResources(categoryId, addCommunityPermissions,
179 addGuestPermissions);
180 }
181
182 public static void addCategoryResources(long categoryId,
183 java.lang.String[] communityPermissions,
184 java.lang.String[] guestPermissions)
185 throws com.liferay.portal.PortalException,
186 com.liferay.portal.SystemException {
187 getService()
188 .addCategoryResources(categoryId, communityPermissions,
189 guestPermissions);
190 }
191
192 public static void addCategoryResources(
193 com.liferay.portlet.messageboards.model.MBCategory category,
194 boolean addCommunityPermissions, boolean addGuestPermissions)
195 throws com.liferay.portal.PortalException,
196 com.liferay.portal.SystemException {
197 getService()
198 .addCategoryResources(category, addCommunityPermissions,
199 addGuestPermissions);
200 }
201
202 public static void addCategoryResources(
203 com.liferay.portlet.messageboards.model.MBCategory category,
204 java.lang.String[] communityPermissions,
205 java.lang.String[] guestPermissions)
206 throws com.liferay.portal.PortalException,
207 com.liferay.portal.SystemException {
208 getService()
209 .addCategoryResources(category, communityPermissions,
210 guestPermissions);
211 }
212
213 public static void deleteCategories(long groupId)
214 throws com.liferay.portal.PortalException,
215 com.liferay.portal.SystemException {
216 getService().deleteCategories(groupId);
217 }
218
219 public static void deleteCategory(long categoryId)
220 throws com.liferay.portal.PortalException,
221 com.liferay.portal.SystemException {
222 getService().deleteCategory(categoryId);
223 }
224
225 public static void deleteCategory(
226 com.liferay.portlet.messageboards.model.MBCategory category)
227 throws com.liferay.portal.PortalException,
228 com.liferay.portal.SystemException {
229 getService().deleteCategory(category);
230 }
231
232 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
233 long groupId) throws com.liferay.portal.SystemException {
234 return getService().getCategories(groupId);
235 }
236
237 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
238 long groupId, long parentCategoryId)
239 throws com.liferay.portal.SystemException {
240 return getService().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 return getService().getCategories(groupId, parentCategoryId, start, end);
247 }
248
249 public static int getCategoriesCount(long groupId)
250 throws com.liferay.portal.SystemException {
251 return getService().getCategoriesCount(groupId);
252 }
253
254 public static int getCategoriesCount(long groupId, long parentCategoryId)
255 throws com.liferay.portal.SystemException {
256 return getService().getCategoriesCount(groupId, 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 return getService().getCategory(categoryId);
264 }
265
266 public static void getSubcategoryIds(
267 java.util.List<java.lang.Long> categoryIds, long groupId,
268 long categoryId) throws com.liferay.portal.SystemException {
269 getService().getSubcategoryIds(categoryIds, groupId, categoryId);
270 }
271
272 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
273 long groupId, long userId, int start, int end)
274 throws com.liferay.portal.SystemException {
275 return getService().getSubscribedCategories(groupId, userId, start, end);
276 }
277
278 public static int getSubscribedCategoriesCount(long groupId, long userId)
279 throws com.liferay.portal.SystemException {
280 return getService().getSubscribedCategoriesCount(groupId, userId);
281 }
282
283 public static com.liferay.portlet.messageboards.model.MBCategory getSystemCategory()
284 throws com.liferay.portal.SystemException {
285 return getService().getSystemCategory();
286 }
287
288 public static void reIndex(java.lang.String[] ids)
289 throws com.liferay.portal.SystemException {
290 getService().reIndex(ids);
291 }
292
293 public static com.liferay.portal.kernel.search.Hits search(long companyId,
294 long groupId, long userId, long[] categoryIds, long threadId,
295 java.lang.String keywords, int start, int end)
296 throws com.liferay.portal.SystemException {
297 return getService()
298 .search(companyId, groupId, userId, categoryIds, threadId,
299 keywords, start, end);
300 }
301
302 public static void subscribeCategory(long userId, long categoryId)
303 throws com.liferay.portal.PortalException,
304 com.liferay.portal.SystemException {
305 getService().subscribeCategory(userId, categoryId);
306 }
307
308 public static void unsubscribeCategory(long userId, long categoryId)
309 throws com.liferay.portal.PortalException,
310 com.liferay.portal.SystemException {
311 getService().unsubscribeCategory(userId, categoryId);
312 }
313
314 public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
315 long categoryId, long parentCategoryId, java.lang.String name,
316 java.lang.String description, java.lang.String emailAddress,
317 java.lang.String inProtocol, java.lang.String inServerName,
318 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
319 java.lang.String inPassword, int inReadInterval,
320 java.lang.String outEmailAddress, boolean outCustom,
321 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
322 java.lang.String outUserName, java.lang.String outPassword,
323 boolean mailingListActive, boolean mergeWithParentCategory)
324 throws com.liferay.portal.PortalException,
325 com.liferay.portal.SystemException {
326 return getService()
327 .updateCategory(categoryId, parentCategoryId, name,
328 description, emailAddress, inProtocol, inServerName, inServerPort,
329 inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
330 outCustom, outServerName, outServerPort, outUseSSL, outUserName,
331 outPassword, mailingListActive, mergeWithParentCategory);
332 }
333
334 public static MBCategoryLocalService getService() {
335 if (_service == null) {
336 _service = (MBCategoryLocalService)PortalBeanLocatorUtil.locate(MBCategoryLocalService.class.getName());
337
338 ReferenceRegistry.registerReference(MBCategoryLocalServiceUtil.class,
339 "_service");
340 MethodCache.remove(MBCategoryLocalService.class);
341 }
342
343 return _service;
344 }
345
346 public void setService(MBCategoryLocalService service) {
347 MethodCache.remove(MBCategoryLocalService.class);
348
349 _service = service;
350
351 ReferenceRegistry.registerReference(MBCategoryLocalServiceUtil.class,
352 "_service");
353 MethodCache.remove(MBCategoryLocalService.class);
354 }
355
356 private static MBCategoryLocalService _service;
357 }