001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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/tunnel-web/secure/axis. Set the property
054     * <b>tunnel.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 com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(
128                    long folderId) throws RemoteException {
129                    try {
130                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(folderId);
131    
132                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
133                    }
134                    catch (Exception e) {
135                            _log.error(e, e);
136    
137                            throw new RemoteException(e.getMessage());
138                    }
139            }
140    
141            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(
142                    long groupId, long parentFolderId, java.lang.String name)
143                    throws RemoteException {
144                    try {
145                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(groupId,
146                                            parentFolderId, name);
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 long[] getFolderIds(long groupId, long folderId)
158                    throws RemoteException {
159                    try {
160                            long[] returnValue = DLFolderServiceUtil.getFolderIds(groupId,
161                                            folderId);
162    
163                            return returnValue;
164                    }
165                    catch (Exception e) {
166                            _log.error(e, e);
167    
168                            throw new RemoteException(e.getMessage());
169                    }
170            }
171    
172            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getFolders(
173                    long groupId, long parentFolderId, boolean includeMountfolders,
174                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
175                    throws RemoteException {
176                    try {
177                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
178                                    DLFolderServiceUtil.getFolders(groupId, parentFolderId,
179                                            includeMountfolders, start, end, obc);
180    
181                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
182                    }
183                    catch (Exception e) {
184                            _log.error(e, e);
185    
186                            throw new RemoteException(e.getMessage());
187                    }
188            }
189    
190            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getFolders(
191                    long groupId, long parentFolderId, int start, int end,
192                    com.liferay.portal.kernel.util.OrderByComparator obc)
193                    throws RemoteException {
194                    try {
195                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
196                                    DLFolderServiceUtil.getFolders(groupId, parentFolderId, start,
197                                            end, obc);
198    
199                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
200                    }
201                    catch (Exception e) {
202                            _log.error(e, e);
203    
204                            throw new RemoteException(e.getMessage());
205                    }
206            }
207    
208            public static int getFoldersAndFileEntriesAndFileShortcuts(long groupId,
209                    long folderId, int status, java.lang.String[] mimeTypes,
210                    boolean includeMountFolders) throws RemoteException {
211                    try {
212                            int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcuts(groupId,
213                                            folderId, status, mimeTypes, includeMountFolders);
214    
215                            return 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 getFoldersAndFileEntriesAndFileShortcutsCount(
225                    long groupId, long folderId, int status, boolean includeMountFolders)
226                    throws RemoteException {
227                    try {
228                            int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
229                                            folderId, status, 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, java.lang.String[] mimeTypes,
242                    boolean includeMountFolders) throws RemoteException {
243                    try {
244                            int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
245                                            folderId, status, mimeTypes, 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 getFoldersCount(long groupId, long parentFolderId)
257                    throws RemoteException {
258                    try {
259                            int returnValue = DLFolderServiceUtil.getFoldersCount(groupId,
260                                            parentFolderId);
261    
262                            return returnValue;
263                    }
264                    catch (Exception e) {
265                            _log.error(e, e);
266    
267                            throw new RemoteException(e.getMessage());
268                    }
269            }
270    
271            public static int getFoldersCount(long groupId, long parentFolderId,
272                    boolean includeMountfolders) throws RemoteException {
273                    try {
274                            int returnValue = DLFolderServiceUtil.getFoldersCount(groupId,
275                                            parentFolderId, includeMountfolders);
276    
277                            return returnValue;
278                    }
279                    catch (Exception e) {
280                            _log.error(e, e);
281    
282                            throw new RemoteException(e.getMessage());
283                    }
284            }
285    
286            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getMountFolders(
287                    long groupId, long parentFolderId, int start, int end,
288                    com.liferay.portal.kernel.util.OrderByComparator obc)
289                    throws RemoteException {
290                    try {
291                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
292                                    DLFolderServiceUtil.getMountFolders(groupId, parentFolderId,
293                                            start, end, obc);
294    
295                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
296                    }
297                    catch (Exception e) {
298                            _log.error(e, e);
299    
300                            throw new RemoteException(e.getMessage());
301                    }
302            }
303    
304            public static int getMountFoldersCount(long groupId, long parentFolderId)
305                    throws RemoteException {
306                    try {
307                            int returnValue = DLFolderServiceUtil.getMountFoldersCount(groupId,
308                                            parentFolderId);
309    
310                            return returnValue;
311                    }
312                    catch (Exception e) {
313                            _log.error(e, e);
314    
315                            throw new RemoteException(e.getMessage());
316                    }
317            }
318    
319            public static void getSubfolderIds(Long[] folderIds, long groupId,
320                    long folderId) throws RemoteException {
321                    try {
322                            DLFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
323                                    groupId, folderId);
324                    }
325                    catch (Exception e) {
326                            _log.error(e, e);
327    
328                            throw new RemoteException(e.getMessage());
329                    }
330            }
331    
332            public static java.lang.Long[] getSubfolderIds(long groupId, long folderId,
333                    boolean recurse) throws RemoteException {
334                    try {
335                            java.util.List<java.lang.Long> returnValue = DLFolderServiceUtil.getSubfolderIds(groupId,
336                                            folderId, recurse);
337    
338                            return returnValue.toArray(new java.lang.Long[returnValue.size()]);
339                    }
340                    catch (Exception e) {
341                            _log.error(e, e);
342    
343                            throw new RemoteException(e.getMessage());
344                    }
345            }
346    
347            public static boolean hasFolderLock(long folderId)
348                    throws RemoteException {
349                    try {
350                            boolean returnValue = DLFolderServiceUtil.hasFolderLock(folderId);
351    
352                            return returnValue;
353                    }
354                    catch (Exception e) {
355                            _log.error(e, e);
356    
357                            throw new RemoteException(e.getMessage());
358                    }
359            }
360    
361            public static boolean hasInheritableLock(long folderId)
362                    throws RemoteException {
363                    try {
364                            boolean returnValue = DLFolderServiceUtil.hasInheritableLock(folderId);
365    
366                            return returnValue;
367                    }
368                    catch (Exception e) {
369                            _log.error(e, e);
370    
371                            throw new RemoteException(e.getMessage());
372                    }
373            }
374    
375            public static boolean isFolderLocked(long folderId)
376                    throws RemoteException {
377                    try {
378                            boolean returnValue = DLFolderServiceUtil.isFolderLocked(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 com.liferay.portlet.documentlibrary.model.DLFolderSoap moveFolder(
390                    long folderId, long parentFolderId,
391                    com.liferay.portal.service.ServiceContext serviceContext)
392                    throws RemoteException {
393                    try {
394                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.moveFolder(folderId,
395                                            parentFolderId, serviceContext);
396    
397                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
398                    }
399                    catch (Exception e) {
400                            _log.error(e, e);
401    
402                            throw new RemoteException(e.getMessage());
403                    }
404            }
405    
406            public static void unlockFolder(long groupId, long folderId,
407                    java.lang.String lockUuid) throws RemoteException {
408                    try {
409                            DLFolderServiceUtil.unlockFolder(groupId, folderId, lockUuid);
410                    }
411                    catch (Exception e) {
412                            _log.error(e, e);
413    
414                            throw new RemoteException(e.getMessage());
415                    }
416            }
417    
418            public static void unlockFolder(long groupId, long parentFolderId,
419                    java.lang.String name, java.lang.String lockUuid)
420                    throws RemoteException {
421                    try {
422                            DLFolderServiceUtil.unlockFolder(groupId, parentFolderId, name,
423                                    lockUuid);
424                    }
425                    catch (Exception e) {
426                            _log.error(e, e);
427    
428                            throw new RemoteException(e.getMessage());
429                    }
430            }
431    
432            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap updateFolder(
433                    long folderId, java.lang.String name, java.lang.String description,
434                    long defaultFileEntryTypeId, Long[] fileEntryTypeIds,
435                    boolean overrideFileEntryTypes,
436                    com.liferay.portal.service.ServiceContext serviceContext)
437                    throws RemoteException {
438                    try {
439                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
440                                            name, description, defaultFileEntryTypeId,
441                                            ListUtil.toList(fileEntryTypeIds), overrideFileEntryTypes,
442                                            serviceContext);
443    
444                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
445                    }
446                    catch (Exception e) {
447                            _log.error(e, e);
448    
449                            throw new RemoteException(e.getMessage());
450                    }
451            }
452    
453            public static boolean verifyInheritableLock(long folderId,
454                    java.lang.String lockUuid) throws RemoteException {
455                    try {
456                            boolean returnValue = DLFolderServiceUtil.verifyInheritableLock(folderId,
457                                            lockUuid);
458    
459                            return returnValue;
460                    }
461                    catch (Exception e) {
462                            _log.error(e, e);
463    
464                            throw new RemoteException(e.getMessage());
465                    }
466            }
467    
468            private static Log _log = LogFactoryUtil.getLog(DLFolderServiceSoap.class);
469    }