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.ExpandoValueServiceUtil;
29  
30  import java.rmi.RemoteException;
31  
32  /**
33   * <a href="ExpandoValueServiceSoap.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.ExpandoValueServiceUtil</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.ExpandoValueSoap</code>. If the method in the
53   * service utility returns a <code>com.liferay.portlet.expando.model.ExpandoValue</code>,
54   * that is translated to a <code>com.liferay.portlet.expando.model.ExpandoValueSoap</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.ExpandoValueServiceUtil
79   * @see com.liferay.portlet.expando.service.http.ExpandoValueServiceHttp
80   * @see com.liferay.portlet.expando.service.model.ExpandoValueSoap
81   *
82   */
83  public class ExpandoValueServiceSoap {
84      public static com.liferay.portlet.expando.model.ExpandoValueSoap addValue(
85          long columnId, long rowId, long classPK, java.lang.String data)
86          throws RemoteException {
87          try {
88              com.liferay.portlet.expando.model.ExpandoValue returnValue = ExpandoValueServiceUtil.addValue(columnId,
89                      rowId, classPK, data);
90  
91              return com.liferay.portlet.expando.model.ExpandoValueSoap.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 deleteColumnValues(long columnId)
101         throws RemoteException {
102         try {
103             ExpandoValueServiceUtil.deleteColumnValues(columnId);
104         }
105         catch (Exception e) {
106             _log.error(e, e);
107 
108             throw new RemoteException(e.getMessage());
109         }
110     }
111 
112     public static void deleteRowValues(long rowId) throws RemoteException {
113         try {
114             ExpandoValueServiceUtil.deleteRowValues(rowId);
115         }
116         catch (Exception e) {
117             _log.error(e, e);
118 
119             throw new RemoteException(e.getMessage());
120         }
121     }
122 
123     public static void deleteTableValues(long tableId)
124         throws RemoteException {
125         try {
126             ExpandoValueServiceUtil.deleteTableValues(tableId);
127         }
128         catch (Exception e) {
129             _log.error(e, e);
130 
131             throw new RemoteException(e.getMessage());
132         }
133     }
134 
135     public static void deleteValue(long valueId) throws RemoteException {
136         try {
137             ExpandoValueServiceUtil.deleteValue(valueId);
138         }
139         catch (Exception e) {
140             _log.error(e, e);
141 
142             throw new RemoteException(e.getMessage());
143         }
144     }
145 
146     public static void deleteValues(java.lang.String className, long classPK)
147         throws RemoteException {
148         try {
149             ExpandoValueServiceUtil.deleteValues(className, classPK);
150         }
151         catch (Exception e) {
152             _log.error(e, e);
153 
154             throw new RemoteException(e.getMessage());
155         }
156     }
157 
158     public static void deleteValues(long classNameId, long classPK)
159         throws RemoteException {
160         try {
161             ExpandoValueServiceUtil.deleteValues(classNameId, classPK);
162         }
163         catch (Exception e) {
164             _log.error(e, e);
165 
166             throw new RemoteException(e.getMessage());
167         }
168     }
169 
170     public static com.liferay.portlet.expando.model.ExpandoValueSoap[] getColumnValues(
171         long columnId, int begin, int end) throws RemoteException {
172         try {
173             java.util.List<com.liferay.portlet.expando.model.ExpandoValue> returnValue =
174                 ExpandoValueServiceUtil.getColumnValues(columnId, begin, end);
175 
176             return com.liferay.portlet.expando.model.ExpandoValueSoap.toSoapModels(returnValue);
177         }
178         catch (Exception e) {
179             _log.error(e, e);
180 
181             throw new RemoteException(e.getMessage());
182         }
183     }
184 
185     public static com.liferay.portlet.expando.model.ExpandoValueSoap[] getColumnValues(
186         java.lang.String className, java.lang.String tableName,
187         java.lang.String columnName, int begin, int end)
188         throws RemoteException {
189         try {
190             java.util.List<com.liferay.portlet.expando.model.ExpandoValue> returnValue =
191                 ExpandoValueServiceUtil.getColumnValues(className, tableName,
192                     columnName, begin, end);
193 
194             return com.liferay.portlet.expando.model.ExpandoValueSoap.toSoapModels(returnValue);
195         }
196         catch (Exception e) {
197             _log.error(e, e);
198 
199             throw new RemoteException(e.getMessage());
200         }
201     }
202 
203     public static com.liferay.portlet.expando.model.ExpandoValueSoap[] getColumnValues(
204         long classNameId, java.lang.String tableName,
205         java.lang.String columnName, int begin, int end)
206         throws RemoteException {
207         try {
208             java.util.List<com.liferay.portlet.expando.model.ExpandoValue> returnValue =
209                 ExpandoValueServiceUtil.getColumnValues(classNameId, tableName,
210                     columnName, begin, end);
211 
212             return com.liferay.portlet.expando.model.ExpandoValueSoap.toSoapModels(returnValue);
213         }
214         catch (Exception e) {
215             _log.error(e, e);
216 
217             throw new RemoteException(e.getMessage());
218         }
219     }
220 
221     public static int getColumnValuesCount(long columnId)
222         throws RemoteException {
223         try {
224             int returnValue = ExpandoValueServiceUtil.getColumnValuesCount(columnId);
225 
226             return returnValue;
227         }
228         catch (Exception e) {
229             _log.error(e, e);
230 
231             throw new RemoteException(e.getMessage());
232         }
233     }
234 
235     public static int getColumnValuesCount(java.lang.String className,
236         java.lang.String tableName, java.lang.String columnName)
237         throws RemoteException {
238         try {
239             int returnValue = ExpandoValueServiceUtil.getColumnValuesCount(className,
240                     tableName, columnName);
241 
242             return 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 getColumnValuesCount(long classNameId,
252         java.lang.String tableName, java.lang.String columnName)
253         throws RemoteException {
254         try {
255             int returnValue = ExpandoValueServiceUtil.getColumnValuesCount(classNameId,
256                     tableName, columnName);
257 
258             return returnValue;
259         }
260         catch (Exception e) {
261             _log.error(e, e);
262 
263             throw new RemoteException(e.getMessage());
264         }
265     }
266 
267     public static com.liferay.portlet.expando.model.ExpandoValueSoap[] getDefaultTableColumnValues(
268         java.lang.String className, java.lang.String columnName, int begin,
269         int end) throws RemoteException {
270         try {
271             java.util.List<com.liferay.portlet.expando.model.ExpandoValue> returnValue =
272                 ExpandoValueServiceUtil.getDefaultTableColumnValues(className,
273                     columnName, begin, end);
274 
275             return com.liferay.portlet.expando.model.ExpandoValueSoap.toSoapModels(returnValue);
276         }
277         catch (Exception e) {
278             _log.error(e, e);
279 
280             throw new RemoteException(e.getMessage());
281         }
282     }
283 
284     public static com.liferay.portlet.expando.model.ExpandoValueSoap[] getDefaultTableColumnValues(
285         long classNameId, java.lang.String columnName, int begin, int end)
286         throws RemoteException {
287         try {
288             java.util.List<com.liferay.portlet.expando.model.ExpandoValue> returnValue =
289                 ExpandoValueServiceUtil.getDefaultTableColumnValues(classNameId,
290                     columnName, begin, end);
291 
292             return com.liferay.portlet.expando.model.ExpandoValueSoap.toSoapModels(returnValue);
293         }
294         catch (Exception e) {
295             _log.error(e, e);
296 
297             throw new RemoteException(e.getMessage());
298         }
299     }
300 
301     public static int getDefaultTableColumnValuesCount(
302         java.lang.String className, java.lang.String columnName)
303         throws RemoteException {
304         try {
305             int returnValue = ExpandoValueServiceUtil.getDefaultTableColumnValuesCount(className,
306                     columnName);
307 
308             return returnValue;
309         }
310         catch (Exception e) {
311             _log.error(e, e);
312 
313             throw new RemoteException(e.getMessage());
314         }
315     }
316 
317     public static int getDefaultTableColumnValuesCount(long classNameId,
318         java.lang.String columnName) throws RemoteException {
319         try {
320             int returnValue = ExpandoValueServiceUtil.getDefaultTableColumnValuesCount(classNameId,
321                     columnName);
322 
323             return returnValue;
324         }
325         catch (Exception e) {
326             _log.error(e, e);
327 
328             throw new RemoteException(e.getMessage());
329         }
330     }
331 
332     public static com.liferay.portlet.expando.model.ExpandoValueSoap[] getRowValues(
333         long rowId) throws RemoteException {
334         try {
335             java.util.List<com.liferay.portlet.expando.model.ExpandoValue> returnValue =
336                 ExpandoValueServiceUtil.getRowValues(rowId);
337 
338             return com.liferay.portlet.expando.model.ExpandoValueSoap.toSoapModels(returnValue);
339         }
340         catch (Exception e) {
341             _log.error(e, e);
342 
343             throw new RemoteException(e.getMessage());
344         }
345     }
346 
347     public static com.liferay.portlet.expando.model.ExpandoValueSoap[] getRowValues(
348         long rowId, int begin, int end) throws RemoteException {
349         try {
350             java.util.List<com.liferay.portlet.expando.model.ExpandoValue> returnValue =
351                 ExpandoValueServiceUtil.getRowValues(rowId, begin, end);
352 
353             return com.liferay.portlet.expando.model.ExpandoValueSoap.toSoapModels(returnValue);
354         }
355         catch (Exception e) {
356             _log.error(e, e);
357 
358             throw new RemoteException(e.getMessage());
359         }
360     }
361 
362     public static int getRowValuesCount(long rowId) throws RemoteException {
363         try {
364             int returnValue = ExpandoValueServiceUtil.getRowValuesCount(rowId);
365 
366             return returnValue;
367         }
368         catch (Exception e) {
369             _log.error(e, e);
370 
371             throw new RemoteException(e.getMessage());
372         }
373     }
374 
375     public static com.liferay.portlet.expando.model.ExpandoValueSoap getValue(
376         long valueId) throws RemoteException {
377         try {
378             com.liferay.portlet.expando.model.ExpandoValue returnValue = ExpandoValueServiceUtil.getValue(valueId);
379 
380             return com.liferay.portlet.expando.model.ExpandoValueSoap.toSoapModel(returnValue);
381         }
382         catch (Exception e) {
383             _log.error(e, e);
384 
385             throw new RemoteException(e.getMessage());
386         }
387     }
388 
389     public static com.liferay.portlet.expando.model.ExpandoValueSoap getValue(
390         long columnId, long rowId) throws RemoteException {
391         try {
392             com.liferay.portlet.expando.model.ExpandoValue returnValue = ExpandoValueServiceUtil.getValue(columnId,
393                     rowId);
394 
395             return com.liferay.portlet.expando.model.ExpandoValueSoap.toSoapModel(returnValue);
396         }
397         catch (Exception e) {
398             _log.error(e, e);
399 
400             throw new RemoteException(e.getMessage());
401         }
402     }
403 
404     public static com.liferay.portlet.expando.model.ExpandoValueSoap getValue(
405         java.lang.String className, java.lang.String tableName,
406         java.lang.String name, long rowId) throws RemoteException {
407         try {
408             com.liferay.portlet.expando.model.ExpandoValue returnValue = ExpandoValueServiceUtil.getValue(className,
409                     tableName, name, rowId);
410 
411             return com.liferay.portlet.expando.model.ExpandoValueSoap.toSoapModel(returnValue);
412         }
413         catch (Exception e) {
414             _log.error(e, e);
415 
416             throw new RemoteException(e.getMessage());
417         }
418     }
419 
420     public static com.liferay.portlet.expando.model.ExpandoValueSoap getValue(
421         long classNameId, java.lang.String tableName, java.lang.String name,
422         long rowId) throws RemoteException {
423         try {
424             com.liferay.portlet.expando.model.ExpandoValue returnValue = ExpandoValueServiceUtil.getValue(classNameId,
425                     tableName, name, rowId);
426 
427             return com.liferay.portlet.expando.model.ExpandoValueSoap.toSoapModel(returnValue);
428         }
429         catch (Exception e) {
430             _log.error(e, e);
431 
432             throw new RemoteException(e.getMessage());
433         }
434     }
435 
436     private static Log _log = LogFactoryUtil.getLog(ExpandoValueServiceSoap.class);
437 }