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.ExpandoRowServiceUtil;
29  
30  import java.rmi.RemoteException;
31  
32  /**
33   * <a href="ExpandoRowServiceSoap.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.ExpandoRowServiceUtil</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.ExpandoRowSoap</code>. If the method in the
53   * service utility returns a <code>com.liferay.portlet.expando.model.ExpandoRow</code>,
54   * that is translated to a <code>com.liferay.portlet.expando.model.ExpandoRowSoap</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.ExpandoRowServiceUtil
79   * @see com.liferay.portlet.expando.service.http.ExpandoRowServiceHttp
80   * @see com.liferay.portlet.expando.service.model.ExpandoRowSoap
81   *
82   */
83  public class ExpandoRowServiceSoap {
84      public static com.liferay.portlet.expando.model.ExpandoRowSoap addRow(
85          long tableId) throws RemoteException {
86          try {
87              com.liferay.portlet.expando.model.ExpandoRow returnValue = ExpandoRowServiceUtil.addRow(tableId);
88  
89              return com.liferay.portlet.expando.model.ExpandoRowSoap.toSoapModel(returnValue);
90          }
91          catch (Exception e) {
92              _log.error(e, e);
93  
94              throw new RemoteException(e.getMessage());
95          }
96      }
97  
98      public static void deleteRow(long rowId) throws RemoteException {
99          try {
100             ExpandoRowServiceUtil.deleteRow(rowId);
101         }
102         catch (Exception e) {
103             _log.error(e, e);
104 
105             throw new RemoteException(e.getMessage());
106         }
107     }
108 
109     public static com.liferay.portlet.expando.model.ExpandoRowSoap[] getDefaultTableRows(
110         java.lang.String className, int begin, int end)
111         throws RemoteException {
112         try {
113             java.util.List<com.liferay.portlet.expando.model.ExpandoRow> returnValue =
114                 ExpandoRowServiceUtil.getDefaultTableRows(className, begin, end);
115 
116             return com.liferay.portlet.expando.model.ExpandoRowSoap.toSoapModels(returnValue);
117         }
118         catch (Exception e) {
119             _log.error(e, e);
120 
121             throw new RemoteException(e.getMessage());
122         }
123     }
124 
125     public static com.liferay.portlet.expando.model.ExpandoRowSoap[] getDefaultTableRows(
126         long classNameId, int begin, int end) throws RemoteException {
127         try {
128             java.util.List<com.liferay.portlet.expando.model.ExpandoRow> returnValue =
129                 ExpandoRowServiceUtil.getDefaultTableRows(classNameId, begin,
130                     end);
131 
132             return com.liferay.portlet.expando.model.ExpandoRowSoap.toSoapModels(returnValue);
133         }
134         catch (Exception e) {
135             _log.error(e, e);
136 
137             throw new RemoteException(e.getMessage());
138         }
139     }
140 
141     public static int getDefaultTableRowsCount(java.lang.String className)
142         throws RemoteException {
143         try {
144             int returnValue = ExpandoRowServiceUtil.getDefaultTableRowsCount(className);
145 
146             return returnValue;
147         }
148         catch (Exception e) {
149             _log.error(e, e);
150 
151             throw new RemoteException(e.getMessage());
152         }
153     }
154 
155     public static int getDefaultTableRowsCount(long classNameId)
156         throws RemoteException {
157         try {
158             int returnValue = ExpandoRowServiceUtil.getDefaultTableRowsCount(classNameId);
159 
160             return returnValue;
161         }
162         catch (Exception e) {
163             _log.error(e, e);
164 
165             throw new RemoteException(e.getMessage());
166         }
167     }
168 
169     public static com.liferay.portlet.expando.model.ExpandoRowSoap[] getRows(
170         long tableId, int begin, int end) throws RemoteException {
171         try {
172             java.util.List<com.liferay.portlet.expando.model.ExpandoRow> returnValue =
173                 ExpandoRowServiceUtil.getRows(tableId, begin, end);
174 
175             return com.liferay.portlet.expando.model.ExpandoRowSoap.toSoapModels(returnValue);
176         }
177         catch (Exception e) {
178             _log.error(e, e);
179 
180             throw new RemoteException(e.getMessage());
181         }
182     }
183 
184     public static com.liferay.portlet.expando.model.ExpandoRowSoap[] getRows(
185         java.lang.String className, java.lang.String tableName, int begin,
186         int end) throws RemoteException {
187         try {
188             java.util.List<com.liferay.portlet.expando.model.ExpandoRow> returnValue =
189                 ExpandoRowServiceUtil.getRows(className, tableName, begin, end);
190 
191             return com.liferay.portlet.expando.model.ExpandoRowSoap.toSoapModels(returnValue);
192         }
193         catch (Exception e) {
194             _log.error(e, e);
195 
196             throw new RemoteException(e.getMessage());
197         }
198     }
199 
200     public static com.liferay.portlet.expando.model.ExpandoRowSoap[] getRows(
201         long classNameId, java.lang.String tableName, int begin, int end)
202         throws RemoteException {
203         try {
204             java.util.List<com.liferay.portlet.expando.model.ExpandoRow> returnValue =
205                 ExpandoRowServiceUtil.getRows(classNameId, tableName, begin, end);
206 
207             return com.liferay.portlet.expando.model.ExpandoRowSoap.toSoapModels(returnValue);
208         }
209         catch (Exception e) {
210             _log.error(e, e);
211 
212             throw new RemoteException(e.getMessage());
213         }
214     }
215 
216     public static int getRowsCount(long tableId) throws RemoteException {
217         try {
218             int returnValue = ExpandoRowServiceUtil.getRowsCount(tableId);
219 
220             return returnValue;
221         }
222         catch (Exception e) {
223             _log.error(e, e);
224 
225             throw new RemoteException(e.getMessage());
226         }
227     }
228 
229     public static int getRowsCount(java.lang.String className,
230         java.lang.String tableName) throws RemoteException {
231         try {
232             int returnValue = ExpandoRowServiceUtil.getRowsCount(className,
233                     tableName);
234 
235             return returnValue;
236         }
237         catch (Exception e) {
238             _log.error(e, e);
239 
240             throw new RemoteException(e.getMessage());
241         }
242     }
243 
244     public static int getRowsCount(long classNameId, java.lang.String tableName)
245         throws RemoteException {
246         try {
247             int returnValue = ExpandoRowServiceUtil.getRowsCount(classNameId,
248                     tableName);
249 
250             return returnValue;
251         }
252         catch (Exception e) {
253             _log.error(e, e);
254 
255             throw new RemoteException(e.getMessage());
256         }
257     }
258 
259     private static Log _log = LogFactoryUtil.getLog(ExpandoRowServiceSoap.class);
260 }