001
014
015 package com.liferay.portlet.messageboards.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019 import com.liferay.portal.kernel.util.ListUtil;
020
021 import com.liferay.portlet.messageboards.service.MBCategoryServiceUtil;
022
023 import java.rmi.RemoteException;
024
025
067 public class MBCategoryServiceSoap {
068 public static com.liferay.portlet.messageboards.model.MBCategorySoap addCategory(
069 long parentCategoryId, java.lang.String name,
070 java.lang.String description, java.lang.String displayStyle,
071 java.lang.String emailAddress, java.lang.String inProtocol,
072 java.lang.String inServerName, int inServerPort, boolean inUseSSL,
073 java.lang.String inUserName, java.lang.String inPassword,
074 int inReadInterval, java.lang.String outEmailAddress,
075 boolean outCustom, java.lang.String outServerName, int outServerPort,
076 boolean outUseSSL, java.lang.String outUserName,
077 java.lang.String outPassword, boolean mailingListActive,
078 boolean allowAnonymousEmail,
079 com.liferay.portal.service.ServiceContext serviceContext)
080 throws RemoteException {
081 try {
082 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.addCategory(parentCategoryId,
083 name, description, displayStyle, emailAddress, inProtocol,
084 inServerName, inServerPort, inUseSSL, inUserName,
085 inPassword, inReadInterval, outEmailAddress, outCustom,
086 outServerName, outServerPort, outUseSSL, outUserName,
087 outPassword, mailingListActive, allowAnonymousEmail,
088 serviceContext);
089
090 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
091 }
092 catch (Exception e) {
093 _log.error(e, e);
094
095 throw new RemoteException(e.getMessage());
096 }
097 }
098
099 public static void deleteCategory(long groupId, long categoryId)
100 throws RemoteException {
101 try {
102 MBCategoryServiceUtil.deleteCategory(groupId, categoryId);
103 }
104 catch (Exception e) {
105 _log.error(e, e);
106
107 throw new RemoteException(e.getMessage());
108 }
109 }
110
111 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
112 long groupId) throws RemoteException {
113 try {
114 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
115 MBCategoryServiceUtil.getCategories(groupId);
116
117 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
118 }
119 catch (Exception e) {
120 _log.error(e, e);
121
122 throw new RemoteException(e.getMessage());
123 }
124 }
125
126 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
127 long groupId, long parentCategoryId, int start, int end)
128 throws RemoteException {
129 try {
130 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
131 MBCategoryServiceUtil.getCategories(groupId, parentCategoryId,
132 start, end);
133
134 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
135 }
136 catch (Exception e) {
137 _log.error(e, e);
138
139 throw new RemoteException(e.getMessage());
140 }
141 }
142
143 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
144 long groupId, long[] parentCategoryIds, int start, int end)
145 throws RemoteException {
146 try {
147 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
148 MBCategoryServiceUtil.getCategories(groupId, parentCategoryIds,
149 start, end);
150
151 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
152 }
153 catch (Exception e) {
154 _log.error(e, e);
155
156 throw new RemoteException(e.getMessage());
157 }
158 }
159
160 public static int getCategoriesCount(long groupId, long parentCategoryId)
161 throws RemoteException {
162 try {
163 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
164 parentCategoryId);
165
166 return returnValue;
167 }
168 catch (Exception e) {
169 _log.error(e, e);
170
171 throw new RemoteException(e.getMessage());
172 }
173 }
174
175 public static int getCategoriesCount(long groupId, long[] parentCategoryIds)
176 throws RemoteException {
177 try {
178 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
179 parentCategoryIds);
180
181 return returnValue;
182 }
183 catch (Exception e) {
184 _log.error(e, e);
185
186 throw new RemoteException(e.getMessage());
187 }
188 }
189
190 public static com.liferay.portlet.messageboards.model.MBCategorySoap getCategory(
191 long categoryId) throws RemoteException {
192 try {
193 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.getCategory(categoryId);
194
195 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
196 }
197 catch (Exception e) {
198 _log.error(e, e);
199
200 throw new RemoteException(e.getMessage());
201 }
202 }
203
204 public static long[] getCategoryIds(long groupId, long categoryId)
205 throws RemoteException {
206 try {
207 long[] returnValue = MBCategoryServiceUtil.getCategoryIds(groupId,
208 categoryId);
209
210 return returnValue;
211 }
212 catch (Exception e) {
213 _log.error(e, e);
214
215 throw new RemoteException(e.getMessage());
216 }
217 }
218
219 public static java.lang.Long[] getSubcategoryIds(Long[] categoryIds,
220 long groupId, long categoryId) throws RemoteException {
221 try {
222 java.util.List<java.lang.Long> returnValue = MBCategoryServiceUtil.getSubcategoryIds(ListUtil.toList(
223 categoryIds), groupId, categoryId);
224
225 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
226 }
227 catch (Exception e) {
228 _log.error(e, e);
229
230 throw new RemoteException(e.getMessage());
231 }
232 }
233
234 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getSubscribedCategories(
235 long groupId, long userId, int start, int end)
236 throws RemoteException {
237 try {
238 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
239 MBCategoryServiceUtil.getSubscribedCategories(groupId, userId,
240 start, end);
241
242 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
243 }
244 catch (Exception e) {
245 _log.error(e, e);
246
247 throw new RemoteException(e.getMessage());
248 }
249 }
250
251 public static int getSubscribedCategoriesCount(long groupId, long userId)
252 throws RemoteException {
253 try {
254 int returnValue = MBCategoryServiceUtil.getSubscribedCategoriesCount(groupId,
255 userId);
256
257 return returnValue;
258 }
259 catch (Exception e) {
260 _log.error(e, e);
261
262 throw new RemoteException(e.getMessage());
263 }
264 }
265
266 public static void subscribeCategory(long groupId, long categoryId)
267 throws RemoteException {
268 try {
269 MBCategoryServiceUtil.subscribeCategory(groupId, categoryId);
270 }
271 catch (Exception e) {
272 _log.error(e, e);
273
274 throw new RemoteException(e.getMessage());
275 }
276 }
277
278 public static void unsubscribeCategory(long groupId, long categoryId)
279 throws RemoteException {
280 try {
281 MBCategoryServiceUtil.unsubscribeCategory(groupId, categoryId);
282 }
283 catch (Exception e) {
284 _log.error(e, e);
285
286 throw new RemoteException(e.getMessage());
287 }
288 }
289
290 public static com.liferay.portlet.messageboards.model.MBCategorySoap updateCategory(
291 long categoryId, long parentCategoryId, java.lang.String name,
292 java.lang.String description, java.lang.String displayStyle,
293 java.lang.String emailAddress, java.lang.String inProtocol,
294 java.lang.String inServerName, int inServerPort, boolean inUseSSL,
295 java.lang.String inUserName, java.lang.String inPassword,
296 int inReadInterval, java.lang.String outEmailAddress,
297 boolean outCustom, java.lang.String outServerName, int outServerPort,
298 boolean outUseSSL, java.lang.String outUserName,
299 java.lang.String outPassword, boolean mailingListActive,
300 boolean allowAnonymousEmail, boolean mergeWithParentCategory,
301 com.liferay.portal.service.ServiceContext serviceContext)
302 throws RemoteException {
303 try {
304 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.updateCategory(categoryId,
305 parentCategoryId, name, description, displayStyle,
306 emailAddress, inProtocol, inServerName, inServerPort,
307 inUseSSL, inUserName, inPassword, inReadInterval,
308 outEmailAddress, outCustom, outServerName, outServerPort,
309 outUseSSL, outUserName, outPassword, mailingListActive,
310 allowAnonymousEmail, mergeWithParentCategory, serviceContext);
311
312 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
313 }
314 catch (Exception e) {
315 _log.error(e, e);
316
317 throw new RemoteException(e.getMessage());
318 }
319 }
320
321 private static Log _log = LogFactoryUtil.getLog(MBCategoryServiceSoap.class);
322 }