001    /**
002     * Copyright (c) 2000-2010 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/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 parentFolderId, java.lang.String name,
071                    java.lang.String description,
072                    com.liferay.portal.service.ServiceContext serviceContext)
073                    throws RemoteException {
074                    try {
075                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.addFolder(groupId,
076                                            parentFolderId, name, description, serviceContext);
077    
078                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
079                    }
080                    catch (Exception e) {
081                            _log.error(e, e);
082    
083                            throw new RemoteException(e.getMessage());
084                    }
085            }
086    
087            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap copyFolder(
088                    long groupId, long sourceFolderId, long parentFolderId,
089                    java.lang.String name, java.lang.String description,
090                    com.liferay.portal.service.ServiceContext serviceContext)
091                    throws RemoteException {
092                    try {
093                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.copyFolder(groupId,
094                                            sourceFolderId, parentFolderId, name, description,
095                                            serviceContext);
096    
097                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
098                    }
099                    catch (Exception e) {
100                            _log.error(e, e);
101    
102                            throw new RemoteException(e.getMessage());
103                    }
104            }
105    
106            public static void deleteFolder(long folderId) throws RemoteException {
107                    try {
108                            DLFolderServiceUtil.deleteFolder(folderId);
109                    }
110                    catch (Exception e) {
111                            _log.error(e, e);
112    
113                            throw new RemoteException(e.getMessage());
114                    }
115            }
116    
117            public static void deleteFolder(long groupId, long parentFolderId,
118                    java.lang.String name) throws RemoteException {
119                    try {
120                            DLFolderServiceUtil.deleteFolder(groupId, parentFolderId, name);
121                    }
122                    catch (Exception e) {
123                            _log.error(e, e);
124    
125                            throw new RemoteException(e.getMessage());
126                    }
127            }
128    
129            public static int getFileEntriesAndFileShortcutsCount(long groupId,
130                    Long[] folderIds, int status) throws RemoteException {
131                    try {
132                            int returnValue = DLFolderServiceUtil.getFileEntriesAndFileShortcutsCount(groupId,
133                                            ListUtil.toList(folderIds), status);
134    
135                            return returnValue;
136                    }
137                    catch (Exception e) {
138                            _log.error(e, e);
139    
140                            throw new RemoteException(e.getMessage());
141                    }
142            }
143    
144            public static int getFileEntriesAndFileShortcutsCount(long groupId,
145                    long folderId, int status) throws RemoteException {
146                    try {
147                            int returnValue = DLFolderServiceUtil.getFileEntriesAndFileShortcutsCount(groupId,
148                                            folderId, status);
149    
150                            return returnValue;
151                    }
152                    catch (Exception e) {
153                            _log.error(e, e);
154    
155                            throw new RemoteException(e.getMessage());
156                    }
157            }
158    
159            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(
160                    long folderId) throws RemoteException {
161                    try {
162                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(folderId);
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 com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(
174                    long groupId, long parentFolderId, java.lang.String name)
175                    throws RemoteException {
176                    try {
177                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(groupId,
178                                            parentFolderId, name);
179    
180                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
181                    }
182                    catch (Exception e) {
183                            _log.error(e, e);
184    
185                            throw new RemoteException(e.getMessage());
186                    }
187            }
188    
189            public static long getFolderId(long groupId, long parentFolderId,
190                    java.lang.String name) throws RemoteException {
191                    try {
192                            long returnValue = DLFolderServiceUtil.getFolderId(groupId,
193                                            parentFolderId, name);
194    
195                            return returnValue;
196                    }
197                    catch (Exception e) {
198                            _log.error(e, e);
199    
200                            throw new RemoteException(e.getMessage());
201                    }
202            }
203    
204            public static long[] getFolderIds(long groupId, long folderId)
205                    throws RemoteException {
206                    try {
207                            long[] returnValue = DLFolderServiceUtil.getFolderIds(groupId,
208                                            folderId);
209    
210                            return 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) throws RemoteException {
221                    try {
222                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
223                                    DLFolderServiceUtil.getFolders(groupId, parentFolderId);
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 com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getFolders(
235                    long groupId, long parentFolderId, int start, int end)
236                    throws RemoteException {
237                    try {
238                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
239                                    DLFolderServiceUtil.getFolders(groupId, parentFolderId, start,
240                                            end);
241    
242                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
243                    }
244                    catch (Exception e) {
245                            _log.error(e, e);
246    
247                            throw new RemoteException(e.getMessage());
248                    }
249            }
250    
251            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
252                    long groupId, Long[] folderIds, int status) throws RemoteException {
253                    try {
254                            int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
255                                            ListUtil.toList(folderIds), status);
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) throws RemoteException {
268                    try {
269                            int returnValue = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
270                                            folderId, status);
271    
272                            return returnValue;
273                    }
274                    catch (Exception e) {
275                            _log.error(e, e);
276    
277                            throw new RemoteException(e.getMessage());
278                    }
279            }
280    
281            public static int getFoldersCount(long groupId, long parentFolderId)
282                    throws RemoteException {
283                    try {
284                            int returnValue = DLFolderServiceUtil.getFoldersCount(groupId,
285                                            parentFolderId);
286    
287                            return returnValue;
288                    }
289                    catch (Exception e) {
290                            _log.error(e, e);
291    
292                            throw new RemoteException(e.getMessage());
293                    }
294            }
295    
296            public static void getSubfolderIds(Long[] folderIds, long groupId,
297                    long folderId) throws RemoteException {
298                    try {
299                            DLFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
300                                    groupId, folderId);
301                    }
302                    catch (Exception e) {
303                            _log.error(e, e);
304    
305                            throw new RemoteException(e.getMessage());
306                    }
307            }
308    
309            public static boolean hasInheritableLock(long folderId)
310                    throws RemoteException {
311                    try {
312                            boolean returnValue = DLFolderServiceUtil.hasInheritableLock(folderId);
313    
314                            return returnValue;
315                    }
316                    catch (Exception e) {
317                            _log.error(e, e);
318    
319                            throw new RemoteException(e.getMessage());
320                    }
321            }
322    
323            public static void unlockFolder(long groupId, long folderId,
324                    java.lang.String lockUuid) throws RemoteException {
325                    try {
326                            DLFolderServiceUtil.unlockFolder(groupId, folderId, lockUuid);
327                    }
328                    catch (Exception e) {
329                            _log.error(e, e);
330    
331                            throw new RemoteException(e.getMessage());
332                    }
333            }
334    
335            public static void unlockFolder(long groupId, long parentFolderId,
336                    java.lang.String name, java.lang.String lockUuid)
337                    throws RemoteException {
338                    try {
339                            DLFolderServiceUtil.unlockFolder(groupId, parentFolderId, name,
340                                    lockUuid);
341                    }
342                    catch (Exception e) {
343                            _log.error(e, e);
344    
345                            throw new RemoteException(e.getMessage());
346                    }
347            }
348    
349            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap updateFolder(
350                    long folderId, long parentFolderId, java.lang.String name,
351                    java.lang.String description,
352                    com.liferay.portal.service.ServiceContext serviceContext)
353                    throws RemoteException {
354                    try {
355                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
356                                            parentFolderId, name, description, serviceContext);
357    
358                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
359                    }
360                    catch (Exception e) {
361                            _log.error(e, e);
362    
363                            throw new RemoteException(e.getMessage());
364                    }
365            }
366    
367            public static boolean verifyInheritableLock(long folderId,
368                    java.lang.String lockUuid) throws RemoteException {
369                    try {
370                            boolean returnValue = DLFolderServiceUtil.verifyInheritableLock(folderId,
371                                            lockUuid);
372    
373                            return returnValue;
374                    }
375                    catch (Exception e) {
376                            _log.error(e, e);
377    
378                            throw new RemoteException(e.getMessage());
379                    }
380            }
381    
382            private static Log _log = LogFactoryUtil.getLog(DLFolderServiceSoap.class);
383    }