001
014
015 package com.liferay.portlet.documentlibrary.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.documentlibrary.service.DLFolderServiceUtil;
024
025 import java.rmi.RemoteException;
026
027
067 @ProviderType
068 public class DLFolderServiceSoap {
069 public static com.liferay.portlet.documentlibrary.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.service.ServiceContext serviceContext)
074 throws RemoteException {
075 try {
076 com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.addFolder(groupId,
077 repositoryId, mountPoint, parentFolderId, name,
078 description, serviceContext);
079
080 return com.liferay.portlet.documentlibrary.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.portlet.documentlibrary.model.DLFolderSoap getFolder(
156 long folderId) throws RemoteException {
157 try {
158 com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(folderId);
159
160 return com.liferay.portlet.documentlibrary.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.portlet.documentlibrary.model.DLFolderSoap getFolder(
170 long groupId, long parentFolderId, java.lang.String name)
171 throws RemoteException {
172 try {
173 com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(groupId,
174 parentFolderId, name);
175
176 return com.liferay.portlet.documentlibrary.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.portlet.documentlibrary.model.DLFolderSoap[] getFolders(
201 long groupId, long parentFolderId, int status,
202 boolean includeMountfolders, int start, int end,
203 com.liferay.portal.kernel.util.OrderByComparator obc)
204 throws RemoteException {
205 try {
206 java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
207 DLFolderServiceUtil.getFolders(groupId, parentFolderId, status,
208 includeMountfolders, start, end, obc);
209
210 return com.liferay.portlet.documentlibrary.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.portlet.documentlibrary.model.DLFolderSoap[] getFolders(
220 long groupId, long parentFolderId, int start, int end,
221 com.liferay.portal.kernel.util.OrderByComparator obc)
222 throws RemoteException {
223 try {
224 java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
225 DLFolderServiceUtil.getFolders(groupId, parentFolderId, start,
226 end, obc);
227
228 return com.liferay.portlet.documentlibrary.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 getFoldersCount(long groupId, long parentFolderId)
270 throws RemoteException {
271 try {
272 int returnValue = DLFolderServiceUtil.getFoldersCount(groupId,
273 parentFolderId);
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 int status, boolean includeMountfolders) throws RemoteException {
286 try {
287 int returnValue = DLFolderServiceUtil.getFoldersCount(groupId,
288 parentFolderId, status, includeMountfolders);
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 com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getMountFolders(
300 long groupId, long parentFolderId, int start, int end,
301 com.liferay.portal.kernel.util.OrderByComparator obc)
302 throws RemoteException {
303 try {
304 java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
305 DLFolderServiceUtil.getMountFolders(groupId, parentFolderId,
306 start, end, obc);
307
308 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
309 }
310 catch (Exception e) {
311 _log.error(e, e);
312
313 throw new RemoteException(e.getMessage());
314 }
315 }
316
317 public static int getMountFoldersCount(long groupId, long parentFolderId)
318 throws RemoteException {
319 try {
320 int returnValue = DLFolderServiceUtil.getMountFoldersCount(groupId,
321 parentFolderId);
322
323 return returnValue;
324 }
325 catch (Exception e) {
326 _log.error(e, e);
327
328 throw new RemoteException(e.getMessage());
329 }
330 }
331
332
336 @Deprecated
337 public static void getSubfolderIds(Long[] folderIds, long groupId,
338 long folderId) throws RemoteException {
339 try {
340 DLFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
341 groupId, folderId);
342 }
343 catch (Exception e) {
344 _log.error(e, e);
345
346 throw new RemoteException(e.getMessage());
347 }
348 }
349
350 public static void getSubfolderIds(Long[] folderIds, long groupId,
351 long folderId, boolean recurse) throws RemoteException {
352 try {
353 DLFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
354 groupId, folderId, recurse);
355 }
356 catch (Exception e) {
357 _log.error(e, e);
358
359 throw new RemoteException(e.getMessage());
360 }
361 }
362
363 public static java.lang.Long[] getSubfolderIds(long groupId, long folderId,
364 boolean recurse) throws RemoteException {
365 try {
366 java.util.List<java.lang.Long> returnValue = DLFolderServiceUtil.getSubfolderIds(groupId,
367 folderId, recurse);
368
369 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
370 }
371 catch (Exception e) {
372 _log.error(e, e);
373
374 throw new RemoteException(e.getMessage());
375 }
376 }
377
378 public static boolean hasFolderLock(long folderId)
379 throws RemoteException {
380 try {
381 boolean returnValue = DLFolderServiceUtil.hasFolderLock(folderId);
382
383 return returnValue;
384 }
385 catch (Exception e) {
386 _log.error(e, e);
387
388 throw new RemoteException(e.getMessage());
389 }
390 }
391
392 public static boolean hasInheritableLock(long folderId)
393 throws RemoteException {
394 try {
395 boolean returnValue = DLFolderServiceUtil.hasInheritableLock(folderId);
396
397 return returnValue;
398 }
399 catch (Exception e) {
400 _log.error(e, e);
401
402 throw new RemoteException(e.getMessage());
403 }
404 }
405
406 public static boolean isFolderLocked(long folderId)
407 throws RemoteException {
408 try {
409 boolean returnValue = DLFolderServiceUtil.isFolderLocked(folderId);
410
411 return returnValue;
412 }
413 catch (Exception e) {
414 _log.error(e, e);
415
416 throw new RemoteException(e.getMessage());
417 }
418 }
419
420 public static com.liferay.portlet.documentlibrary.model.DLFolderSoap moveFolder(
421 long folderId, long parentFolderId,
422 com.liferay.portal.service.ServiceContext serviceContext)
423 throws RemoteException {
424 try {
425 com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.moveFolder(folderId,
426 parentFolderId, serviceContext);
427
428 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
429 }
430 catch (Exception e) {
431 _log.error(e, e);
432
433 throw new RemoteException(e.getMessage());
434 }
435 }
436
437 public static void unlockFolder(long groupId, long parentFolderId,
438 java.lang.String name, java.lang.String lockUuid)
439 throws RemoteException {
440 try {
441 DLFolderServiceUtil.unlockFolder(groupId, parentFolderId, name,
442 lockUuid);
443 }
444 catch (Exception e) {
445 _log.error(e, e);
446
447 throw new RemoteException(e.getMessage());
448 }
449 }
450
451 public static void unlockFolder(long folderId, java.lang.String lockUuid)
452 throws RemoteException {
453 try {
454 DLFolderServiceUtil.unlockFolder(folderId, lockUuid);
455 }
456 catch (Exception e) {
457 _log.error(e, e);
458
459 throw new RemoteException(e.getMessage());
460 }
461 }
462
463 public static com.liferay.portlet.documentlibrary.model.DLFolderSoap updateFolder(
464 long folderId, java.lang.String name, java.lang.String description,
465 long defaultFileEntryTypeId, Long[] fileEntryTypeIds,
466 boolean overrideFileEntryTypes,
467 com.liferay.portal.service.ServiceContext serviceContext)
468 throws RemoteException {
469 try {
470 com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
471 name, description, defaultFileEntryTypeId,
472 ListUtil.toList(fileEntryTypeIds), overrideFileEntryTypes,
473 serviceContext);
474
475 return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
476 }
477 catch (Exception e) {
478 _log.error(e, e);
479
480 throw new RemoteException(e.getMessage());
481 }
482 }
483
484 public static boolean verifyInheritableLock(long folderId,
485 java.lang.String lockUuid) throws RemoteException {
486 try {
487 boolean returnValue = DLFolderServiceUtil.verifyInheritableLock(folderId,
488 lockUuid);
489
490 return returnValue;
491 }
492 catch (Exception e) {
493 _log.error(e, e);
494
495 throw new RemoteException(e.getMessage());
496 }
497 }
498
499 private static Log _log = LogFactoryUtil.getLog(DLFolderServiceSoap.class);
500 }