1
22
23 package com.liferay.portlet.messageboards.service;
24
25
26
53 public class MBCategoryServiceUtil {
54 public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
55 long plid, long parentCategoryId, java.lang.String name,
56 java.lang.String description, java.lang.String[] communityPermissions,
57 java.lang.String[] guestPermissions)
58 throws com.liferay.portal.PortalException,
59 com.liferay.portal.SystemException, java.rmi.RemoteException {
60 MBCategoryService mbCategoryService = MBCategoryServiceFactory.getService();
61
62 return mbCategoryService.addCategory(plid, parentCategoryId, name,
63 description, communityPermissions, guestPermissions);
64 }
65
66 public static void deleteCategory(long categoryId)
67 throws com.liferay.portal.PortalException,
68 com.liferay.portal.SystemException, java.rmi.RemoteException {
69 MBCategoryService mbCategoryService = MBCategoryServiceFactory.getService();
70
71 mbCategoryService.deleteCategory(categoryId);
72 }
73
74 public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
75 long categoryId)
76 throws com.liferay.portal.PortalException,
77 com.liferay.portal.SystemException, java.rmi.RemoteException {
78 MBCategoryService mbCategoryService = MBCategoryServiceFactory.getService();
79
80 return mbCategoryService.getCategory(categoryId);
81 }
82
83 public static java.util.List getCategories(long groupId,
84 long parentCategoryId, int begin, int end)
85 throws com.liferay.portal.PortalException,
86 com.liferay.portal.SystemException, java.rmi.RemoteException {
87 MBCategoryService mbCategoryService = MBCategoryServiceFactory.getService();
88
89 return mbCategoryService.getCategories(groupId, parentCategoryId,
90 begin, end);
91 }
92
93 public static int getCategoriesCount(long groupId, long parentCategoryId)
94 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
95 MBCategoryService mbCategoryService = MBCategoryServiceFactory.getService();
96
97 return mbCategoryService.getCategoriesCount(groupId, parentCategoryId);
98 }
99
100 public static void subscribeCategory(long categoryId)
101 throws com.liferay.portal.PortalException,
102 com.liferay.portal.SystemException, java.rmi.RemoteException {
103 MBCategoryService mbCategoryService = MBCategoryServiceFactory.getService();
104
105 mbCategoryService.subscribeCategory(categoryId);
106 }
107
108 public static void unsubscribeCategory(long categoryId)
109 throws com.liferay.portal.PortalException,
110 com.liferay.portal.SystemException, java.rmi.RemoteException {
111 MBCategoryService mbCategoryService = MBCategoryServiceFactory.getService();
112
113 mbCategoryService.unsubscribeCategory(categoryId);
114 }
115
116 public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
117 long categoryId, long parentCategoryId, java.lang.String name,
118 java.lang.String description, boolean mergeWithParentCategory)
119 throws com.liferay.portal.PortalException,
120 com.liferay.portal.SystemException, java.rmi.RemoteException {
121 MBCategoryService mbCategoryService = MBCategoryServiceFactory.getService();
122
123 return mbCategoryService.updateCategory(categoryId, parentCategoryId,
124 name, description, mergeWithParentCategory);
125 }
126 }