001
014
015 package com.liferay.portlet.messageboards.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
036 public class MBCategoryServiceUtil {
037 public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
038 long parentCategoryId, java.lang.String name,
039 java.lang.String description, java.lang.String emailAddress,
040 java.lang.String inProtocol, java.lang.String inServerName,
041 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
042 java.lang.String inPassword, int inReadInterval,
043 java.lang.String outEmailAddress, boolean outCustom,
044 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
045 java.lang.String outUserName, java.lang.String outPassword,
046 boolean mailingListActive,
047 com.liferay.portal.service.ServiceContext serviceContext)
048 throws com.liferay.portal.kernel.exception.PortalException,
049 com.liferay.portal.kernel.exception.SystemException {
050 return getService()
051 .addCategory(parentCategoryId, name, description,
052 emailAddress, inProtocol, inServerName, inServerPort, inUseSSL,
053 inUserName, inPassword, inReadInterval, outEmailAddress, outCustom,
054 outServerName, outServerPort, outUseSSL, outUserName, outPassword,
055 mailingListActive, serviceContext);
056 }
057
058 public static void deleteCategory(long groupId, long categoryId)
059 throws com.liferay.portal.kernel.exception.PortalException,
060 com.liferay.portal.kernel.exception.SystemException {
061 getService().deleteCategory(groupId, categoryId);
062 }
063
064 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
065 long groupId, long parentCategoryId, int start, int end)
066 throws com.liferay.portal.kernel.exception.SystemException {
067 return getService().getCategories(groupId, parentCategoryId, start, end);
068 }
069
070 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
071 long groupId, long[] parentCategoryIds, int start, int end)
072 throws com.liferay.portal.kernel.exception.SystemException {
073 return getService().getCategories(groupId, parentCategoryIds, start, end);
074 }
075
076 public static int getCategoriesCount(long groupId, long parentCategoryId)
077 throws com.liferay.portal.kernel.exception.SystemException {
078 return getService().getCategoriesCount(groupId, parentCategoryId);
079 }
080
081 public static int getCategoriesCount(long groupId, long[] parentCategoryIds)
082 throws com.liferay.portal.kernel.exception.SystemException {
083 return getService().getCategoriesCount(groupId, parentCategoryIds);
084 }
085
086 public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
087 long categoryId)
088 throws com.liferay.portal.kernel.exception.PortalException,
089 com.liferay.portal.kernel.exception.SystemException {
090 return getService().getCategory(categoryId);
091 }
092
093 public static long[] getCategoryIds(long groupId, long categoryId)
094 throws com.liferay.portal.kernel.exception.SystemException {
095 return getService().getCategoryIds(groupId, categoryId);
096 }
097
098 public static java.util.List<java.lang.Long> getSubcategoryIds(
099 java.util.List<java.lang.Long> categoryIds, long groupId,
100 long categoryId)
101 throws com.liferay.portal.kernel.exception.SystemException {
102 return getService().getSubcategoryIds(categoryIds, groupId, categoryId);
103 }
104
105 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
106 long groupId, long userId, int start, int end)
107 throws com.liferay.portal.kernel.exception.SystemException {
108 return getService().getSubscribedCategories(groupId, userId, start, end);
109 }
110
111 public static int getSubscribedCategoriesCount(long groupId, long userId)
112 throws com.liferay.portal.kernel.exception.SystemException {
113 return getService().getSubscribedCategoriesCount(groupId, userId);
114 }
115
116 public static void subscribeCategory(long groupId, long categoryId)
117 throws com.liferay.portal.kernel.exception.PortalException,
118 com.liferay.portal.kernel.exception.SystemException {
119 getService().subscribeCategory(groupId, categoryId);
120 }
121
122 public static void unsubscribeCategory(long groupId, long categoryId)
123 throws com.liferay.portal.kernel.exception.PortalException,
124 com.liferay.portal.kernel.exception.SystemException {
125 getService().unsubscribeCategory(groupId, categoryId);
126 }
127
128 public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
129 long categoryId, long parentCategoryId, java.lang.String name,
130 java.lang.String description, java.lang.String emailAddress,
131 java.lang.String inProtocol, java.lang.String inServerName,
132 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
133 java.lang.String inPassword, int inReadInterval,
134 java.lang.String outEmailAddress, boolean outCustom,
135 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
136 java.lang.String outUserName, java.lang.String outPassword,
137 boolean mailingListActive, boolean mergeWithParentCategory,
138 com.liferay.portal.service.ServiceContext serviceContext)
139 throws com.liferay.portal.kernel.exception.PortalException,
140 com.liferay.portal.kernel.exception.SystemException {
141 return getService()
142 .updateCategory(categoryId, parentCategoryId, name,
143 description, emailAddress, inProtocol, inServerName, inServerPort,
144 inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
145 outCustom, outServerName, outServerPort, outUseSSL, outUserName,
146 outPassword, mailingListActive, mergeWithParentCategory,
147 serviceContext);
148 }
149
150 public static MBCategoryService getService() {
151 if (_service == null) {
152 _service = (MBCategoryService)PortalBeanLocatorUtil.locate(MBCategoryService.class.getName());
153 }
154
155 return _service;
156 }
157
158 public void setService(MBCategoryService service) {
159 _service = service;
160 }
161
162 private static MBCategoryService _service;
163 }