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