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