001    /**
002     * Copyright (c) 2000-2010 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 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 void getSubfolderIds(Long[] folderIds, long groupId,
310                    long folderId, boolean recurse) throws RemoteException {
311                    try {
312                            DLFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
313                                    groupId, folderId, recurse);
314                    }
315                    catch (Exception e) {
316                            _log.error(e, e);
317    
318                            throw new RemoteException(e.getMessage());
319                    }
320            }
321    
322            public static boolean hasInheritableLock(long folderId)
323                    throws RemoteException {
324                    try {
325                            boolean returnValue = DLFolderServiceUtil.hasInheritableLock(folderId);
326    
327                            return returnValue;
328                    }
329                    catch (Exception e) {
330                            _log.error(e, e);
331    
332                            throw new RemoteException(e.getMessage());
333                    }
334            }
335    
336            public static void unlockFolder(long groupId, long folderId,
337                    java.lang.String lockUuid) throws RemoteException {
338                    try {
339                            DLFolderServiceUtil.unlockFolder(groupId, folderId, lockUuid);
340                    }
341                    catch (Exception e) {
342                            _log.error(e, e);
343    
344                            throw new RemoteException(e.getMessage());
345                    }
346            }
347    
348            public static void unlockFolder(long groupId, long parentFolderId,
349                    java.lang.String name, java.lang.String lockUuid)
350                    throws RemoteException {
351                    try {
352                            DLFolderServiceUtil.unlockFolder(groupId, parentFolderId, name,
353                                    lockUuid);
354                    }
355                    catch (Exception e) {
356                            _log.error(e, e);
357    
358                            throw new RemoteException(e.getMessage());
359                    }
360            }
361    
362            public static com.liferay.portlet.documentlibrary.model.DLFolderSoap updateFolder(
363                    long folderId, long parentFolderId, java.lang.String name,
364                    java.lang.String description,
365                    com.liferay.portal.service.ServiceContext serviceContext)
366                    throws RemoteException {
367                    try {
368                            com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
369                                            parentFolderId, name, description, serviceContext);
370    
371                            return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
372                    }
373                    catch (Exception e) {
374                            _log.error(e, e);
375    
376                            throw new RemoteException(e.getMessage());
377                    }
378            }
379    
380            public static boolean verifyInheritableLock(long folderId,
381                    java.lang.String lockUuid) throws RemoteException {
382                    try {
383                            boolean returnValue = DLFolderServiceUtil.verifyInheritableLock(folderId,
384                                            lockUuid);
385    
386                            return returnValue;
387                    }
388                    catch (Exception e) {
389                            _log.error(e, e);
390    
391                            throw new RemoteException(e.getMessage());
392                    }
393            }
394    
395            private static Log _log = LogFactoryUtil.getLog(DLFolderServiceSoap.class);
396    }