1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.documentlibrary.service.http;
16  
17  import com.liferay.portal.kernel.log.Log;
18  import com.liferay.portal.kernel.log.LogFactoryUtil;
19  
20  import com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil;
21  
22  import java.rmi.RemoteException;
23  
24  /**
25   * <a href="DLFolderServiceSoap.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * <p>
33   * This class provides a SOAP utility for the
34   * {@link com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil} service utility. The
35   * static methods of this class calls the same methods of the service utility.
36   * However, the signatures are different because it is difficult for SOAP to
37   * support certain types.
38   * </p>
39   *
40   * <p>
41   * ServiceBuilder follows certain rules in translating the methods. For example,
42   * if the method in the service utility returns a {@link java.util.List}, that
43   * is translated to an array of {@link com.liferay.portlet.documentlibrary.model.DLFolderSoap}.
44   * If the method in the service utility returns a
45   * {@link com.liferay.portlet.documentlibrary.model.DLFolder}, that is translated to a
46   * {@link com.liferay.portlet.documentlibrary.model.DLFolderSoap}. Methods that SOAP cannot
47   * safely wire are skipped.
48   * </p>
49   *
50   * <p>
51   * The benefits of using the SOAP utility is that it is cross platform
52   * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
53   * even Perl, to call the generated services. One drawback of SOAP is that it is
54   * slow because it needs to serialize all calls into a text format (XML).
55   * </p>
56   *
57   * <p>
58   * You can see a list of services at
59   * http://localhost:8080/tunnel-web/secure/axis. Set the property
60   * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
61   * security.
62   * </p>
63   *
64   * <p>
65   * The SOAP utility is only generated for remote services.
66   * </p>
67   *
68   * @author    Brian Wing Shun Chan
69   * @see       DLFolderServiceHttp
70   * @see       com.liferay.portlet.documentlibrary.model.DLFolderSoap
71   * @see       com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil
72   * @generated
73   */
74  public class DLFolderServiceSoap {
75      public static com.liferay.portlet.documentlibrary.model.DLFolderSoap addFolder(
76          long groupId, long parentFolderId, java.lang.String name,
77          java.lang.String description,
78          com.liferay.portal.service.ServiceContext serviceContext)
79          throws RemoteException {
80          try {
81              com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.addFolder(groupId,
82                      parentFolderId, name, description, serviceContext);
83  
84              return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
85          }
86          catch (Exception e) {
87              _log.error(e, e);
88  
89              throw new RemoteException(e.getMessage());
90          }
91      }
92  
93      public static com.liferay.portlet.documentlibrary.model.DLFolderSoap copyFolder(
94          long groupId, long sourceFolderId, long parentFolderId,
95          java.lang.String name, java.lang.String description,
96          com.liferay.portal.service.ServiceContext serviceContext)
97          throws RemoteException {
98          try {
99              com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.copyFolder(groupId,
100                     sourceFolderId, parentFolderId, name, description,
101                     serviceContext);
102 
103             return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
104         }
105         catch (Exception e) {
106             _log.error(e, e);
107 
108             throw new RemoteException(e.getMessage());
109         }
110     }
111 
112     public static void deleteFolder(long folderId) throws RemoteException {
113         try {
114             DLFolderServiceUtil.deleteFolder(folderId);
115         }
116         catch (Exception e) {
117             _log.error(e, e);
118 
119             throw new RemoteException(e.getMessage());
120         }
121     }
122 
123     public static void deleteFolder(long groupId, long parentFolderId,
124         java.lang.String name) throws RemoteException {
125         try {
126             DLFolderServiceUtil.deleteFolder(groupId, parentFolderId, name);
127         }
128         catch (Exception e) {
129             _log.error(e, e);
130 
131             throw new RemoteException(e.getMessage());
132         }
133     }
134 
135     public static com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(
136         long folderId) throws RemoteException {
137         try {
138             com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(folderId);
139 
140             return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
141         }
142         catch (Exception e) {
143             _log.error(e, e);
144 
145             throw new RemoteException(e.getMessage());
146         }
147     }
148 
149     public static com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(
150         long groupId, long parentFolderId, java.lang.String name)
151         throws RemoteException {
152         try {
153             com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.getFolder(groupId,
154                     parentFolderId, name);
155 
156             return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
157         }
158         catch (Exception e) {
159             _log.error(e, e);
160 
161             throw new RemoteException(e.getMessage());
162         }
163     }
164 
165     public static long getFolderId(long groupId, long parentFolderId,
166         java.lang.String name) throws RemoteException {
167         try {
168             long returnValue = DLFolderServiceUtil.getFolderId(groupId,
169                     parentFolderId, name);
170 
171             return returnValue;
172         }
173         catch (Exception e) {
174             _log.error(e, e);
175 
176             throw new RemoteException(e.getMessage());
177         }
178     }
179 
180     public static com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getFolders(
181         long groupId, long parentFolderId) throws RemoteException {
182         try {
183             java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
184                 DLFolderServiceUtil.getFolders(groupId, parentFolderId);
185 
186             return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
187         }
188         catch (Exception e) {
189             _log.error(e, e);
190 
191             throw new RemoteException(e.getMessage());
192         }
193     }
194 
195     public static boolean hasInheritableLock(long folderId)
196         throws RemoteException {
197         try {
198             boolean returnValue = DLFolderServiceUtil.hasInheritableLock(folderId);
199 
200             return returnValue;
201         }
202         catch (Exception e) {
203             _log.error(e, e);
204 
205             throw new RemoteException(e.getMessage());
206         }
207     }
208 
209     public static void unlockFolder(long groupId, long folderId,
210         java.lang.String lockUuid) throws RemoteException {
211         try {
212             DLFolderServiceUtil.unlockFolder(groupId, folderId, lockUuid);
213         }
214         catch (Exception e) {
215             _log.error(e, e);
216 
217             throw new RemoteException(e.getMessage());
218         }
219     }
220 
221     public static void unlockFolder(long groupId, long parentFolderId,
222         java.lang.String name, java.lang.String lockUuid)
223         throws RemoteException {
224         try {
225             DLFolderServiceUtil.unlockFolder(groupId, parentFolderId, name,
226                 lockUuid);
227         }
228         catch (Exception e) {
229             _log.error(e, e);
230 
231             throw new RemoteException(e.getMessage());
232         }
233     }
234 
235     public static com.liferay.portlet.documentlibrary.model.DLFolderSoap updateFolder(
236         long folderId, long parentFolderId, java.lang.String name,
237         java.lang.String description,
238         com.liferay.portal.service.ServiceContext serviceContext)
239         throws RemoteException {
240         try {
241             com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
242                     parentFolderId, name, description, serviceContext);
243 
244             return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
245         }
246         catch (Exception e) {
247             _log.error(e, e);
248 
249             throw new RemoteException(e.getMessage());
250         }
251     }
252 
253     public static boolean verifyInheritableLock(long folderId,
254         java.lang.String lockUuid) throws RemoteException {
255         try {
256             boolean returnValue = DLFolderServiceUtil.verifyInheritableLock(folderId,
257                     lockUuid);
258 
259             return returnValue;
260         }
261         catch (Exception e) {
262             _log.error(e, e);
263 
264             throw new RemoteException(e.getMessage());
265         }
266     }
267 
268     private static Log _log = LogFactoryUtil.getLog(DLFolderServiceSoap.class);
269 }