1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.expando.service.http;
24  
25  import com.liferay.portal.kernel.log.Log;
26  import com.liferay.portal.kernel.log.LogFactoryUtil;
27  
28  import com.liferay.portlet.expando.service.ExpandoColumnServiceUtil;
29  
30  import java.rmi.RemoteException;
31  
32  /**
33   * <a href="ExpandoColumnServiceSoap.java.html"><b><i>View Source</i></b></a>
34   *
35   * <p>
36   * ServiceBuilder generated this class. Modifications in this class will be
37   * overwritten the next time is generated.
38   * </p>
39   *
40   * <p>
41   * This class provides a SOAP utility for the
42   * <code>com.liferay.portlet.expando.service.ExpandoColumnServiceUtil</code> service
43   * utility. The static methods of this class calls the same methods of the
44   * service utility. However, the signatures are different because it is
45   * difficult for SOAP to support certain types.
46   * </p>
47   *
48   * <p>
49   * ServiceBuilder follows certain rules in translating the methods. For example,
50   * if the method in the service utility returns a <code>java.util.List</code>,
51   * that is translated to an array of
52   * <code>com.liferay.portlet.expando.model.ExpandoColumnSoap</code>. If the method in the
53   * service utility returns a <code>com.liferay.portlet.expando.model.ExpandoColumn</code>,
54   * that is translated to a <code>com.liferay.portlet.expando.model.ExpandoColumnSoap</code>.
55   * Methods that SOAP cannot safely wire are skipped.
56   * </p>
57   *
58   * <p>
59   * The benefits of using the SOAP utility is that it is cross platform
60   * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
61   * even Perl, to call the generated services. One drawback of SOAP is that it is
62   * slow because it needs to serialize all calls into a text format (XML).
63   * </p>
64   *
65   * <p>
66   * You can see a list of services at
67   * http://localhost:8080/tunnel-web/secure/axis. Set the property
68   * <code>tunnel.servlet.hosts.allowed</code> in portal.properties to configure
69   * security.
70   * </p>
71   *
72   * <p>
73   * The SOAP utility is only generated for remote services.
74   * </p>
75   *
76   * @author Brian Wing Shun Chan
77   *
78   * @see com.liferay.portlet.expando.service.ExpandoColumnServiceUtil
79   * @see com.liferay.portlet.expando.service.http.ExpandoColumnServiceHttp
80   * @see com.liferay.portlet.expando.service.model.ExpandoColumnSoap
81   *
82   */
83  public class ExpandoColumnServiceSoap {
84      public static com.liferay.portlet.expando.model.ExpandoColumnSoap addColumn(
85          long tableId, java.lang.String name, int type)
86          throws RemoteException {
87          try {
88              com.liferay.portlet.expando.model.ExpandoColumn returnValue = ExpandoColumnServiceUtil.addColumn(tableId,
89                      name, type);
90  
91              return com.liferay.portlet.expando.model.ExpandoColumnSoap.toSoapModel(returnValue);
92          }
93          catch (Exception e) {
94              _log.error(e, e);
95  
96              throw new RemoteException(e.getMessage());
97          }
98      }
99  
100     public static void deleteColumn(long columnId) throws RemoteException {
101         try {
102             ExpandoColumnServiceUtil.deleteColumn(columnId);
103         }
104         catch (Exception e) {
105             _log.error(e, e);
106 
107             throw new RemoteException(e.getMessage());
108         }
109     }
110 
111     public static void deleteColumns(long tableId) throws RemoteException {
112         try {
113             ExpandoColumnServiceUtil.deleteColumns(tableId);
114         }
115         catch (Exception e) {
116             _log.error(e, e);
117 
118             throw new RemoteException(e.getMessage());
119         }
120     }
121 
122     public static void deleteColumns(java.lang.String className,
123         java.lang.String tableName) throws RemoteException {
124         try {
125             ExpandoColumnServiceUtil.deleteColumns(className, tableName);
126         }
127         catch (Exception e) {
128             _log.error(e, e);
129 
130             throw new RemoteException(e.getMessage());
131         }
132     }
133 
134     public static void deleteColumns(long classNameId,
135         java.lang.String tableName) throws RemoteException {
136         try {
137             ExpandoColumnServiceUtil.deleteColumns(classNameId, tableName);
138         }
139         catch (Exception e) {
140             _log.error(e, e);
141 
142             throw new RemoteException(e.getMessage());
143         }
144     }
145 
146     public static com.liferay.portlet.expando.model.ExpandoColumnSoap getColumn(
147         long columnId) throws RemoteException {
148         try {
149             com.liferay.portlet.expando.model.ExpandoColumn returnValue = ExpandoColumnServiceUtil.getColumn(columnId);
150 
151             return com.liferay.portlet.expando.model.ExpandoColumnSoap.toSoapModel(returnValue);
152         }
153         catch (Exception e) {
154             _log.error(e, e);
155 
156             throw new RemoteException(e.getMessage());
157         }
158     }
159 
160     public static com.liferay.portlet.expando.model.ExpandoColumnSoap getColumn(
161         long tableId, java.lang.String name) throws RemoteException {
162         try {
163             com.liferay.portlet.expando.model.ExpandoColumn returnValue = ExpandoColumnServiceUtil.getColumn(tableId,
164                     name);
165 
166             return com.liferay.portlet.expando.model.ExpandoColumnSoap.toSoapModel(returnValue);
167         }
168         catch (Exception e) {
169             _log.error(e, e);
170 
171             throw new RemoteException(e.getMessage());
172         }
173     }
174 
175     public static com.liferay.portlet.expando.model.ExpandoColumnSoap getColumn(
176         java.lang.String className, java.lang.String tableName,
177         java.lang.String name) throws RemoteException {
178         try {
179             com.liferay.portlet.expando.model.ExpandoColumn returnValue = ExpandoColumnServiceUtil.getColumn(className,
180                     tableName, name);
181 
182             return com.liferay.portlet.expando.model.ExpandoColumnSoap.toSoapModel(returnValue);
183         }
184         catch (Exception e) {
185             _log.error(e, e);
186 
187             throw new RemoteException(e.getMessage());
188         }
189     }
190 
191     public static com.liferay.portlet.expando.model.ExpandoColumnSoap getColumn(
192         long classNameId, java.lang.String tableName, java.lang.String name)
193         throws RemoteException {
194         try {
195             com.liferay.portlet.expando.model.ExpandoColumn returnValue = ExpandoColumnServiceUtil.getColumn(classNameId,
196                     tableName, name);
197 
198             return com.liferay.portlet.expando.model.ExpandoColumnSoap.toSoapModel(returnValue);
199         }
200         catch (Exception e) {
201             _log.error(e, e);
202 
203             throw new RemoteException(e.getMessage());
204         }
205     }
206 
207     public static com.liferay.portlet.expando.model.ExpandoColumnSoap[] getColumns(
208         long tableId) throws RemoteException {
209         try {
210             java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> returnValue =
211                 ExpandoColumnServiceUtil.getColumns(tableId);
212 
213             return com.liferay.portlet.expando.model.ExpandoColumnSoap.toSoapModels(returnValue);
214         }
215         catch (Exception e) {
216             _log.error(e, e);
217 
218             throw new RemoteException(e.getMessage());
219         }
220     }
221 
222     public static com.liferay.portlet.expando.model.ExpandoColumnSoap[] getColumns(
223         java.lang.String className, java.lang.String tableName)
224         throws RemoteException {
225         try {
226             java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> returnValue =
227                 ExpandoColumnServiceUtil.getColumns(className, tableName);
228 
229             return com.liferay.portlet.expando.model.ExpandoColumnSoap.toSoapModels(returnValue);
230         }
231         catch (Exception e) {
232             _log.error(e, e);
233 
234             throw new RemoteException(e.getMessage());
235         }
236     }
237 
238     public static com.liferay.portlet.expando.model.ExpandoColumnSoap[] getColumns(
239         long classNameId, java.lang.String tableName) throws RemoteException {
240         try {
241             java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> returnValue =
242                 ExpandoColumnServiceUtil.getColumns(classNameId, tableName);
243 
244             return com.liferay.portlet.expando.model.ExpandoColumnSoap.toSoapModels(returnValue);
245         }
246         catch (Exception e) {
247             _log.error(e, e);
248 
249             throw new RemoteException(e.getMessage());
250         }
251     }
252 
253     public static int getColumnsCount(long tableId) throws RemoteException {
254         try {
255             int returnValue = ExpandoColumnServiceUtil.getColumnsCount(tableId);
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 getColumnsCount(java.lang.String className,
267         java.lang.String tableName) throws RemoteException {
268         try {
269             int returnValue = ExpandoColumnServiceUtil.getColumnsCount(className,
270                     tableName);
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 getColumnsCount(long classNameId,
282         java.lang.String tableName) throws RemoteException {
283         try {
284             int returnValue = ExpandoColumnServiceUtil.getColumnsCount(classNameId,
285                     tableName);
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 com.liferay.portlet.expando.model.ExpandoColumnSoap getDefaultTableColumn(
297         java.lang.String className, java.lang.String name)
298         throws RemoteException {
299         try {
300             com.liferay.portlet.expando.model.ExpandoColumn returnValue = ExpandoColumnServiceUtil.getDefaultTableColumn(className,
301                     name);
302 
303             return com.liferay.portlet.expando.model.ExpandoColumnSoap.toSoapModel(returnValue);
304         }
305         catch (Exception e) {
306             _log.error(e, e);
307 
308             throw new RemoteException(e.getMessage());
309         }
310     }
311 
312     public static com.liferay.portlet.expando.model.ExpandoColumnSoap getDefaultTableColumn(
313         long classNameId, java.lang.String name) throws RemoteException {
314         try {
315             com.liferay.portlet.expando.model.ExpandoColumn returnValue = ExpandoColumnServiceUtil.getDefaultTableColumn(classNameId,
316                     name);
317 
318             return com.liferay.portlet.expando.model.ExpandoColumnSoap.toSoapModel(returnValue);
319         }
320         catch (Exception e) {
321             _log.error(e, e);
322 
323             throw new RemoteException(e.getMessage());
324         }
325     }
326 
327     public static com.liferay.portlet.expando.model.ExpandoColumnSoap[] getDefaultTableColumns(
328         java.lang.String className) throws RemoteException {
329         try {
330             java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> returnValue =
331                 ExpandoColumnServiceUtil.getDefaultTableColumns(className);
332 
333             return com.liferay.portlet.expando.model.ExpandoColumnSoap.toSoapModels(returnValue);
334         }
335         catch (Exception e) {
336             _log.error(e, e);
337 
338             throw new RemoteException(e.getMessage());
339         }
340     }
341 
342     public static com.liferay.portlet.expando.model.ExpandoColumnSoap[] getDefaultTableColumns(
343         long classNameId) throws RemoteException {
344         try {
345             java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> returnValue =
346                 ExpandoColumnServiceUtil.getDefaultTableColumns(classNameId);
347 
348             return com.liferay.portlet.expando.model.ExpandoColumnSoap.toSoapModels(returnValue);
349         }
350         catch (Exception e) {
351             _log.error(e, e);
352 
353             throw new RemoteException(e.getMessage());
354         }
355     }
356 
357     public static int getDefaultTableColumnsCount(java.lang.String className)
358         throws RemoteException {
359         try {
360             int returnValue = ExpandoColumnServiceUtil.getDefaultTableColumnsCount(className);
361 
362             return returnValue;
363         }
364         catch (Exception e) {
365             _log.error(e, e);
366 
367             throw new RemoteException(e.getMessage());
368         }
369     }
370 
371     public static int getDefaultTableColumnsCount(long classNameId)
372         throws RemoteException {
373         try {
374             int returnValue = ExpandoColumnServiceUtil.getDefaultTableColumnsCount(classNameId);
375 
376             return returnValue;
377         }
378         catch (Exception e) {
379             _log.error(e, e);
380 
381             throw new RemoteException(e.getMessage());
382         }
383     }
384 
385     public static com.liferay.portlet.expando.model.ExpandoColumnSoap updateColumn(
386         long columnId, java.lang.String name, int type)
387         throws RemoteException {
388         try {
389             com.liferay.portlet.expando.model.ExpandoColumn returnValue = ExpandoColumnServiceUtil.updateColumn(columnId,
390                     name, type);
391 
392             return com.liferay.portlet.expando.model.ExpandoColumnSoap.toSoapModel(returnValue);
393         }
394         catch (Exception e) {
395             _log.error(e, e);
396 
397             throw new RemoteException(e.getMessage());
398         }
399     }
400 
401     private static Log _log = LogFactoryUtil.getLog(ExpandoColumnServiceSoap.class);
402 }