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     * <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
053     * http://localhost:8080/api/secure/axis. Set the property
054     * <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
055     * security.
056     * </p>
057     *
058     * <p>
059     * The SOAP utility is only generated for remote services.
060     * </p>
061     *
062     * @author    Brian Wing Shun Chan
063     * @see       DLFolderServiceHttp
064     * @see       com.liferay.portlet.documentlibrary.model.DLFolderSoap
065     * @see       com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil
066     * @generated
067     */
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 groupId, long parentFolderId,
101                    java.lang.String name) throws RemoteException {
102                    try {
103                            DLFolderServiceUtil.deleteFolder(groupId, parentFolderId, name);
104                    }
105                    catch (Exception e) {
106                            _log.error(e, e);
107    
108                            throw new RemoteException(e.getMessage());
109                    }
110            }
111    
112            public static int getFileEntriesAndFileShortcutsCount(long groupId,
113                    long folderId, int status) throws RemoteException {
114                    try {
115                            int returnValue = DLFolderServiceUtil.getFileEntriesAndFileShortcutsCount(groupId,
116                                            folderId, status);
117    
118                            return returnValue;
119                    }
120                    catch (Exception e) {
121                            _log.error(e, e);
122    
123                            throw new RemoteException(e.getMessage());
124                    }
125            }
126    
127            public static int getFileEntriesAndFileShortcutsCount(long groupId,
128                    long folderId, int status, java.lang.String[] mimeTypes)
129                    throws RemoteException {
130                    try {
131                            int returnValue = DLFolderServiceUtil.getFileEntriesAndFileShortcutsCount(groupId,
132                                            folderId, status, mimeTypes);
133    
134                            return returnValue;
135                    }
136                    catch (Exception e) {
137                            _log.error(e, e);
138    
139                            throw new RemoteException(e.getMessage());
140                    }
141            }
142    
143            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(
144                    long folderId) throws RemoteException {
145                    try {
146                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(folderId);
147    
148                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
149                    }
150                    catch (Exception e) {
151                            _log.error(e, e);
152    
153                            throw new RemoteException(e.getMessage());
154                    }
155            }
156    
157            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(
158                    long groupId, long parentFolderId, java.lang.String name)
159                    throws RemoteException {
160                    try {
161                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(groupId,
162                                            parentFolderId, name);
163    
164                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
165                    }
166                    catch (Exception e) {
167                            _log.error(e, e);
168    
169                            throw new RemoteException(e.getMessage());
170                    }
171            }
172    
173            public static long[] getFolderIds(long groupId, long folderId)
174                    throws RemoteException {
175                    try {
176                            long[] returnValue = DLFolderServiceUtil.getFolderIds(groupId,
177                                            folderId);
178    
179                            return returnValue;
180                    }
181                    catch (Exception e) {
182                            _log.error(e, e);
183    
184                            throw new RemoteException(e.getMessage());
185                    }
186            }
187    
188            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getFolders(
189                    long groupId, long parentFolderId, boolean includeMountfolders,
190                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
191                    throws RemoteException {
192                    try {
193                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
194                                    DLFolderServiceUtil.getFolders(groupId, parentFolderId,
195                                            includeMountfolders, start, end, obc);
196    
197                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
198                    }
199                    catch (Exception e) {
200                            _log.error(e, e);
201    
202                            throw new RemoteException(e.getMessage());
203                    }
204            }
205    
206            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getFolders(
207                    long groupId, long parentFolderId, int start, int end,
208                    com.liferay.portal.kernel.util.OrderByComparator obc)
209                    throws RemoteException {
210                    try {
211                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
212                                    DLFolderServiceUtil.getFolders(groupId, parentFolderId, start,
213                                            end, obc);
214    
215                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
216                    }
217                    catch (Exception e) {
218                            _log.error(e, e);
219    
220                            throw new RemoteException(e.getMessage());
221                    }
222            }
223    
224            public static int getFoldersAndFileEntriesAndFileShortcuts(long groupId,
225                    long folderId, int status, java.lang.String[] mimeTypes,
226                    boolean includeMountFolders) throws RemoteException {
227                    try {
228                            int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcuts(groupId,
229                                            folderId, status, mimeTypes, includeMountFolders);
230    
231                            return returnValue;
232                    }
233                    catch (Exception e) {
234                            _log.error(e, e);
235    
236                            throw new RemoteException(e.getMessage());
237                    }
238            }
239    
240            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
241                    long groupId, long folderId, int status, boolean includeMountFolders)
242                    throws RemoteException {
243                    try {
244                            int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
245                                            folderId, status, includeMountFolders);
246    
247                            return returnValue;
248                    }
249                    catch (Exception e) {
250                            _log.error(e, e);
251    
252                            throw new RemoteException(e.getMessage());
253                    }
254            }
255    
256            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
257                    long groupId, long folderId, int status, java.lang.String[] mimeTypes,
258                    boolean includeMountFolders) throws RemoteException {
259                    try {
260                            int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
261                                            folderId, status, mimeTypes, includeMountFolders);
262    
263                            return returnValue;
264                    }
265                    catch (Exception e) {
266                            _log.error(e, e);
267    
268                            throw new RemoteException(e.getMessage());
269                    }
270            }
271    
272            public static int getFoldersCount(long groupId, long parentFolderId)
273                    throws RemoteException {
274                    try {
275                            int returnValue = DLFolderServiceUtil.getFoldersCount(groupId,
276                                            parentFolderId);
277    
278                            return returnValue;
279                    }
280                    catch (Exception e) {
281                            _log.error(e, e);
282    
283                            throw new RemoteException(e.getMessage());
284                    }
285            }
286    
287            public static int getFoldersCount(long groupId, long parentFolderId,
288                    boolean includeMountfolders) throws RemoteException {
289                    try {
290                            int returnValue = DLFolderServiceUtil.getFoldersCount(groupId,
291                                            parentFolderId, includeMountfolders);
292    
293                            return returnValue;
294                    }
295                    catch (Exception e) {
296                            _log.error(e, e);
297    
298                            throw new RemoteException(e.getMessage());
299                    }
300            }
301    
302            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getMountFolders(
303                    long groupId, long parentFolderId, int start, int end,
304                    com.liferay.portal.kernel.util.OrderByComparator obc)
305                    throws RemoteException {
306                    try {
307                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
308                                    DLFolderServiceUtil.getMountFolders(groupId, parentFolderId,
309                                            start, end, obc);
310    
311                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
312                    }
313                    catch (Exception e) {
314                            _log.error(e, e);
315    
316                            throw new RemoteException(e.getMessage());
317                    }
318            }
319    
320            public static int getMountFoldersCount(long groupId, long parentFolderId)
321                    throws RemoteException {
322                    try {
323                            int returnValue = DLFolderServiceUtil.getMountFoldersCount(groupId,
324                                            parentFolderId);
325    
326                            return returnValue;
327                    }
328                    catch (Exception e) {
329                            _log.error(e, e);
330    
331                            throw new RemoteException(e.getMessage());
332                    }
333            }
334    
335            public static void getSubfolderIds(Long[] folderIds, long groupId,
336                    long folderId) throws RemoteException {
337                    try {
338                            DLFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
339                                    groupId, folderId);
340                    }
341                    catch (Exception e) {
342                            _log.error(e, e);
343    
344                            throw new RemoteException(e.getMessage());
345                    }
346            }
347    
348            public static java.lang.Long[] getSubfolderIds(long groupId, long folderId,
349                    boolean recurse) throws RemoteException {
350                    try {
351                            java.util.List<java.lang.Long> returnValue = DLFolderServiceUtil.getSubfolderIds(groupId,
352                                            folderId, recurse);
353    
354                            return returnValue.toArray(new java.lang.Long[returnValue.size()]);
355                    }
356                    catch (Exception e) {
357                            _log.error(e, e);
358    
359                            throw new RemoteException(e.getMessage());
360                    }
361            }
362    
363            public static boolean hasFolderLock(long folderId)
364                    throws RemoteException {
365                    try {
366                            boolean returnValue = DLFolderServiceUtil.hasFolderLock(folderId);
367    
368                            return returnValue;
369                    }
370                    catch (Exception e) {
371                            _log.error(e, e);
372    
373                            throw new RemoteException(e.getMessage());
374                    }
375            }
376    
377            public static boolean hasInheritableLock(long folderId)
378                    throws RemoteException {
379                    try {
380                            boolean returnValue = DLFolderServiceUtil.hasInheritableLock(folderId);
381    
382                            return returnValue;
383                    }
384                    catch (Exception e) {
385                            _log.error(e, e);
386    
387                            throw new RemoteException(e.getMessage());
388                    }
389            }
390    
391            public static boolean isFolderLocked(long folderId)
392                    throws RemoteException {
393                    try {
394                            boolean returnValue = DLFolderServiceUtil.isFolderLocked(folderId);
395    
396                            return returnValue;
397                    }
398                    catch (Exception e) {
399                            _log.error(e, e);
400    
401                            throw new RemoteException(e.getMessage());
402                    }
403            }
404    
405            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap moveFolder(
406                    long folderId, long parentFolderId,
407                    com.liferay.portal.service.ServiceContext serviceContext)
408                    throws RemoteException {
409                    try {
410                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.moveFolder(folderId,
411                                            parentFolderId, serviceContext);
412    
413                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
414                    }
415                    catch (Exception e) {
416                            _log.error(e, e);
417    
418                            throw new RemoteException(e.getMessage());
419                    }
420            }
421    
422            public static void unlockFolder(long groupId, long folderId,
423                    java.lang.String lockUuid) throws RemoteException {
424                    try {
425                            DLFolderServiceUtil.unlockFolder(groupId, folderId, lockUuid);
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 parentFolderId,
435                    java.lang.String name, java.lang.String lockUuid)
436                    throws RemoteException {
437                    try {
438                            DLFolderServiceUtil.unlockFolder(groupId, parentFolderId, name,
439                                    lockUuid);
440                    }
441                    catch (Exception e) {
442                            _log.error(e, e);
443    
444                            throw new RemoteException(e.getMessage());
445                    }
446            }
447    
448            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap updateFolder(
449                    long folderId, java.lang.String name, java.lang.String description,
450                    long defaultFileEntryTypeId, Long[] fileEntryTypeIds,
451                    boolean overrideFileEntryTypes,
452                    com.liferay.portal.service.ServiceContext serviceContext)
453                    throws RemoteException {
454                    try {
455                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
456                                            name, description, defaultFileEntryTypeId,
457                                            ListUtil.toList(fileEntryTypeIds), overrideFileEntryTypes,
458                                            serviceContext);
459    
460                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
461                    }
462                    catch (Exception e) {
463                            _log.error(e, e);
464    
465                            throw new RemoteException(e.getMessage());
466                    }
467            }
468    
469            public static boolean verifyInheritableLock(long folderId,
470                    java.lang.String lockUuid) throws RemoteException {
471                    try {
472                            boolean returnValue = DLFolderServiceUtil.verifyInheritableLock(folderId,
473                                            lockUuid);
474    
475                            return returnValue;
476                    }
477                    catch (Exception e) {
478                            _log.error(e, e);
479    
480                            throw new RemoteException(e.getMessage());
481                    }
482            }
483    
484            private static Log _log = LogFactoryUtil.getLog(DLFolderServiceSoap.class);
485    }