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.PortalException,
77 com.liferay.portal.kernel.exception.SystemException {
78 return getService().getCategories(groupId, parentCategoryId, start, end);
79 }
80
81 public static int getCategoriesCount(long groupId, long parentCategoryId)
82 throws com.liferay.portal.kernel.exception.SystemException {
83 return getService().getCategoriesCount(groupId, parentCategoryId);
84 }
85
86 public static void subscribeCategory(long groupId, long categoryId)
87 throws com.liferay.portal.kernel.exception.PortalException,
88 com.liferay.portal.kernel.exception.SystemException {
89 getService().subscribeCategory(groupId, categoryId);
90 }
91
92 public static void unsubscribeCategory(long groupId, long categoryId)
93 throws com.liferay.portal.kernel.exception.PortalException,
94 com.liferay.portal.kernel.exception.SystemException {
95 getService().unsubscribeCategory(groupId, categoryId);
96 }
97
98 public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
99 long categoryId, long parentCategoryId, java.lang.String name,
100 java.lang.String description, java.lang.String emailAddress,
101 java.lang.String inProtocol, java.lang.String inServerName,
102 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
103 java.lang.String inPassword, int inReadInterval,
104 java.lang.String outEmailAddress, boolean outCustom,
105 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
106 java.lang.String outUserName, java.lang.String outPassword,
107 boolean mailingListActive, boolean mergeWithParentCategory,
108 com.liferay.portal.service.ServiceContext serviceContext)
109 throws com.liferay.portal.kernel.exception.PortalException,
110 com.liferay.portal.kernel.exception.SystemException {
111 return getService()
112 .updateCategory(categoryId, parentCategoryId, name,
113 description, emailAddress, inProtocol, inServerName, inServerPort,
114 inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
115 outCustom, outServerName, outServerPort, outUseSSL, outUserName,
116 outPassword, mailingListActive, mergeWithParentCategory,
117 serviceContext);
118 }
119
120 public static MBCategoryService getService() {
121 if (_service == null) {
122 _service = (MBCategoryService)PortalBeanLocatorUtil.locate(MBCategoryService.class.getName());
123 }
124
125 return _service;
126 }
127
128 public void setService(MBCategoryService service) {
129 _service = service;
130 }
131
132 private static MBCategoryService _service;
133 }