001
014
015 package com.liferay.portlet.documentlibrary.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.documentlibrary.service.DLFolderServiceUtil;
022
023 import java.rmi.RemoteException;
024
025
067 public class DLFolderServiceSoap {
068 public static com.liferay.portlet.documentlibrary.model.DLFolderSoap addFolder(
069 long groupId, long repositoryId, boolean mountPoint,
070 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.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.addFolder(groupId,
076 repositoryId, mountPoint, parentFolderId, name,
077 description, serviceContext);
078
079 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
080 }
081 catch (Exception e) {
082 _log.error(e, e);
083
084 throw new RemoteException(e.getMessage());
085 }
086 }
087
088 public static void deleteFolder(long folderId) throws RemoteException {
089 try {
090 DLFolderServiceUtil.deleteFolder(folderId);
091 }
092 catch (Exception e) {
093 _log.error(e, e);
094
095 throw new RemoteException(e.getMessage());
096 }
097 }
098
099 public static void deleteFolder(long folderId, boolean includeTrashedEntries)
100 throws RemoteException {
101 try {
102 DLFolderServiceUtil.deleteFolder(folderId, includeTrashedEntries);
103 }
104 catch (Exception e) {
105 _log.error(e, e);
106
107 throw new RemoteException(e.getMessage());
108 }
109 }
110
111 public static void deleteFolder(long groupId, long parentFolderId,
112 java.lang.String name) throws RemoteException {
113 try {
114 DLFolderServiceUtil.deleteFolder(groupId, parentFolderId, name);
115 }
116 catch (Exception e) {
117 _log.error(e, e);
118
119 throw new RemoteException(e.getMessage());
120 }
121 }
122
123 public static int getFileEntriesAndFileShortcutsCount(long groupId,
124 long folderId, int status) throws RemoteException {
125 try {
126 int returnValue = DLFolderServiceUtil.getFileEntriesAndFileShortcutsCount(groupId,
127 folderId, status);
128
129 return returnValue;
130 }
131 catch (Exception e) {
132 _log.error(e, e);
133
134 throw new RemoteException(e.getMessage());
135 }
136 }
137
138 public static int getFileEntriesAndFileShortcutsCount(long groupId,
139 long folderId, int status, java.lang.String[] mimeTypes)
140 throws RemoteException {
141 try {
142 int returnValue = DLFolderServiceUtil.getFileEntriesAndFileShortcutsCount(groupId,
143 folderId, status, mimeTypes);
144
145 return returnValue;
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.documentlibrary.model.DLFolderSoap getFolder(
155 long folderId) throws RemoteException {
156 try {
157 com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(folderId);
158
159 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
160 }
161 catch (Exception e) {
162 _log.error(e, e);
163
164 throw new RemoteException(e.getMessage());
165 }
166 }
167
168 public static com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(
169 long groupId, long parentFolderId, java.lang.String name)
170 throws RemoteException {
171 try {
172 com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(groupId,
173 parentFolderId, name);
174
175 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
176 }
177 catch (Exception e) {
178 _log.error(e, e);
179
180 throw new RemoteException(e.getMessage());
181 }
182 }
183
184 public static java.lang.Long[] getFolderIds(long groupId, long folderId)
185 throws RemoteException {
186 try {
187 java.util.List<java.lang.Long> returnValue = DLFolderServiceUtil.getFolderIds(groupId,
188 folderId);
189
190 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
191 }
192 catch (Exception e) {
193 _log.error(e, e);
194
195 throw new RemoteException(e.getMessage());
196 }
197 }
198
199 public static com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getFolders(
200 long groupId, long parentFolderId, int status,
201 boolean includeMountfolders, int start, int end,
202 com.liferay.portal.kernel.util.OrderByComparator obc)
203 throws RemoteException {
204 try {
205 java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
206 DLFolderServiceUtil.getFolders(groupId, parentFolderId, status,
207 includeMountfolders, start, end, obc);
208
209 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.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.documentlibrary.model.DLFolderSoap[] getFolders(
219 long groupId, long parentFolderId, int start, int end,
220 com.liferay.portal.kernel.util.OrderByComparator obc)
221 throws RemoteException {
222 try {
223 java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
224 DLFolderServiceUtil.getFolders(groupId, parentFolderId, start,
225 end, obc);
226
227 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
228 }
229 catch (Exception e) {
230 _log.error(e, e);
231
232 throw new RemoteException(e.getMessage());
233 }
234 }
235
236 public static int getFoldersAndFileEntriesAndFileShortcuts(long groupId,
237 long folderId, int status, java.lang.String[] mimeTypes,
238 boolean includeMountFolders) throws RemoteException {
239 try {
240 int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcuts(groupId,
241 folderId, status, mimeTypes, includeMountFolders);
242
243 return 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 getFoldersAndFileEntriesAndFileShortcutsCount(
253 long groupId, long folderId, int status, boolean includeMountFolders)
254 throws RemoteException {
255 try {
256 int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
257 folderId, status, includeMountFolders);
258
259 return returnValue;
260 }
261 catch (Exception e) {
262 _log.error(e, e);
263
264 throw new RemoteException(e.getMessage());
265 }
266 }
267
268 public static int getFoldersAndFileEntriesAndFileShortcutsCount(
269 long groupId, long folderId, int status, java.lang.String[] mimeTypes,
270 boolean includeMountFolders) throws RemoteException {
271 try {
272 int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
273 folderId, status, mimeTypes, includeMountFolders);
274
275 return returnValue;
276 }
277 catch (Exception e) {
278 _log.error(e, e);
279
280 throw new RemoteException(e.getMessage());
281 }
282 }
283
284 public static int getFoldersCount(long groupId, long parentFolderId)
285 throws RemoteException {
286 try {
287 int returnValue = DLFolderServiceUtil.getFoldersCount(groupId,
288 parentFolderId);
289
290 return returnValue;
291 }
292 catch (Exception e) {
293 _log.error(e, e);
294
295 throw new RemoteException(e.getMessage());
296 }
297 }
298
299 public static int getFoldersCount(long groupId, long parentFolderId,
300 int status, boolean includeMountfolders) throws RemoteException {
301 try {
302 int returnValue = DLFolderServiceUtil.getFoldersCount(groupId,
303 parentFolderId, status, includeMountfolders);
304
305 return returnValue;
306 }
307 catch (Exception e) {
308 _log.error(e, e);
309
310 throw new RemoteException(e.getMessage());
311 }
312 }
313
314 public static com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getMountFolders(
315 long groupId, long parentFolderId, int start, int end,
316 com.liferay.portal.kernel.util.OrderByComparator obc)
317 throws RemoteException {
318 try {
319 java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
320 DLFolderServiceUtil.getMountFolders(groupId, parentFolderId,
321 start, end, obc);
322
323 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
324 }
325 catch (Exception e) {
326 _log.error(e, e);
327
328 throw new RemoteException(e.getMessage());
329 }
330 }
331
332 public static int getMountFoldersCount(long groupId, long parentFolderId)
333 throws RemoteException {
334 try {
335 int returnValue = DLFolderServiceUtil.getMountFoldersCount(groupId,
336 parentFolderId);
337
338 return returnValue;
339 }
340 catch (Exception e) {
341 _log.error(e, e);
342
343 throw new RemoteException(e.getMessage());
344 }
345 }
346
347 public static void getSubfolderIds(Long[] folderIds, long groupId,
348 long folderId) throws RemoteException {
349 try {
350 DLFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
351 groupId, folderId);
352 }
353 catch (Exception e) {
354 _log.error(e, e);
355
356 throw new RemoteException(e.getMessage());
357 }
358 }
359
360 public static java.lang.Long[] getSubfolderIds(long groupId, long folderId,
361 boolean recurse) throws RemoteException {
362 try {
363 java.util.List<java.lang.Long> returnValue = DLFolderServiceUtil.getSubfolderIds(groupId,
364 folderId, recurse);
365
366 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
367 }
368 catch (Exception e) {
369 _log.error(e, e);
370
371 throw new RemoteException(e.getMessage());
372 }
373 }
374
375 public static boolean hasFolderLock(long folderId)
376 throws RemoteException {
377 try {
378 boolean returnValue = DLFolderServiceUtil.hasFolderLock(folderId);
379
380 return returnValue;
381 }
382 catch (Exception e) {
383 _log.error(e, e);
384
385 throw new RemoteException(e.getMessage());
386 }
387 }
388
389 public static boolean hasInheritableLock(long folderId)
390 throws RemoteException {
391 try {
392 boolean returnValue = DLFolderServiceUtil.hasInheritableLock(folderId);
393
394 return returnValue;
395 }
396 catch (Exception e) {
397 _log.error(e, e);
398
399 throw new RemoteException(e.getMessage());
400 }
401 }
402
403 public static boolean isFolderLocked(long folderId)
404 throws RemoteException {
405 try {
406 boolean returnValue = DLFolderServiceUtil.isFolderLocked(folderId);
407
408 return returnValue;
409 }
410 catch (Exception e) {
411 _log.error(e, e);
412
413 throw new RemoteException(e.getMessage());
414 }
415 }
416
417 public static com.liferay.portlet.documentlibrary.model.DLFolderSoap moveFolder(
418 long folderId, long parentFolderId,
419 com.liferay.portal.service.ServiceContext serviceContext)
420 throws RemoteException {
421 try {
422 com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.moveFolder(folderId,
423 parentFolderId, serviceContext);
424
425 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
426 }
427 catch (Exception e) {
428 _log.error(e, e);
429
430 throw new RemoteException(e.getMessage());
431 }
432 }
433
434 public static void unlockFolder(long groupId, long parentFolderId,
435 java.lang.String name, java.lang.String lockUuid)
436 throws RemoteException {
437 try {
438 DLFolderServiceUtil.unlockFolder(groupId, parentFolderId, name,
439 lockUuid);
440 }
441 catch (Exception e) {
442 _log.error(e, e);
443
444 throw new RemoteException(e.getMessage());
445 }
446 }
447
448 public static void unlockFolder(long folderId, java.lang.String lockUuid)
449 throws RemoteException {
450 try {
451 DLFolderServiceUtil.unlockFolder(folderId, lockUuid);
452 }
453 catch (Exception e) {
454 _log.error(e, e);
455
456 throw new RemoteException(e.getMessage());
457 }
458 }
459
460 public static com.liferay.portlet.documentlibrary.model.DLFolderSoap updateFolder(
461 long folderId, java.lang.String name, java.lang.String description,
462 long defaultFileEntryTypeId, Long[] fileEntryTypeIds,
463 boolean overrideFileEntryTypes,
464 com.liferay.portal.service.ServiceContext serviceContext)
465 throws RemoteException {
466 try {
467 com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
468 name, description, defaultFileEntryTypeId,
469 ListUtil.toList(fileEntryTypeIds), overrideFileEntryTypes,
470 serviceContext);
471
472 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
473 }
474 catch (Exception e) {
475 _log.error(e, e);
476
477 throw new RemoteException(e.getMessage());
478 }
479 }
480
481 public static boolean verifyInheritableLock(long folderId,
482 java.lang.String lockUuid) throws RemoteException {
483 try {
484 boolean returnValue = DLFolderServiceUtil.verifyInheritableLock(folderId,
485 lockUuid);
486
487 return returnValue;
488 }
489 catch (Exception e) {
490 _log.error(e, e);
491
492 throw new RemoteException(e.getMessage());
493 }
494 }
495
496 private static Log _log = LogFactoryUtil.getLog(DLFolderServiceSoap.class);
497 }