001
014
015 package com.liferay.portlet.documentlibrary.service.http;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.document.library.kernel.service.DLFolderServiceUtil;
020
021 import com.liferay.portal.kernel.log.Log;
022 import com.liferay.portal.kernel.log.LogFactoryUtil;
023 import com.liferay.portal.kernel.util.ListUtil;
024
025 import java.rmi.RemoteException;
026
027
067 @ProviderType
068 public class DLFolderServiceSoap {
069 public static com.liferay.document.library.kernel.model.DLFolderSoap addFolder(
070 long groupId, long repositoryId, boolean mountPoint,
071 long parentFolderId, java.lang.String name,
072 java.lang.String description,
073 com.liferay.portal.kernel.service.ServiceContext serviceContext)
074 throws RemoteException {
075 try {
076 com.liferay.document.library.kernel.model.DLFolder returnValue = DLFolderServiceUtil.addFolder(groupId,
077 repositoryId, mountPoint, parentFolderId, name,
078 description, serviceContext);
079
080 return com.liferay.document.library.kernel.model.DLFolderSoap.toSoapModel(returnValue);
081 }
082 catch (Exception e) {
083 _log.error(e, e);
084
085 throw new RemoteException(e.getMessage());
086 }
087 }
088
089 public static void deleteFolder(long folderId) throws RemoteException {
090 try {
091 DLFolderServiceUtil.deleteFolder(folderId);
092 }
093 catch (Exception e) {
094 _log.error(e, e);
095
096 throw new RemoteException(e.getMessage());
097 }
098 }
099
100 public static void deleteFolder(long folderId, boolean includeTrashedEntries)
101 throws RemoteException {
102 try {
103 DLFolderServiceUtil.deleteFolder(folderId, includeTrashedEntries);
104 }
105 catch (Exception e) {
106 _log.error(e, e);
107
108 throw new RemoteException(e.getMessage());
109 }
110 }
111
112 public static void deleteFolder(long groupId, long parentFolderId,
113 java.lang.String name) throws RemoteException {
114 try {
115 DLFolderServiceUtil.deleteFolder(groupId, parentFolderId, name);
116 }
117 catch (Exception e) {
118 _log.error(e, e);
119
120 throw new RemoteException(e.getMessage());
121 }
122 }
123
124 public static int getFileEntriesAndFileShortcutsCount(long groupId,
125 long folderId, int status) throws RemoteException {
126 try {
127 int returnValue = DLFolderServiceUtil.getFileEntriesAndFileShortcutsCount(groupId,
128 folderId, status);
129
130 return returnValue;
131 }
132 catch (Exception e) {
133 _log.error(e, e);
134
135 throw new RemoteException(e.getMessage());
136 }
137 }
138
139 public static int getFileEntriesAndFileShortcutsCount(long groupId,
140 long folderId, int status, java.lang.String[] mimeTypes)
141 throws RemoteException {
142 try {
143 int returnValue = DLFolderServiceUtil.getFileEntriesAndFileShortcutsCount(groupId,
144 folderId, status, mimeTypes);
145
146 return returnValue;
147 }
148 catch (Exception e) {
149 _log.error(e, e);
150
151 throw new RemoteException(e.getMessage());
152 }
153 }
154
155 public static com.liferay.document.library.kernel.model.DLFolderSoap getFolder(
156 long folderId) throws RemoteException {
157 try {
158 com.liferay.document.library.kernel.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(folderId);
159
160 return com.liferay.document.library.kernel.model.DLFolderSoap.toSoapModel(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.document.library.kernel.model.DLFolderSoap getFolder(
170 long groupId, long parentFolderId, java.lang.String name)
171 throws RemoteException {
172 try {
173 com.liferay.document.library.kernel.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(groupId,
174 parentFolderId, name);
175
176 return com.liferay.document.library.kernel.model.DLFolderSoap.toSoapModel(returnValue);
177 }
178 catch (Exception e) {
179 _log.error(e, e);
180
181 throw new RemoteException(e.getMessage());
182 }
183 }
184
185 public static java.lang.Long[] getFolderIds(long groupId, long folderId)
186 throws RemoteException {
187 try {
188 java.util.List<java.lang.Long> returnValue = DLFolderServiceUtil.getFolderIds(groupId,
189 folderId);
190
191 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
192 }
193 catch (Exception e) {
194 _log.error(e, e);
195
196 throw new RemoteException(e.getMessage());
197 }
198 }
199
200 public static com.liferay.document.library.kernel.model.DLFolderSoap[] getFolders(
201 long groupId, long parentFolderId, int status,
202 boolean includeMountfolders, int start, int end,
203 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFolder> obc)
204 throws RemoteException {
205 try {
206 java.util.List<com.liferay.document.library.kernel.model.DLFolder> returnValue =
207 DLFolderServiceUtil.getFolders(groupId, parentFolderId, status,
208 includeMountfolders, start, end, obc);
209
210 return com.liferay.document.library.kernel.model.DLFolderSoap.toSoapModels(returnValue);
211 }
212 catch (Exception e) {
213 _log.error(e, e);
214
215 throw new RemoteException(e.getMessage());
216 }
217 }
218
219 public static com.liferay.document.library.kernel.model.DLFolderSoap[] getFolders(
220 long groupId, long parentFolderId, int start, int end,
221 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFolder> obc)
222 throws RemoteException {
223 try {
224 java.util.List<com.liferay.document.library.kernel.model.DLFolder> returnValue =
225 DLFolderServiceUtil.getFolders(groupId, parentFolderId, start,
226 end, obc);
227
228 return com.liferay.document.library.kernel.model.DLFolderSoap.toSoapModels(returnValue);
229 }
230 catch (Exception e) {
231 _log.error(e, e);
232
233 throw new RemoteException(e.getMessage());
234 }
235 }
236
237 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
238 long groupId, long folderId, int status, boolean includeMountFolders)
239 throws RemoteException {
240 try {
241 int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
242 folderId, status, includeMountFolders);
243
244 return returnValue;
245 }
246 catch (Exception e) {
247 _log.error(e, e);
248
249 throw new RemoteException(e.getMessage());
250 }
251 }
252
253 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
254 long groupId, long folderId, int status, java.lang.String[] mimeTypes,
255 boolean includeMountFolders) throws RemoteException {
256 try {
257 int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
258 folderId, status, mimeTypes, includeMountFolders);
259
260 return returnValue;
261 }
262 catch (Exception e) {
263 _log.error(e, e);
264
265 throw new RemoteException(e.getMessage());
266 }
267 }
268
269 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
270 long groupId, long folderId, java.lang.String[] mimeTypes,
271 boolean includeMountFolders,
272 com.liferay.portal.kernel.dao.orm.QueryDefinition<?> queryDefinition)
273 throws RemoteException {
274 try {
275 int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
276 folderId, mimeTypes, includeMountFolders, queryDefinition);
277
278 return returnValue;
279 }
280 catch (Exception e) {
281 _log.error(e, e);
282
283 throw new RemoteException(e.getMessage());
284 }
285 }
286
287 public static int getFoldersCount(long groupId, long parentFolderId)
288 throws RemoteException {
289 try {
290 int returnValue = DLFolderServiceUtil.getFoldersCount(groupId,
291 parentFolderId);
292
293 return returnValue;
294 }
295 catch (Exception e) {
296 _log.error(e, e);
297
298 throw new RemoteException(e.getMessage());
299 }
300 }
301
302 public static int getFoldersCount(long groupId, long parentFolderId,
303 int status, boolean includeMountfolders) throws RemoteException {
304 try {
305 int returnValue = DLFolderServiceUtil.getFoldersCount(groupId,
306 parentFolderId, status, includeMountfolders);
307
308 return returnValue;
309 }
310 catch (Exception e) {
311 _log.error(e, e);
312
313 throw new RemoteException(e.getMessage());
314 }
315 }
316
317 public static com.liferay.document.library.kernel.model.DLFolderSoap[] getMountFolders(
318 long groupId, long parentFolderId, int start, int end,
319 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFolder> obc)
320 throws RemoteException {
321 try {
322 java.util.List<com.liferay.document.library.kernel.model.DLFolder> returnValue =
323 DLFolderServiceUtil.getMountFolders(groupId, parentFolderId,
324 start, end, obc);
325
326 return com.liferay.document.library.kernel.model.DLFolderSoap.toSoapModels(returnValue);
327 }
328 catch (Exception e) {
329 _log.error(e, e);
330
331 throw new RemoteException(e.getMessage());
332 }
333 }
334
335 public static int getMountFoldersCount(long groupId, long parentFolderId)
336 throws RemoteException {
337 try {
338 int returnValue = DLFolderServiceUtil.getMountFoldersCount(groupId,
339 parentFolderId);
340
341 return returnValue;
342 }
343 catch (Exception e) {
344 _log.error(e, e);
345
346 throw new RemoteException(e.getMessage());
347 }
348 }
349
350
354 @Deprecated
355 public static void getSubfolderIds(Long[] folderIds, long groupId,
356 long folderId) throws RemoteException {
357 try {
358 DLFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
359 groupId, folderId);
360 }
361 catch (Exception e) {
362 _log.error(e, e);
363
364 throw new RemoteException(e.getMessage());
365 }
366 }
367
368 public static void getSubfolderIds(Long[] folderIds, long groupId,
369 long folderId, boolean recurse) throws RemoteException {
370 try {
371 DLFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
372 groupId, folderId, recurse);
373 }
374 catch (Exception e) {
375 _log.error(e, e);
376
377 throw new RemoteException(e.getMessage());
378 }
379 }
380
381 public static java.lang.Long[] getSubfolderIds(long groupId, long folderId,
382 boolean recurse) throws RemoteException {
383 try {
384 java.util.List<java.lang.Long> returnValue = DLFolderServiceUtil.getSubfolderIds(groupId,
385 folderId, recurse);
386
387 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
388 }
389 catch (Exception e) {
390 _log.error(e, e);
391
392 throw new RemoteException(e.getMessage());
393 }
394 }
395
396 public static boolean hasFolderLock(long folderId)
397 throws RemoteException {
398 try {
399 boolean returnValue = DLFolderServiceUtil.hasFolderLock(folderId);
400
401 return returnValue;
402 }
403 catch (Exception e) {
404 _log.error(e, e);
405
406 throw new RemoteException(e.getMessage());
407 }
408 }
409
410 public static boolean hasInheritableLock(long folderId)
411 throws RemoteException {
412 try {
413 boolean returnValue = DLFolderServiceUtil.hasInheritableLock(folderId);
414
415 return returnValue;
416 }
417 catch (Exception e) {
418 _log.error(e, e);
419
420 throw new RemoteException(e.getMessage());
421 }
422 }
423
424 public static boolean isFolderLocked(long folderId)
425 throws RemoteException {
426 try {
427 boolean returnValue = DLFolderServiceUtil.isFolderLocked(folderId);
428
429 return returnValue;
430 }
431 catch (Exception e) {
432 _log.error(e, e);
433
434 throw new RemoteException(e.getMessage());
435 }
436 }
437
438 public static com.liferay.portal.kernel.lock.Lock lockFolder(long folderId)
439 throws RemoteException {
440 try {
441 com.liferay.portal.kernel.lock.Lock returnValue = DLFolderServiceUtil.lockFolder(folderId);
442
443 return returnValue;
444 }
445 catch (Exception e) {
446 _log.error(e, e);
447
448 throw new RemoteException(e.getMessage());
449 }
450 }
451
452 public static com.liferay.portal.kernel.lock.Lock lockFolder(
453 long folderId, java.lang.String owner, boolean inheritable,
454 long expirationTime) throws RemoteException {
455 try {
456 com.liferay.portal.kernel.lock.Lock returnValue = DLFolderServiceUtil.lockFolder(folderId,
457 owner, inheritable, expirationTime);
458
459 return returnValue;
460 }
461 catch (Exception e) {
462 _log.error(e, e);
463
464 throw new RemoteException(e.getMessage());
465 }
466 }
467
468 public static com.liferay.document.library.kernel.model.DLFolderSoap moveFolder(
469 long folderId, long parentFolderId,
470 com.liferay.portal.kernel.service.ServiceContext serviceContext)
471 throws RemoteException {
472 try {
473 com.liferay.document.library.kernel.model.DLFolder returnValue = DLFolderServiceUtil.moveFolder(folderId,
474 parentFolderId, serviceContext);
475
476 return com.liferay.document.library.kernel.model.DLFolderSoap.toSoapModel(returnValue);
477 }
478 catch (Exception e) {
479 _log.error(e, e);
480
481 throw new RemoteException(e.getMessage());
482 }
483 }
484
485 public static com.liferay.portal.kernel.lock.Lock refreshFolderLock(
486 java.lang.String lockUuid, long companyId, long expirationTime)
487 throws RemoteException {
488 try {
489 com.liferay.portal.kernel.lock.Lock returnValue = DLFolderServiceUtil.refreshFolderLock(lockUuid,
490 companyId, expirationTime);
491
492 return returnValue;
493 }
494 catch (Exception e) {
495 _log.error(e, e);
496
497 throw new RemoteException(e.getMessage());
498 }
499 }
500
501 public static void unlockFolder(long groupId, long parentFolderId,
502 java.lang.String name, java.lang.String lockUuid)
503 throws RemoteException {
504 try {
505 DLFolderServiceUtil.unlockFolder(groupId, parentFolderId, name,
506 lockUuid);
507 }
508 catch (Exception e) {
509 _log.error(e, e);
510
511 throw new RemoteException(e.getMessage());
512 }
513 }
514
515 public static void unlockFolder(long folderId, java.lang.String lockUuid)
516 throws RemoteException {
517 try {
518 DLFolderServiceUtil.unlockFolder(folderId, lockUuid);
519 }
520 catch (Exception e) {
521 _log.error(e, e);
522
523 throw new RemoteException(e.getMessage());
524 }
525 }
526
527 public static com.liferay.document.library.kernel.model.DLFolderSoap updateFolder(
528 long folderId, long parentFolderId, java.lang.String name,
529 java.lang.String description, long defaultFileEntryTypeId,
530 Long[] fileEntryTypeIds, int restrictionType,
531 com.liferay.portal.kernel.service.ServiceContext serviceContext)
532 throws RemoteException {
533 try {
534 com.liferay.document.library.kernel.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
535 parentFolderId, name, description, defaultFileEntryTypeId,
536 ListUtil.toList(fileEntryTypeIds), restrictionType,
537 serviceContext);
538
539 return com.liferay.document.library.kernel.model.DLFolderSoap.toSoapModel(returnValue);
540 }
541 catch (Exception e) {
542 _log.error(e, e);
543
544 throw new RemoteException(e.getMessage());
545 }
546 }
547
548
553 @Deprecated
554 public static com.liferay.document.library.kernel.model.DLFolderSoap updateFolder(
555 long folderId, java.lang.String name, java.lang.String description,
556 long defaultFileEntryTypeId, Long[] fileEntryTypeIds,
557 boolean overrideFileEntryTypes,
558 com.liferay.portal.kernel.service.ServiceContext serviceContext)
559 throws RemoteException {
560 try {
561 com.liferay.document.library.kernel.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
562 name, description, defaultFileEntryTypeId,
563 ListUtil.toList(fileEntryTypeIds), overrideFileEntryTypes,
564 serviceContext);
565
566 return com.liferay.document.library.kernel.model.DLFolderSoap.toSoapModel(returnValue);
567 }
568 catch (Exception e) {
569 _log.error(e, e);
570
571 throw new RemoteException(e.getMessage());
572 }
573 }
574
575 public static com.liferay.document.library.kernel.model.DLFolderSoap updateFolder(
576 long folderId, java.lang.String name, java.lang.String description,
577 long defaultFileEntryTypeId, Long[] fileEntryTypeIds,
578 int restrictionType,
579 com.liferay.portal.kernel.service.ServiceContext serviceContext)
580 throws RemoteException {
581 try {
582 com.liferay.document.library.kernel.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
583 name, description, defaultFileEntryTypeId,
584 ListUtil.toList(fileEntryTypeIds), restrictionType,
585 serviceContext);
586
587 return com.liferay.document.library.kernel.model.DLFolderSoap.toSoapModel(returnValue);
588 }
589 catch (Exception e) {
590 _log.error(e, e);
591
592 throw new RemoteException(e.getMessage());
593 }
594 }
595
596 public static boolean verifyInheritableLock(long folderId,
597 java.lang.String lockUuid) throws RemoteException {
598 try {
599 boolean returnValue = DLFolderServiceUtil.verifyInheritableLock(folderId,
600 lockUuid);
601
602 return returnValue;
603 }
604 catch (Exception e) {
605 _log.error(e, e);
606
607 throw new RemoteException(e.getMessage());
608 }
609 }
610
611 private static Log _log = LogFactoryUtil.getLog(DLFolderServiceSoap.class);
612 }