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