1
14
15 package com.liferay.portlet.messageboards.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
39 public class MBCategoryServiceUtil {
40 public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
41 long plid, long parentCategoryId, java.lang.String name,
42 java.lang.String description, boolean addCommunityPermissions,
43 boolean addGuestPermissions)
44 throws com.liferay.portal.PortalException,
45 com.liferay.portal.SystemException, java.rmi.RemoteException {
46 return getService()
47 .addCategory(plid, parentCategoryId, name, description,
48 addCommunityPermissions, addGuestPermissions);
49 }
50
51 public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
52 long plid, long parentCategoryId, java.lang.String name,
53 java.lang.String description, java.lang.String[] communityPermissions,
54 java.lang.String[] guestPermissions)
55 throws com.liferay.portal.PortalException,
56 com.liferay.portal.SystemException, java.rmi.RemoteException {
57 return getService()
58 .addCategory(plid, parentCategoryId, name, description,
59 communityPermissions, guestPermissions);
60 }
61
62 public static void deleteCategory(long categoryId)
63 throws com.liferay.portal.PortalException,
64 com.liferay.portal.SystemException, java.rmi.RemoteException {
65 getService().deleteCategory(categoryId);
66 }
67
68 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
69 long groupId, long parentCategoryId, int start, int end)
70 throws com.liferay.portal.PortalException,
71 com.liferay.portal.SystemException, java.rmi.RemoteException {
72 return getService().getCategories(groupId, parentCategoryId, start, end);
73 }
74
75 public static int getCategoriesCount(long groupId, long parentCategoryId)
76 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
77 return getService().getCategoriesCount(groupId, parentCategoryId);
78 }
79
80 public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
81 long categoryId)
82 throws com.liferay.portal.PortalException,
83 com.liferay.portal.SystemException, java.rmi.RemoteException {
84 return getService().getCategory(categoryId);
85 }
86
87 public static void subscribeCategory(long categoryId)
88 throws com.liferay.portal.PortalException,
89 com.liferay.portal.SystemException, java.rmi.RemoteException {
90 getService().subscribeCategory(categoryId);
91 }
92
93 public static void unsubscribeCategory(long categoryId)
94 throws com.liferay.portal.PortalException,
95 com.liferay.portal.SystemException, java.rmi.RemoteException {
96 getService().unsubscribeCategory(categoryId);
97 }
98
99 public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
100 long categoryId, long parentCategoryId, java.lang.String name,
101 java.lang.String description, boolean mergeWithParentCategory)
102 throws com.liferay.portal.PortalException,
103 com.liferay.portal.SystemException, java.rmi.RemoteException {
104 return getService()
105 .updateCategory(categoryId, parentCategoryId, name,
106 description, mergeWithParentCategory);
107 }
108
109 public static MBCategoryService getService() {
110 if (_service == null) {
111 _service = (MBCategoryService)PortalBeanLocatorUtil.locate(MBCategoryService.class.getName());
112 }
113
114 return _service;
115 }
116
117 public void setService(MBCategoryService service) {
118 _service = service;
119 }
120
121 private static MBCategoryService _service;
122 }