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 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     * Provides the SOAP utility for the
027     * {@link com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil} service utility. The
028     * static methods of this class calls the same methods of the service utility.
029     * However, the signatures are different because it is difficult for SOAP to
030     * support certain types.
031     *
032     * <p>
033     * ServiceBuilder follows certain rules in translating the methods. For example,
034     * if the method in the service utility returns a {@link java.util.List}, that
035     * is translated to an array of {@link com.liferay.portlet.documentlibrary.model.DLFolderSoap}.
036     * If the method in the service utility returns a
037     * {@link com.liferay.portlet.documentlibrary.model.DLFolder}, that is translated to a
038     * {@link com.liferay.portlet.documentlibrary.model.DLFolderSoap}. Methods that SOAP cannot
039     * safely wire are skipped.
040     * </p>
041     *
042     * <p>
043     * The benefits of using the SOAP utility is that it is cross platform
044     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
045     * even Perl, to call the generated services. One drawback of SOAP is that it is
046     * slow because it needs to serialize all calls into a text format (XML).
047     * </p>
048     *
049     * <p>
050     * You can see a list of services at http://localhost:8080/api/axis. Set the
051     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
052     * security.
053     * </p>
054     *
055     * <p>
056     * The SOAP utility is only generated for remote services.
057     * </p>
058     *
059     * @author Brian Wing Shun Chan
060     * @see DLFolderServiceHttp
061     * @see com.liferay.portlet.documentlibrary.model.DLFolderSoap
062     * @see com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil
063     * @generated
064     */
065    public class DLFolderServiceSoap {
066            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap addFolder(
067                    long groupId, long repositoryId, boolean mountPoint,
068                    long parentFolderId, java.lang.String name,
069                    java.lang.String description,
070                    com.liferay.portal.service.ServiceContext serviceContext)
071                    throws RemoteException {
072                    try {
073                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.addFolder(groupId,
074                                            repositoryId, mountPoint, parentFolderId, name,
075                                            description, serviceContext);
076    
077                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
078                    }
079                    catch (Exception e) {
080                            _log.error(e, e);
081    
082                            throw new RemoteException(e.getMessage());
083                    }
084            }
085    
086            public static void deleteFolder(long folderId) throws RemoteException {
087                    try {
088                            DLFolderServiceUtil.deleteFolder(folderId);
089                    }
090                    catch (Exception e) {
091                            _log.error(e, e);
092    
093                            throw new RemoteException(e.getMessage());
094                    }
095            }
096    
097            public static void deleteFolder(long folderId, boolean includeTrashedEntries)
098                    throws RemoteException {
099                    try {
100                            DLFolderServiceUtil.deleteFolder(folderId, includeTrashedEntries);
101                    }
102                    catch (Exception e) {
103                            _log.error(e, e);
104    
105                            throw new RemoteException(e.getMessage());
106                    }
107            }
108    
109            public static void deleteFolder(long groupId, long parentFolderId,
110                    java.lang.String name) throws RemoteException {
111                    try {
112                            DLFolderServiceUtil.deleteFolder(groupId, parentFolderId, name);
113                    }
114                    catch (Exception e) {
115                            _log.error(e, e);
116    
117                            throw new RemoteException(e.getMessage());
118                    }
119            }
120    
121            public static int getFileEntriesAndFileShortcutsCount(long groupId,
122                    long folderId, int status) throws RemoteException {
123                    try {
124                            int returnValue = DLFolderServiceUtil.getFileEntriesAndFileShortcutsCount(groupId,
125                                            folderId, status);
126    
127                            return returnValue;
128                    }
129                    catch (Exception e) {
130                            _log.error(e, e);
131    
132                            throw new RemoteException(e.getMessage());
133                    }
134            }
135    
136            public static int getFileEntriesAndFileShortcutsCount(long groupId,
137                    long folderId, int status, java.lang.String[] mimeTypes)
138                    throws RemoteException {
139                    try {
140                            int returnValue = DLFolderServiceUtil.getFileEntriesAndFileShortcutsCount(groupId,
141                                            folderId, status, mimeTypes);
142    
143                            return returnValue;
144                    }
145                    catch (Exception e) {
146                            _log.error(e, e);
147    
148                            throw new RemoteException(e.getMessage());
149                    }
150            }
151    
152            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(
153                    long folderId) throws RemoteException {
154                    try {
155                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(folderId);
156    
157                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
158                    }
159                    catch (Exception e) {
160                            _log.error(e, e);
161    
162                            throw new RemoteException(e.getMessage());
163                    }
164            }
165    
166            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(
167                    long groupId, long parentFolderId, java.lang.String name)
168                    throws RemoteException {
169                    try {
170                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(groupId,
171                                            parentFolderId, name);
172    
173                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
174                    }
175                    catch (Exception e) {
176                            _log.error(e, e);
177    
178                            throw new RemoteException(e.getMessage());
179                    }
180            }
181    
182            public static java.lang.Long[] getFolderIds(long groupId, long folderId)
183                    throws RemoteException {
184                    try {
185                            java.util.List<java.lang.Long> returnValue = DLFolderServiceUtil.getFolderIds(groupId,
186                                            folderId);
187    
188                            return returnValue.toArray(new java.lang.Long[returnValue.size()]);
189                    }
190                    catch (Exception e) {
191                            _log.error(e, e);
192    
193                            throw new RemoteException(e.getMessage());
194                    }
195            }
196    
197            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getFolders(
198                    long groupId, long parentFolderId, int status,
199                    boolean includeMountfolders, int start, int end,
200                    com.liferay.portal.kernel.util.OrderByComparator obc)
201                    throws RemoteException {
202                    try {
203                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
204                                    DLFolderServiceUtil.getFolders(groupId, parentFolderId, status,
205                                            includeMountfolders, start, end, obc);
206    
207                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
208                    }
209                    catch (Exception e) {
210                            _log.error(e, e);
211    
212                            throw new RemoteException(e.getMessage());
213                    }
214            }
215    
216            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getFolders(
217                    long groupId, long parentFolderId, int start, int end,
218                    com.liferay.portal.kernel.util.OrderByComparator obc)
219                    throws RemoteException {
220                    try {
221                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
222                                    DLFolderServiceUtil.getFolders(groupId, parentFolderId, start,
223                                            end, obc);
224    
225                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
226                    }
227                    catch (Exception e) {
228                            _log.error(e, e);
229    
230                            throw new RemoteException(e.getMessage());
231                    }
232            }
233    
234            public static int getFoldersAndFileEntriesAndFileShortcuts(long groupId,
235                    long folderId, int status, java.lang.String[] mimeTypes,
236                    boolean includeMountFolders) throws RemoteException {
237                    try {
238                            int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcuts(groupId,
239                                            folderId, status, mimeTypes, includeMountFolders);
240    
241                            return returnValue;
242                    }
243                    catch (Exception e) {
244                            _log.error(e, e);
245    
246                            throw new RemoteException(e.getMessage());
247                    }
248            }
249    
250            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
251                    long groupId, long folderId, int status, boolean includeMountFolders)
252                    throws RemoteException {
253                    try {
254                            int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
255                                            folderId, status, includeMountFolders);
256    
257                            return returnValue;
258                    }
259                    catch (Exception e) {
260                            _log.error(e, e);
261    
262                            throw new RemoteException(e.getMessage());
263                    }
264            }
265    
266            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
267                    long groupId, long folderId, int status, java.lang.String[] mimeTypes,
268                    boolean includeMountFolders) throws RemoteException {
269                    try {
270                            int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
271                                            folderId, status, mimeTypes, includeMountFolders);
272    
273                            return returnValue;
274                    }
275                    catch (Exception e) {
276                            _log.error(e, e);
277    
278                            throw new RemoteException(e.getMessage());
279                    }
280            }
281    
282            public static int getFoldersCount(long groupId, long parentFolderId)
283                    throws RemoteException {
284                    try {
285                            int returnValue = DLFolderServiceUtil.getFoldersCount(groupId,
286                                            parentFolderId);
287    
288                            return returnValue;
289                    }
290                    catch (Exception e) {
291                            _log.error(e, e);
292    
293                            throw new RemoteException(e.getMessage());
294                    }
295            }
296    
297            public static int getFoldersCount(long groupId, long parentFolderId,
298                    int status, boolean includeMountfolders) throws RemoteException {
299                    try {
300                            int returnValue = DLFolderServiceUtil.getFoldersCount(groupId,
301                                            parentFolderId, status, includeMountfolders);
302    
303                            return returnValue;
304                    }
305                    catch (Exception e) {
306                            _log.error(e, e);
307    
308                            throw new RemoteException(e.getMessage());
309                    }
310            }
311    
312            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getMountFolders(
313                    long groupId, long parentFolderId, int start, int end,
314                    com.liferay.portal.kernel.util.OrderByComparator obc)
315                    throws RemoteException {
316                    try {
317                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
318                                    DLFolderServiceUtil.getMountFolders(groupId, parentFolderId,
319                                            start, end, obc);
320    
321                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
322                    }
323                    catch (Exception e) {
324                            _log.error(e, e);
325    
326                            throw new RemoteException(e.getMessage());
327                    }
328            }
329    
330            public static int getMountFoldersCount(long groupId, long parentFolderId)
331                    throws RemoteException {
332                    try {
333                            int returnValue = DLFolderServiceUtil.getMountFoldersCount(groupId,
334                                            parentFolderId);
335    
336                            return returnValue;
337                    }
338                    catch (Exception e) {
339                            _log.error(e, e);
340    
341                            throw new RemoteException(e.getMessage());
342                    }
343            }
344    
345            public static void getSubfolderIds(Long[] folderIds, long groupId,
346                    long folderId) throws RemoteException {
347                    try {
348                            DLFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
349                                    groupId, folderId);
350                    }
351                    catch (Exception e) {
352                            _log.error(e, e);
353    
354                            throw new RemoteException(e.getMessage());
355                    }
356            }
357    
358            public static java.lang.Long[] getSubfolderIds(long groupId, long folderId,
359                    boolean recurse) throws RemoteException {
360                    try {
361                            java.util.List<java.lang.Long> returnValue = DLFolderServiceUtil.getSubfolderIds(groupId,
362                                            folderId, recurse);
363    
364                            return returnValue.toArray(new java.lang.Long[returnValue.size()]);
365                    }
366                    catch (Exception e) {
367                            _log.error(e, e);
368    
369                            throw new RemoteException(e.getMessage());
370                    }
371            }
372    
373            public static boolean hasFolderLock(long folderId)
374                    throws RemoteException {
375                    try {
376                            boolean returnValue = DLFolderServiceUtil.hasFolderLock(folderId);
377    
378                            return returnValue;
379                    }
380                    catch (Exception e) {
381                            _log.error(e, e);
382    
383                            throw new RemoteException(e.getMessage());
384                    }
385            }
386    
387            public static boolean hasInheritableLock(long folderId)
388                    throws RemoteException {
389                    try {
390                            boolean returnValue = DLFolderServiceUtil.hasInheritableLock(folderId);
391    
392                            return returnValue;
393                    }
394                    catch (Exception e) {
395                            _log.error(e, e);
396    
397                            throw new RemoteException(e.getMessage());
398                    }
399            }
400    
401            public static boolean isFolderLocked(long folderId)
402                    throws RemoteException {
403                    try {
404                            boolean returnValue = DLFolderServiceUtil.isFolderLocked(folderId);
405    
406                            return returnValue;
407                    }
408                    catch (Exception e) {
409                            _log.error(e, e);
410    
411                            throw new RemoteException(e.getMessage());
412                    }
413            }
414    
415            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap moveFolder(
416                    long folderId, long parentFolderId,
417                    com.liferay.portal.service.ServiceContext serviceContext)
418                    throws RemoteException {
419                    try {
420                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.moveFolder(folderId,
421                                            parentFolderId, serviceContext);
422    
423                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
424                    }
425                    catch (Exception e) {
426                            _log.error(e, e);
427    
428                            throw new RemoteException(e.getMessage());
429                    }
430            }
431    
432            public static void unlockFolder(long groupId, long parentFolderId,
433                    java.lang.String name, java.lang.String lockUuid)
434                    throws RemoteException {
435                    try {
436                            DLFolderServiceUtil.unlockFolder(groupId, parentFolderId, name,
437                                    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 folderId, java.lang.String lockUuid)
447                    throws RemoteException {
448                    try {
449                            DLFolderServiceUtil.unlockFolder(folderId, lockUuid);
450                    }
451                    catch (Exception e) {
452                            _log.error(e, e);
453    
454                            throw new RemoteException(e.getMessage());
455                    }
456            }
457    
458            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap updateFolder(
459                    long folderId, java.lang.String name, java.lang.String description,
460                    long defaultFileEntryTypeId, Long[] fileEntryTypeIds,
461                    boolean overrideFileEntryTypes,
462                    com.liferay.portal.service.ServiceContext serviceContext)
463                    throws RemoteException {
464                    try {
465                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
466                                            name, description, defaultFileEntryTypeId,
467                                            ListUtil.toList(fileEntryTypeIds), overrideFileEntryTypes,
468                                            serviceContext);
469    
470                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
471                    }
472                    catch (Exception e) {
473                            _log.error(e, e);
474    
475                            throw new RemoteException(e.getMessage());
476                    }
477            }
478    
479            public static boolean verifyInheritableLock(long folderId,
480                    java.lang.String lockUuid) throws RemoteException {
481                    try {
482                            boolean returnValue = DLFolderServiceUtil.verifyInheritableLock(folderId,
483                                            lockUuid);
484    
485                            return returnValue;
486                    }
487                    catch (Exception e) {
488                            _log.error(e, e);
489    
490                            throw new RemoteException(e.getMessage());
491                    }
492            }
493    
494            private static Log _log = LogFactoryUtil.getLog(DLFolderServiceSoap.class);
495    }