001    /**
002     * Copyright (c) 2000-2013 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 com.liferay.portlet.documentlibrary.service.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 com.liferay.portlet.documentlibrary.service.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 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            public static void getSubfolderIds(Long[] folderIds, long groupId,
333                    long folderId) throws RemoteException {
334                    try {
335                            DLFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
336                                    groupId, folderId);
337                    }
338                    catch (Exception e) {
339                            _log.error(e, e);
340    
341                            throw new RemoteException(e.getMessage());
342                    }
343            }
344    
345            public static java.lang.Long[] getSubfolderIds(long groupId, long folderId,
346                    boolean recurse) throws RemoteException {
347                    try {
348                            java.util.List<java.lang.Long> returnValue = DLFolderServiceUtil.getSubfolderIds(groupId,
349                                            folderId, recurse);
350    
351                            return returnValue.toArray(new java.lang.Long[returnValue.size()]);
352                    }
353                    catch (Exception e) {
354                            _log.error(e, e);
355    
356                            throw new RemoteException(e.getMessage());
357                    }
358            }
359    
360            public static boolean hasFolderLock(long folderId)
361                    throws RemoteException {
362                    try {
363                            boolean returnValue = DLFolderServiceUtil.hasFolderLock(folderId);
364    
365                            return returnValue;
366                    }
367                    catch (Exception e) {
368                            _log.error(e, e);
369    
370                            throw new RemoteException(e.getMessage());
371                    }
372            }
373    
374            public static boolean hasInheritableLock(long folderId)
375                    throws RemoteException {
376                    try {
377                            boolean returnValue = DLFolderServiceUtil.hasInheritableLock(folderId);
378    
379                            return returnValue;
380                    }
381                    catch (Exception e) {
382                            _log.error(e, e);
383    
384                            throw new RemoteException(e.getMessage());
385                    }
386            }
387    
388            public static boolean isFolderLocked(long folderId)
389                    throws RemoteException {
390                    try {
391                            boolean returnValue = DLFolderServiceUtil.isFolderLocked(folderId);
392    
393                            return returnValue;
394                    }
395                    catch (Exception e) {
396                            _log.error(e, e);
397    
398                            throw new RemoteException(e.getMessage());
399                    }
400            }
401    
402            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap moveFolder(
403                    long folderId, long parentFolderId,
404                    com.liferay.portal.service.ServiceContext serviceContext)
405                    throws RemoteException {
406                    try {
407                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.moveFolder(folderId,
408                                            parentFolderId, serviceContext);
409    
410                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
411                    }
412                    catch (Exception e) {
413                            _log.error(e, e);
414    
415                            throw new RemoteException(e.getMessage());
416                    }
417            }
418    
419            public static void unlockFolder(long groupId, long parentFolderId,
420                    java.lang.String name, java.lang.String lockUuid)
421                    throws RemoteException {
422                    try {
423                            DLFolderServiceUtil.unlockFolder(groupId, parentFolderId, name,
424                                    lockUuid);
425                    }
426                    catch (Exception e) {
427                            _log.error(e, e);
428    
429                            throw new RemoteException(e.getMessage());
430                    }
431            }
432    
433            public static void unlockFolder(long folderId, java.lang.String lockUuid)
434                    throws RemoteException {
435                    try {
436                            DLFolderServiceUtil.unlockFolder(folderId, lockUuid);
437                    }
438                    catch (Exception e) {
439                            _log.error(e, e);
440    
441                            throw new RemoteException(e.getMessage());
442                    }
443            }
444    
445            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap updateFolder(
446                    long folderId, java.lang.String name, java.lang.String description,
447                    long defaultFileEntryTypeId, Long[] fileEntryTypeIds,
448                    boolean overrideFileEntryTypes,
449                    com.liferay.portal.service.ServiceContext serviceContext)
450                    throws RemoteException {
451                    try {
452                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
453                                            name, description, defaultFileEntryTypeId,
454                                            ListUtil.toList(fileEntryTypeIds), overrideFileEntryTypes,
455                                            serviceContext);
456    
457                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
458                    }
459                    catch (Exception e) {
460                            _log.error(e, e);
461    
462                            throw new RemoteException(e.getMessage());
463                    }
464            }
465    
466            public static boolean verifyInheritableLock(long folderId,
467                    java.lang.String lockUuid) throws RemoteException {
468                    try {
469                            boolean returnValue = DLFolderServiceUtil.verifyInheritableLock(folderId,
470                                            lockUuid);
471    
472                            return returnValue;
473                    }
474                    catch (Exception e) {
475                            _log.error(e, e);
476    
477                            throw new RemoteException(e.getMessage());
478                    }
479            }
480    
481            private static Log _log = LogFactoryUtil.getLog(DLFolderServiceSoap.class);
482    }