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.PortalException,
52 com.liferay.portal.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 categoryId)
62 throws com.liferay.portal.PortalException,
63 com.liferay.portal.SystemException {
64 getService().deleteCategory(categoryId);
65 }
66
67 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
68 long groupId, long parentCategoryId, int start, int end)
69 throws com.liferay.portal.PortalException,
70 com.liferay.portal.SystemException {
71 return getService().getCategories(groupId, parentCategoryId, start, end);
72 }
73
74 public static int getCategoriesCount(long groupId, long parentCategoryId)
75 throws com.liferay.portal.SystemException {
76 return getService().getCategoriesCount(groupId, parentCategoryId);
77 }
78
79 public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
80 long categoryId)
81 throws com.liferay.portal.PortalException,
82 com.liferay.portal.SystemException {
83 return getService().getCategory(categoryId);
84 }
85
86 public static void subscribeCategory(long categoryId)
87 throws com.liferay.portal.PortalException,
88 com.liferay.portal.SystemException {
89 getService().subscribeCategory(categoryId);
90 }
91
92 public static void unsubscribeCategory(long categoryId)
93 throws com.liferay.portal.PortalException,
94 com.liferay.portal.SystemException {
95 getService().unsubscribeCategory(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 throws com.liferay.portal.PortalException,
109 com.liferay.portal.SystemException {
110 return getService()
111 .updateCategory(categoryId, parentCategoryId, name,
112 description, emailAddress, inProtocol, inServerName, inServerPort,
113 inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
114 outCustom, outServerName, outServerPort, outUseSSL, outUserName,
115 outPassword, mailingListActive, mergeWithParentCategory);
116 }
117
118 public static MBCategoryService getService() {
119 if (_service == null) {
120 _service = (MBCategoryService)PortalBeanLocatorUtil.locate(MBCategoryService.class.getName());
121 }
122
123 return _service;
124 }
125
126 public void setService(MBCategoryService service) {
127 _service = service;
128 }
129
130 private static MBCategoryService _service;
131 }