1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
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 reIndexSearch(long companyId) throws RemoteException {
210         try {
211             DLFolderServiceUtil.reIndexSearch(companyId);
212         }
213         catch (Exception e) {
214             _log.error(e, e);
215 
216             throw new RemoteException(e.getMessage());
217         }
218     }
219 
220     public static void unlockFolder(long groupId, long parentFolderId,
221         java.lang.String name, java.lang.String lockUuid)
222         throws RemoteException {
223         try {
224             DLFolderServiceUtil.unlockFolder(groupId, parentFolderId, name,
225                 lockUuid);
226         }
227         catch (Exception e) {
228             _log.error(e, e);
229 
230             throw new RemoteException(e.getMessage());
231         }
232     }
233 
234     public static void unlockFolder(long folderId, java.lang.String lockUuid)
235         throws RemoteException {
236         try {
237             DLFolderServiceUtil.unlockFolder(folderId, lockUuid);
238         }
239         catch (Exception e) {
240             _log.error(e, e);
241 
242             throw new RemoteException(e.getMessage());
243         }
244     }
245 
246     public static com.liferay.portlet.documentlibrary.model.DLFolderSoap updateFolder(
247         long folderId, long parentFolderId, java.lang.String name,
248         java.lang.String description,
249         com.liferay.portal.service.ServiceContext serviceContext)
250         throws RemoteException {
251         try {
252             com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil.updateFolder(folderId,
253                     parentFolderId, name, description, serviceContext);
254 
255             return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
256         }
257         catch (Exception e) {
258             _log.error(e, e);
259 
260             throw new RemoteException(e.getMessage());
261         }
262     }
263 
264     public static boolean verifyInheritableLock(long folderId,
265         java.lang.String lockUuid) throws RemoteException {
266         try {
267             boolean returnValue = DLFolderServiceUtil.verifyInheritableLock(folderId,
268                     lockUuid);
269 
270             return returnValue;
271         }
272         catch (Exception e) {
273             _log.error(e, e);
274 
275             throw new RemoteException(e.getMessage());
276         }
277     }
278 
279     private static Log _log = LogFactoryUtil.getLog(DLFolderServiceSoap.class);
280 }