001
014
015 package com.liferay.portlet.journal.service.http;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.log.Log;
020 import com.liferay.portal.kernel.log.LogFactoryUtil;
021 import com.liferay.portal.kernel.util.ListUtil;
022
023 import com.liferay.portlet.journal.service.JournalFolderServiceUtil;
024
025 import java.rmi.RemoteException;
026
027
067 @ProviderType
068 public class JournalFolderServiceSoap {
069 public static com.liferay.portlet.journal.model.JournalFolderSoap addFolder(
070 long groupId, long parentFolderId, java.lang.String name,
071 java.lang.String description,
072 com.liferay.portal.service.ServiceContext serviceContext)
073 throws RemoteException {
074 try {
075 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.addFolder(groupId,
076 parentFolderId, name, description, serviceContext);
077
078 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
079 }
080 catch (Exception e) {
081 _log.error(e, e);
082
083 throw new RemoteException(e.getMessage());
084 }
085 }
086
087 public static void deleteFolder(long folderId) throws RemoteException {
088 try {
089 JournalFolderServiceUtil.deleteFolder(folderId);
090 }
091 catch (Exception e) {
092 _log.error(e, e);
093
094 throw new RemoteException(e.getMessage());
095 }
096 }
097
098 public static void deleteFolder(long folderId, boolean includeTrashedEntries)
099 throws RemoteException {
100 try {
101 JournalFolderServiceUtil.deleteFolder(folderId,
102 includeTrashedEntries);
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.journal.model.JournalFolderSoap fetchFolder(
112 long folderId) throws RemoteException {
113 try {
114 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.fetchFolder(folderId);
115
116 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
117 }
118 catch (Exception e) {
119 _log.error(e, e);
120
121 throw new RemoteException(e.getMessage());
122 }
123 }
124
125 public static com.liferay.portlet.journal.model.JournalFolderSoap getFolder(
126 long folderId) throws RemoteException {
127 try {
128 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.getFolder(folderId);
129
130 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
131 }
132 catch (Exception e) {
133 _log.error(e, e);
134
135 throw new RemoteException(e.getMessage());
136 }
137 }
138
139 public static java.lang.Long[] getFolderIds(long groupId, long folderId)
140 throws RemoteException {
141 try {
142 java.util.List<java.lang.Long> returnValue = JournalFolderServiceUtil.getFolderIds(groupId,
143 folderId);
144
145 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
146 }
147 catch (Exception e) {
148 _log.error(e, e);
149
150 throw new RemoteException(e.getMessage());
151 }
152 }
153
154 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
155 long groupId) throws RemoteException {
156 try {
157 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
158 JournalFolderServiceUtil.getFolders(groupId);
159
160 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
161 }
162 catch (Exception e) {
163 _log.error(e, e);
164
165 throw new RemoteException(e.getMessage());
166 }
167 }
168
169 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
170 long groupId, long parentFolderId) throws RemoteException {
171 try {
172 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
173 JournalFolderServiceUtil.getFolders(groupId, parentFolderId);
174
175 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
176 }
177 catch (Exception e) {
178 _log.error(e, e);
179
180 throw new RemoteException(e.getMessage());
181 }
182 }
183
184 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
185 long groupId, long parentFolderId, int status)
186 throws RemoteException {
187 try {
188 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
189 JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
190 status);
191
192 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
193 }
194 catch (Exception e) {
195 _log.error(e, e);
196
197 throw new RemoteException(e.getMessage());
198 }
199 }
200
201 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
202 long groupId, long parentFolderId, int start, int end)
203 throws RemoteException {
204 try {
205 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
206 JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
207 start, end);
208
209 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
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.journal.model.JournalFolderSoap[] getFolders(
219 long groupId, long parentFolderId, int status, int start, int end)
220 throws RemoteException {
221 try {
222 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
223 JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
224 status, start, end);
225
226 return com.liferay.portlet.journal.model.JournalFolderSoap.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 getFoldersAndArticlesCount(long groupId,
236 Long[] folderIds, int status) throws RemoteException {
237 try {
238 int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
239 ListUtil.toList(folderIds), status);
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 int getFoldersAndArticlesCount(long groupId, long folderId)
251 throws RemoteException {
252 try {
253 int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
254 folderId);
255
256 return returnValue;
257 }
258 catch (Exception e) {
259 _log.error(e, e);
260
261 throw new RemoteException(e.getMessage());
262 }
263 }
264
265 public static int getFoldersAndArticlesCount(long groupId, long folderId,
266 int status) throws RemoteException {
267 try {
268 int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
269 folderId, status);
270
271 return returnValue;
272 }
273 catch (Exception e) {
274 _log.error(e, e);
275
276 throw new RemoteException(e.getMessage());
277 }
278 }
279
280 public static int getFoldersCount(long groupId, long parentFolderId)
281 throws RemoteException {
282 try {
283 int returnValue = JournalFolderServiceUtil.getFoldersCount(groupId,
284 parentFolderId);
285
286 return returnValue;
287 }
288 catch (Exception e) {
289 _log.error(e, e);
290
291 throw new RemoteException(e.getMessage());
292 }
293 }
294
295 public static int getFoldersCount(long groupId, long parentFolderId,
296 int status) throws RemoteException {
297 try {
298 int returnValue = JournalFolderServiceUtil.getFoldersCount(groupId,
299 parentFolderId, status);
300
301 return returnValue;
302 }
303 catch (Exception e) {
304 _log.error(e, e);
305
306 throw new RemoteException(e.getMessage());
307 }
308 }
309
310
314 @Deprecated
315 public static void getSubfolderIds(Long[] folderIds, long groupId,
316 long folderId) throws RemoteException {
317 try {
318 JournalFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
319 groupId, folderId);
320 }
321 catch (Exception e) {
322 _log.error(e, e);
323
324 throw new RemoteException(e.getMessage());
325 }
326 }
327
328 public static void getSubfolderIds(Long[] folderIds, long groupId,
329 long folderId, boolean recurse) throws RemoteException {
330 try {
331 JournalFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
332 groupId, folderId, recurse);
333 }
334 catch (Exception e) {
335 _log.error(e, e);
336
337 throw new RemoteException(e.getMessage());
338 }
339 }
340
341 public static java.lang.Long[] getSubfolderIds(long groupId, long folderId,
342 boolean recurse) throws RemoteException {
343 try {
344 java.util.List<java.lang.Long> returnValue = JournalFolderServiceUtil.getSubfolderIds(groupId,
345 folderId, recurse);
346
347 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
348 }
349 catch (Exception e) {
350 _log.error(e, e);
351
352 throw new RemoteException(e.getMessage());
353 }
354 }
355
356 public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolder(
357 long folderId, long parentFolderId,
358 com.liferay.portal.service.ServiceContext serviceContext)
359 throws RemoteException {
360 try {
361 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolder(folderId,
362 parentFolderId, serviceContext);
363
364 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
365 }
366 catch (Exception e) {
367 _log.error(e, e);
368
369 throw new RemoteException(e.getMessage());
370 }
371 }
372
373 public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolderFromTrash(
374 long folderId, long parentFolderId,
375 com.liferay.portal.service.ServiceContext serviceContext)
376 throws RemoteException {
377 try {
378 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolderFromTrash(folderId,
379 parentFolderId, serviceContext);
380
381 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
382 }
383 catch (Exception e) {
384 _log.error(e, e);
385
386 throw new RemoteException(e.getMessage());
387 }
388 }
389
390 public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolderToTrash(
391 long folderId) throws RemoteException {
392 try {
393 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolderToTrash(folderId);
394
395 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
396 }
397 catch (Exception e) {
398 _log.error(e, e);
399
400 throw new RemoteException(e.getMessage());
401 }
402 }
403
404 public static void restoreFolderFromTrash(long folderId)
405 throws RemoteException {
406 try {
407 JournalFolderServiceUtil.restoreFolderFromTrash(folderId);
408 }
409 catch (Exception e) {
410 _log.error(e, e);
411
412 throw new RemoteException(e.getMessage());
413 }
414 }
415
416 public static void subscribe(long groupId, long folderId)
417 throws RemoteException {
418 try {
419 JournalFolderServiceUtil.subscribe(groupId, folderId);
420 }
421 catch (Exception e) {
422 _log.error(e, e);
423
424 throw new RemoteException(e.getMessage());
425 }
426 }
427
428 public static void unsubscribe(long groupId, long folderId)
429 throws RemoteException {
430 try {
431 JournalFolderServiceUtil.unsubscribe(groupId, folderId);
432 }
433 catch (Exception e) {
434 _log.error(e, e);
435
436 throw new RemoteException(e.getMessage());
437 }
438 }
439
440 public static com.liferay.portlet.journal.model.JournalFolderSoap updateFolder(
441 long folderId, long parentFolderId, java.lang.String name,
442 java.lang.String description, boolean mergeWithParentFolder,
443 com.liferay.portal.service.ServiceContext serviceContext)
444 throws RemoteException {
445 try {
446 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.updateFolder(folderId,
447 parentFolderId, name, description, mergeWithParentFolder,
448 serviceContext);
449
450 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
451 }
452 catch (Exception e) {
453 _log.error(e, e);
454
455 throw new RemoteException(e.getMessage());
456 }
457 }
458
459 public static com.liferay.portlet.journal.model.JournalFolderSoap updateFolder(
460 long folderId, long parentFolderId, java.lang.String name,
461 java.lang.String description, long[] ddmStructureIds,
462 int restrictionType, boolean mergeWithParentFolder,
463 com.liferay.portal.service.ServiceContext serviceContext)
464 throws RemoteException {
465 try {
466 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.updateFolder(folderId,
467 parentFolderId, name, description, ddmStructureIds,
468 restrictionType, mergeWithParentFolder, serviceContext);
469
470 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
471 }
472 catch (Exception e) {
473 _log.error(e, e);
474
475 throw new RemoteException(e.getMessage());
476 }
477 }
478
479 private static Log _log = LogFactoryUtil.getLog(JournalFolderServiceSoap.class);
480 }