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