1
14
15 package com.liferay.portlet.messageboards.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.kernel.util.ListUtil;
20
21 import com.liferay.portlet.messageboards.service.MBCategoryServiceUtil;
22
23 import java.rmi.RemoteException;
24
25
75 public class MBCategoryServiceSoap {
76 public static com.liferay.portlet.messageboards.model.MBCategorySoap addCategory(
77 long parentCategoryId, java.lang.String name,
78 java.lang.String description, java.lang.String emailAddress,
79 java.lang.String inProtocol, java.lang.String inServerName,
80 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
81 java.lang.String inPassword, int inReadInterval,
82 java.lang.String outEmailAddress, boolean outCustom,
83 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
84 java.lang.String outUserName, java.lang.String outPassword,
85 boolean mailingListActive,
86 com.liferay.portal.service.ServiceContext serviceContext)
87 throws RemoteException {
88 try {
89 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.addCategory(parentCategoryId,
90 name, description, emailAddress, inProtocol, inServerName,
91 inServerPort, inUseSSL, inUserName, inPassword,
92 inReadInterval, outEmailAddress, outCustom, outServerName,
93 outServerPort, outUseSSL, outUserName, outPassword,
94 mailingListActive, serviceContext);
95
96 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
97 }
98 catch (Exception e) {
99 _log.error(e, e);
100
101 throw new RemoteException(e.getMessage());
102 }
103 }
104
105 public static void deleteCategory(long groupId, long categoryId)
106 throws RemoteException {
107 try {
108 MBCategoryServiceUtil.deleteCategory(groupId, categoryId);
109 }
110 catch (Exception e) {
111 _log.error(e, e);
112
113 throw new RemoteException(e.getMessage());
114 }
115 }
116
117 public static com.liferay.portlet.messageboards.model.MBCategorySoap getCategory(
118 long categoryId) throws RemoteException {
119 try {
120 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.getCategory(categoryId);
121
122 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
123 }
124 catch (Exception e) {
125 _log.error(e, e);
126
127 throw new RemoteException(e.getMessage());
128 }
129 }
130
131 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
132 long groupId, long parentCategoryId, int start, int end)
133 throws RemoteException {
134 try {
135 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
136 MBCategoryServiceUtil.getCategories(groupId, parentCategoryId,
137 start, end);
138
139 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
140 }
141 catch (Exception e) {
142 _log.error(e, e);
143
144 throw new RemoteException(e.getMessage());
145 }
146 }
147
148 public static int getCategoriesCount(long groupId, long parentCategoryId)
149 throws RemoteException {
150 try {
151 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
152 parentCategoryId);
153
154 return returnValue;
155 }
156 catch (Exception e) {
157 _log.error(e, e);
158
159 throw new RemoteException(e.getMessage());
160 }
161 }
162
163 public static java.lang.Long[] getSubcategoryIds(Long[] categoryIds,
164 long groupId, long categoryId) throws RemoteException {
165 try {
166 java.util.List<java.lang.Long> returnValue = MBCategoryServiceUtil.getSubcategoryIds(ListUtil.toList(
167 categoryIds), groupId, categoryId);
168
169 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
170 }
171 catch (Exception e) {
172 _log.error(e, e);
173
174 throw new RemoteException(e.getMessage());
175 }
176 }
177
178 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getSubscribedCategories(
179 long groupId, long userId, int start, int end)
180 throws RemoteException {
181 try {
182 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
183 MBCategoryServiceUtil.getSubscribedCategories(groupId, userId,
184 start, end);
185
186 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
187 }
188 catch (Exception e) {
189 _log.error(e, e);
190
191 throw new RemoteException(e.getMessage());
192 }
193 }
194
195 public static int getSubscribedCategoriesCount(long groupId, long userId)
196 throws RemoteException {
197 try {
198 int returnValue = MBCategoryServiceUtil.getSubscribedCategoriesCount(groupId,
199 userId);
200
201 return returnValue;
202 }
203 catch (Exception e) {
204 _log.error(e, e);
205
206 throw new RemoteException(e.getMessage());
207 }
208 }
209
210 public static void subscribeCategory(long groupId, long categoryId)
211 throws RemoteException {
212 try {
213 MBCategoryServiceUtil.subscribeCategory(groupId, categoryId);
214 }
215 catch (Exception e) {
216 _log.error(e, e);
217
218 throw new RemoteException(e.getMessage());
219 }
220 }
221
222 public static void unsubscribeCategory(long groupId, long categoryId)
223 throws RemoteException {
224 try {
225 MBCategoryServiceUtil.unsubscribeCategory(groupId, categoryId);
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 updateCategory(
235 long categoryId, long parentCategoryId, java.lang.String name,
236 java.lang.String description, java.lang.String emailAddress,
237 java.lang.String inProtocol, java.lang.String inServerName,
238 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
239 java.lang.String inPassword, int inReadInterval,
240 java.lang.String outEmailAddress, boolean outCustom,
241 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
242 java.lang.String outUserName, java.lang.String outPassword,
243 boolean mailingListActive, boolean mergeWithParentCategory,
244 com.liferay.portal.service.ServiceContext serviceContext)
245 throws RemoteException {
246 try {
247 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.updateCategory(categoryId,
248 parentCategoryId, name, description, emailAddress,
249 inProtocol, inServerName, inServerPort, inUseSSL,
250 inUserName, inPassword, inReadInterval, outEmailAddress,
251 outCustom, outServerName, outServerPort, outUseSSL,
252 outUserName, outPassword, mailingListActive,
253 mergeWithParentCategory, serviceContext);
254
255 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
256 }
257 catch (Exception e) {
258 _log.error(e, e);
259
260 throw new RemoteException(e.getMessage());
261 }
262 }
263
264 private static Log _log = LogFactoryUtil.getLog(MBCategoryServiceSoap.class);
265 }