001
014
015 package com.liferay.portlet.messageboards.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020 import com.liferay.portal.kernel.util.ReferenceRegistry;
021
022
036 @ProviderType
037 public class MBCategoryServiceUtil {
038
043
044
049 public static java.lang.String getBeanIdentifier() {
050 return getService().getBeanIdentifier();
051 }
052
053
058 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
059 getService().setBeanIdentifier(beanIdentifier);
060 }
061
062 public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
063 long userId, long parentCategoryId, java.lang.String name,
064 java.lang.String description,
065 com.liferay.portal.service.ServiceContext serviceContext)
066 throws com.liferay.portal.kernel.exception.PortalException,
067 com.liferay.portal.kernel.exception.SystemException {
068 return getService()
069 .addCategory(userId, parentCategoryId, name, description,
070 serviceContext);
071 }
072
073 public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
074 long parentCategoryId, java.lang.String name,
075 java.lang.String description, java.lang.String displayStyle,
076 java.lang.String emailAddress, java.lang.String inProtocol,
077 java.lang.String inServerName, int inServerPort, boolean inUseSSL,
078 java.lang.String inUserName, java.lang.String inPassword,
079 int inReadInterval, java.lang.String outEmailAddress,
080 boolean outCustom, java.lang.String outServerName, int outServerPort,
081 boolean outUseSSL, java.lang.String outUserName,
082 java.lang.String outPassword, boolean mailingListActive,
083 boolean allowAnonymousEmail,
084 com.liferay.portal.service.ServiceContext serviceContext)
085 throws com.liferay.portal.kernel.exception.PortalException,
086 com.liferay.portal.kernel.exception.SystemException {
087 return getService()
088 .addCategory(parentCategoryId, name, description,
089 displayStyle, emailAddress, inProtocol, inServerName, inServerPort,
090 inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
091 outCustom, outServerName, outServerPort, outUseSSL, outUserName,
092 outPassword, mailingListActive, allowAnonymousEmail, serviceContext);
093 }
094
095 public static void deleteCategory(long categoryId,
096 boolean includeTrashedEntries)
097 throws com.liferay.portal.kernel.exception.PortalException,
098 com.liferay.portal.kernel.exception.SystemException {
099 getService().deleteCategory(categoryId, includeTrashedEntries);
100 }
101
102 public static void deleteCategory(long groupId, long categoryId)
103 throws com.liferay.portal.kernel.exception.PortalException,
104 com.liferay.portal.kernel.exception.SystemException {
105 getService().deleteCategory(groupId, categoryId);
106 }
107
108 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
109 long groupId)
110 throws com.liferay.portal.kernel.exception.SystemException {
111 return getService().getCategories(groupId);
112 }
113
114 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
115 long groupId, int status)
116 throws com.liferay.portal.kernel.exception.SystemException {
117 return getService().getCategories(groupId, status);
118 }
119
120 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
121 long groupId, long parentCategoryId, int start, int end)
122 throws com.liferay.portal.kernel.exception.SystemException {
123 return getService().getCategories(groupId, parentCategoryId, start, end);
124 }
125
126 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
127 long groupId, long parentCategoryId, int status, int start, int end)
128 throws com.liferay.portal.kernel.exception.SystemException {
129 return getService()
130 .getCategories(groupId, parentCategoryId, status, start, end);
131 }
132
133 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
134 long groupId, long[] parentCategoryIds, int start, int end)
135 throws com.liferay.portal.kernel.exception.SystemException {
136 return getService().getCategories(groupId, parentCategoryIds, start, end);
137 }
138
139 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
140 long groupId, long[] parentCategoryIds, int status, int start, int end)
141 throws com.liferay.portal.kernel.exception.SystemException {
142 return getService()
143 .getCategories(groupId, parentCategoryIds, status, start, end);
144 }
145
146 public static int getCategoriesCount(long groupId, long parentCategoryId)
147 throws com.liferay.portal.kernel.exception.SystemException {
148 return getService().getCategoriesCount(groupId, parentCategoryId);
149 }
150
151 public static int getCategoriesCount(long groupId, long parentCategoryId,
152 int status) throws com.liferay.portal.kernel.exception.SystemException {
153 return getService().getCategoriesCount(groupId, parentCategoryId, status);
154 }
155
156 public static int getCategoriesCount(long groupId, long[] parentCategoryIds)
157 throws com.liferay.portal.kernel.exception.SystemException {
158 return getService().getCategoriesCount(groupId, parentCategoryIds);
159 }
160
161 public static int getCategoriesCount(long groupId,
162 long[] parentCategoryIds, int status)
163 throws com.liferay.portal.kernel.exception.SystemException {
164 return getService()
165 .getCategoriesCount(groupId, parentCategoryIds, status);
166 }
167
168 public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
169 long categoryId)
170 throws com.liferay.portal.kernel.exception.PortalException,
171 com.liferay.portal.kernel.exception.SystemException {
172 return getService().getCategory(categoryId);
173 }
174
175 public static long[] getCategoryIds(long groupId, long categoryId)
176 throws com.liferay.portal.kernel.exception.SystemException {
177 return getService().getCategoryIds(groupId, categoryId);
178 }
179
180 public static java.util.List<java.lang.Long> getSubcategoryIds(
181 java.util.List<java.lang.Long> categoryIds, long groupId,
182 long categoryId)
183 throws com.liferay.portal.kernel.exception.SystemException {
184 return getService().getSubcategoryIds(categoryIds, groupId, categoryId);
185 }
186
187 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
188 long groupId, long userId, int start, int end)
189 throws com.liferay.portal.kernel.exception.SystemException {
190 return getService().getSubscribedCategories(groupId, userId, start, end);
191 }
192
193 public static int getSubscribedCategoriesCount(long groupId, long userId)
194 throws com.liferay.portal.kernel.exception.SystemException {
195 return getService().getSubscribedCategoriesCount(groupId, userId);
196 }
197
198 public static com.liferay.portlet.messageboards.model.MBCategory moveCategory(
199 long categoryId, long parentCategoryId, boolean mergeWithParentCategory)
200 throws com.liferay.portal.kernel.exception.PortalException,
201 com.liferay.portal.kernel.exception.SystemException {
202 return getService()
203 .moveCategory(categoryId, parentCategoryId,
204 mergeWithParentCategory);
205 }
206
207 public static com.liferay.portlet.messageboards.model.MBCategory moveCategoryFromTrash(
208 long categoryId, long newCategoryId)
209 throws com.liferay.portal.kernel.exception.PortalException,
210 com.liferay.portal.kernel.exception.SystemException {
211 return getService().moveCategoryFromTrash(categoryId, newCategoryId);
212 }
213
214 public static com.liferay.portlet.messageboards.model.MBCategory moveCategoryToTrash(
215 long categoryId)
216 throws com.liferay.portal.kernel.exception.PortalException,
217 com.liferay.portal.kernel.exception.SystemException {
218 return getService().moveCategoryToTrash(categoryId);
219 }
220
221 public static void restoreCategoryFromTrash(long categoryId)
222 throws com.liferay.portal.kernel.exception.PortalException,
223 com.liferay.portal.kernel.exception.SystemException {
224 getService().restoreCategoryFromTrash(categoryId);
225 }
226
227 public static void subscribeCategory(long groupId, long categoryId)
228 throws com.liferay.portal.kernel.exception.PortalException,
229 com.liferay.portal.kernel.exception.SystemException {
230 getService().subscribeCategory(groupId, categoryId);
231 }
232
233 public static void unsubscribeCategory(long groupId, long categoryId)
234 throws com.liferay.portal.kernel.exception.PortalException,
235 com.liferay.portal.kernel.exception.SystemException {
236 getService().unsubscribeCategory(groupId, categoryId);
237 }
238
239 public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
240 long categoryId, long parentCategoryId, java.lang.String name,
241 java.lang.String description, java.lang.String displayStyle,
242 java.lang.String emailAddress, java.lang.String inProtocol,
243 java.lang.String inServerName, int inServerPort, boolean inUseSSL,
244 java.lang.String inUserName, java.lang.String inPassword,
245 int inReadInterval, java.lang.String outEmailAddress,
246 boolean outCustom, java.lang.String outServerName, int outServerPort,
247 boolean outUseSSL, java.lang.String outUserName,
248 java.lang.String outPassword, boolean mailingListActive,
249 boolean allowAnonymousEmail, boolean mergeWithParentCategory,
250 com.liferay.portal.service.ServiceContext serviceContext)
251 throws com.liferay.portal.kernel.exception.PortalException,
252 com.liferay.portal.kernel.exception.SystemException {
253 return getService()
254 .updateCategory(categoryId, parentCategoryId, name,
255 description, displayStyle, emailAddress, inProtocol, inServerName,
256 inServerPort, inUseSSL, inUserName, inPassword, inReadInterval,
257 outEmailAddress, outCustom, outServerName, outServerPort,
258 outUseSSL, outUserName, outPassword, mailingListActive,
259 allowAnonymousEmail, mergeWithParentCategory, serviceContext);
260 }
261
262 public static MBCategoryService getService() {
263 if (_service == null) {
264 _service = (MBCategoryService)PortalBeanLocatorUtil.locate(MBCategoryService.class.getName());
265
266 ReferenceRegistry.registerReference(MBCategoryServiceUtil.class,
267 "_service");
268 }
269
270 return _service;
271 }
272
273
276 public void setService(MBCategoryService service) {
277 }
278
279 private static MBCategoryService _service;
280 }