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 parentCategoryId, java.lang.String name,
42 java.lang.String description, java.lang.String emailAddress,
43 java.lang.String inProtocol, java.lang.String inServerName,
44 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
45 java.lang.String inPassword, int inReadInterval,
46 java.lang.String outEmailAddress, boolean outCustom,
47 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
48 java.lang.String outUserName, java.lang.String outPassword,
49 boolean mailingListActive,
50 com.liferay.portal.service.ServiceContext serviceContext)
51 throws com.liferay.portal.kernel.exception.PortalException,
52 com.liferay.portal.kernel.exception.SystemException {
53 return getService()
54 .addCategory(parentCategoryId, name, description,
55 emailAddress, inProtocol, inServerName, inServerPort, inUseSSL,
56 inUserName, inPassword, inReadInterval, outEmailAddress, outCustom,
57 outServerName, outServerPort, outUseSSL, outUserName, outPassword,
58 mailingListActive, serviceContext);
59 }
60
61 public static void deleteCategory(long groupId, long categoryId)
62 throws com.liferay.portal.kernel.exception.PortalException,
63 com.liferay.portal.kernel.exception.SystemException {
64 getService().deleteCategory(groupId, categoryId);
65 }
66
67 public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
68 long categoryId)
69 throws com.liferay.portal.kernel.exception.PortalException,
70 com.liferay.portal.kernel.exception.SystemException {
71 return getService().getCategory(categoryId);
72 }
73
74 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
75 long groupId, long parentCategoryId, int start, int end)
76 throws com.liferay.portal.kernel.exception.SystemException {
77 return getService().getCategories(groupId, parentCategoryId, start, end);
78 }
79
80 public static int getCategoriesCount(long groupId, long parentCategoryId)
81 throws com.liferay.portal.kernel.exception.SystemException {
82 return getService().getCategoriesCount(groupId, parentCategoryId);
83 }
84
85 public static java.util.List<java.lang.Long> getSubcategoryIds(
86 java.util.List<java.lang.Long> categoryIds, long groupId,
87 long categoryId)
88 throws com.liferay.portal.kernel.exception.SystemException {
89 return getService().getSubcategoryIds(categoryIds, groupId, categoryId);
90 }
91
92 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
93 long groupId, long userId, int start, int end)
94 throws com.liferay.portal.kernel.exception.SystemException {
95 return getService().getSubscribedCategories(groupId, userId, start, end);
96 }
97
98 public static int getSubscribedCategoriesCount(long groupId, long userId)
99 throws com.liferay.portal.kernel.exception.SystemException {
100 return getService().getSubscribedCategoriesCount(groupId, userId);
101 }
102
103 public static void subscribeCategory(long groupId, long categoryId)
104 throws com.liferay.portal.kernel.exception.PortalException,
105 com.liferay.portal.kernel.exception.SystemException {
106 getService().subscribeCategory(groupId, categoryId);
107 }
108
109 public static void unsubscribeCategory(long groupId, long categoryId)
110 throws com.liferay.portal.kernel.exception.PortalException,
111 com.liferay.portal.kernel.exception.SystemException {
112 getService().unsubscribeCategory(groupId, categoryId);
113 }
114
115 public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
116 long categoryId, long parentCategoryId, java.lang.String name,
117 java.lang.String description, java.lang.String emailAddress,
118 java.lang.String inProtocol, java.lang.String inServerName,
119 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
120 java.lang.String inPassword, int inReadInterval,
121 java.lang.String outEmailAddress, boolean outCustom,
122 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
123 java.lang.String outUserName, java.lang.String outPassword,
124 boolean mailingListActive, boolean mergeWithParentCategory,
125 com.liferay.portal.service.ServiceContext serviceContext)
126 throws com.liferay.portal.kernel.exception.PortalException,
127 com.liferay.portal.kernel.exception.SystemException {
128 return getService()
129 .updateCategory(categoryId, parentCategoryId, name,
130 description, emailAddress, inProtocol, inServerName, inServerPort,
131 inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
132 outCustom, outServerName, outServerPort, outUseSSL, outUserName,
133 outPassword, mailingListActive, mergeWithParentCategory,
134 serviceContext);
135 }
136
137 public static MBCategoryService getService() {
138 if (_service == null) {
139 _service = (MBCategoryService)PortalBeanLocatorUtil.locate(MBCategoryService.class.getName());
140 }
141
142 return _service;
143 }
144
145 public void setService(MBCategoryService service) {
146 _service = service;
147 }
148
149 private static MBCategoryService _service;
150 }