001    /**
002     * Copyright (c) 2000-2012 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 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    /**
026     * <p>
027     * This class provides a SOAP utility for the
028     * {@link com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil} service utility. The
029     * static methods of this class calls the same methods of the service utility.
030     * However, the signatures are different because it is difficult for SOAP to
031     * support certain types.
032     * </p>
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       com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil
065     * @generated
066     */
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 long[] getFolderIds(long groupId, long folderId)
185                    throws RemoteException {
186                    try {
187                            long[] returnValue = DLFolderServiceUtil.getFolderIds(groupId,
188                                            folderId);
189    
190                            return returnValue;
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 folderId,
435                    java.lang.String lockUuid) throws RemoteException {
436                    try {
437                            DLFolderServiceUtil.unlockFolder(groupId, folderId, lockUuid);
438                    }
439                    catch (Exception e) {
440                            _log.error(e, e);
441    
442                            throw new RemoteException(e.getMessage());
443                    }
444            }
445    
446            public static void unlockFolder(long groupId, long parentFolderId,
447                    java.lang.String name, java.lang.String lockUuid)
448                    throws RemoteException {
449                    try {
450                            DLFolderServiceUtil.unlockFolder(groupId, parentFolderId, name,
451                                    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    }