001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
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    /**
028     * Provides the SOAP utility for the
029     * {@link DLFolderServiceUtil} service utility. The
030     * static methods of this class calls the same methods of the service utility.
031     * However, the signatures are different because it is difficult for SOAP to
032     * support certain types.
033     *
034     * <p>
035     * ServiceBuilder follows certain rules in translating the methods. For example,
036     * if the method in the service utility returns a {@link java.util.List}, that
037     * is translated to an array of {@link com.liferay.portlet.documentlibrary.model.DLFolderSoap}.
038     * If the method in the service utility returns a
039     * {@link com.liferay.portlet.documentlibrary.model.DLFolder}, that is translated to a
040     * {@link com.liferay.portlet.documentlibrary.model.DLFolderSoap}. Methods that SOAP cannot
041     * safely wire are skipped.
042     * </p>
043     *
044     * <p>
045     * The benefits of using the SOAP utility is that it is cross platform
046     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
047     * even Perl, to call the generated services. One drawback of SOAP is that it is
048     * slow because it needs to serialize all calls into a text format (XML).
049     * </p>
050     *
051     * <p>
052     * You can see a list of services at http://localhost:8080/api/axis. Set the
053     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
054     * security.
055     * </p>
056     *
057     * <p>
058     * The SOAP utility is only generated for remote services.
059     * </p>
060     *
061     * @author Brian Wing Shun Chan
062     * @see DLFolderServiceHttp
063     * @see com.liferay.portlet.documentlibrary.model.DLFolderSoap
064     * @see DLFolderServiceUtil
065     * @generated
066     */
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<com.liferay.portlet.documentlibrary.model.DLFolder> 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<com.liferay.portlet.documentlibrary.model.DLFolder> 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<com.liferay.portlet.documentlibrary.model.DLFolder> 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            /**
333            * @deprecated As of 7.0.0, replaced by {@link #getSubfolderIds(List, long,
334            long, boolean)}
335            */
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.portal.kernel.lock.Lock lockFolder(long folderId)
421                    throws RemoteException {
422                    try {
423                            com.liferay.portal.kernel.lock.Lock returnValue = DLFolderServiceUtil.lockFolder(folderId);
424    
425                            return returnValue;
426                    }
427                    catch (Exception e) {
428                            _log.error(e, e);
429    
430                            throw new RemoteException(e.getMessage());
431                    }
432            }
433    
434            public static com.liferay.portal.kernel.lock.Lock lockFolder(
435                    long folderId, java.lang.String owner, boolean inheritable,
436                    long expirationTime) throws RemoteException {
437                    try {
438                            com.liferay.portal.kernel.lock.Lock returnValue = DLFolderServiceUtil.lockFolder(folderId,
439                                            owner, inheritable, expirationTime);
440    
441                            return returnValue;
442                    }
443                    catch (Exception e) {
444                            _log.error(e, e);
445    
446                            throw new RemoteException(e.getMessage());
447                    }
448            }
449    
450            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap moveFolder(
451                    long folderId, long parentFolderId,
452                    com.liferay.portal.service.ServiceContext serviceContext)
453                    throws RemoteException {
454                    try {
455                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.moveFolder(folderId,
456                                            parentFolderId, serviceContext);
457    
458                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
459                    }
460                    catch (Exception e) {
461                            _log.error(e, e);
462    
463                            throw new RemoteException(e.getMessage());
464                    }
465            }
466    
467            public static com.liferay.portal.kernel.lock.Lock refreshFolderLock(
468                    java.lang.String lockUuid, long companyId, long expirationTime)
469                    throws RemoteException {
470                    try {
471                            com.liferay.portal.kernel.lock.Lock returnValue = DLFolderServiceUtil.refreshFolderLock(lockUuid,
472                                            companyId, expirationTime);
473    
474                            return returnValue;
475                    }
476                    catch (Exception e) {
477                            _log.error(e, e);
478    
479                            throw new RemoteException(e.getMessage());
480                    }
481            }
482    
483            public static void unlockFolder(long groupId, long parentFolderId,
484                    java.lang.String name, java.lang.String lockUuid)
485                    throws RemoteException {
486                    try {
487                            DLFolderServiceUtil.unlockFolder(groupId, parentFolderId, name,
488                                    lockUuid);
489                    }
490                    catch (Exception e) {
491                            _log.error(e, e);
492    
493                            throw new RemoteException(e.getMessage());
494                    }
495            }
496    
497            public static void unlockFolder(long folderId, java.lang.String lockUuid)
498                    throws RemoteException {
499                    try {
500                            DLFolderServiceUtil.unlockFolder(folderId, lockUuid);
501                    }
502                    catch (Exception e) {
503                            _log.error(e, e);
504    
505                            throw new RemoteException(e.getMessage());
506                    }
507            }
508    
509            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap updateFolder(
510                    long folderId, long parentFolderId, java.lang.String name,
511                    java.lang.String description, long defaultFileEntryTypeId,
512                    Long[] fileEntryTypeIds, int restrictionType,
513                    com.liferay.portal.service.ServiceContext serviceContext)
514                    throws RemoteException {
515                    try {
516                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
517                                            parentFolderId, name, description, defaultFileEntryTypeId,
518                                            ListUtil.toList(fileEntryTypeIds), restrictionType,
519                                            serviceContext);
520    
521                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
522                    }
523                    catch (Exception e) {
524                            _log.error(e, e);
525    
526                            throw new RemoteException(e.getMessage());
527                    }
528            }
529    
530            /**
531            * @deprecated As of 7.0.0, replaced by more general {@link
532            #updateFolder(long, String, String, long, List, int,
533            ServiceContext)}
534            */
535            @Deprecated
536            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap updateFolder(
537                    long folderId, java.lang.String name, java.lang.String description,
538                    long defaultFileEntryTypeId, Long[] fileEntryTypeIds,
539                    boolean overrideFileEntryTypes,
540                    com.liferay.portal.service.ServiceContext serviceContext)
541                    throws RemoteException {
542                    try {
543                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
544                                            name, description, defaultFileEntryTypeId,
545                                            ListUtil.toList(fileEntryTypeIds), overrideFileEntryTypes,
546                                            serviceContext);
547    
548                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
549                    }
550                    catch (Exception e) {
551                            _log.error(e, e);
552    
553                            throw new RemoteException(e.getMessage());
554                    }
555            }
556    
557            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap updateFolder(
558                    long folderId, java.lang.String name, java.lang.String description,
559                    long defaultFileEntryTypeId, Long[] fileEntryTypeIds,
560                    int restrictionType,
561                    com.liferay.portal.service.ServiceContext serviceContext)
562                    throws RemoteException {
563                    try {
564                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
565                                            name, description, defaultFileEntryTypeId,
566                                            ListUtil.toList(fileEntryTypeIds), restrictionType,
567                                            serviceContext);
568    
569                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
570                    }
571                    catch (Exception e) {
572                            _log.error(e, e);
573    
574                            throw new RemoteException(e.getMessage());
575                    }
576            }
577    
578            public static boolean verifyInheritableLock(long folderId,
579                    java.lang.String lockUuid) throws RemoteException {
580                    try {
581                            boolean returnValue = DLFolderServiceUtil.verifyInheritableLock(folderId,
582                                            lockUuid);
583    
584                            return returnValue;
585                    }
586                    catch (Exception e) {
587                            _log.error(e, e);
588    
589                            throw new RemoteException(e.getMessage());
590                    }
591            }
592    
593            private static Log _log = LogFactoryUtil.getLog(DLFolderServiceSoap.class);
594    }