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.tags.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.tags.service.TagsEntryServiceUtil;
29  
30  import java.rmi.RemoteException;
31  
32  /**
33   * <a href="TagsEntryServiceSoap.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.tags.service.TagsEntryServiceUtil</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.tags.model.TagsEntrySoap</code>. If the method in the
53   * service utility returns a <code>com.liferay.portlet.tags.model.TagsEntry</code>,
54   * that is translated to a <code>com.liferay.portlet.tags.model.TagsEntrySoap</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.tags.service.TagsEntryServiceUtil
79   * @see com.liferay.portlet.tags.service.http.TagsEntryServiceHttp
80   * @see com.liferay.portlet.tags.service.model.TagsEntrySoap
81   *
82   */
83  public class TagsEntryServiceSoap {
84      public static com.liferay.portlet.tags.model.TagsEntrySoap addEntry(
85          java.lang.String name) throws RemoteException {
86          try {
87              com.liferay.portlet.tags.model.TagsEntry returnValue = TagsEntryServiceUtil.addEntry(name);
88  
89              return com.liferay.portlet.tags.model.TagsEntrySoap.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 com.liferay.portlet.tags.model.TagsEntrySoap addEntry(
99          java.lang.String name, java.lang.String[] properties)
100         throws RemoteException {
101         try {
102             com.liferay.portlet.tags.model.TagsEntry returnValue = TagsEntryServiceUtil.addEntry(name,
103                     properties);
104 
105             return com.liferay.portlet.tags.model.TagsEntrySoap.toSoapModel(returnValue);
106         }
107         catch (Exception e) {
108             _log.error(e, e);
109 
110             throw new RemoteException(e.getMessage());
111         }
112     }
113 
114     public static void deleteEntry(long entryId) throws RemoteException {
115         try {
116             TagsEntryServiceUtil.deleteEntry(entryId);
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.tags.model.TagsEntrySoap[] getEntries(
126         java.lang.String className, long classPK) throws RemoteException {
127         try {
128             java.util.List returnValue = TagsEntryServiceUtil.getEntries(className,
129                     classPK);
130 
131             return com.liferay.portlet.tags.model.TagsEntrySoap.toSoapModels(returnValue);
132         }
133         catch (Exception e) {
134             _log.error(e, e);
135 
136             throw new RemoteException(e.getMessage());
137         }
138     }
139 
140     public static com.liferay.portlet.tags.model.TagsEntrySoap[] search(
141         long companyId, java.lang.String name, java.lang.String[] properties)
142         throws RemoteException {
143         try {
144             java.util.List returnValue = TagsEntryServiceUtil.search(companyId,
145                     name, properties);
146 
147             return com.liferay.portlet.tags.model.TagsEntrySoap.toSoapModels(returnValue);
148         }
149         catch (Exception e) {
150             _log.error(e, e);
151 
152             throw new RemoteException(e.getMessage());
153         }
154     }
155 
156     public static com.liferay.portlet.tags.model.TagsEntrySoap[] search(
157         long companyId, java.lang.String name, java.lang.String[] properties,
158         int begin, int end) throws RemoteException {
159         try {
160             java.util.List returnValue = TagsEntryServiceUtil.search(companyId,
161                     name, properties, begin, end);
162 
163             return com.liferay.portlet.tags.model.TagsEntrySoap.toSoapModels(returnValue);
164         }
165         catch (Exception e) {
166             _log.error(e, e);
167 
168             throw new RemoteException(e.getMessage());
169         }
170     }
171 
172     public static com.liferay.portal.kernel.json.JSONArrayWrapper searchAutocomplete(
173         long companyId, java.lang.String name, java.lang.String[] properties,
174         int begin, int end) throws RemoteException {
175         try {
176             com.liferay.portal.kernel.json.JSONArrayWrapper returnValue = TagsEntryServiceUtil.searchAutocomplete(companyId,
177                     name, properties, begin, end);
178 
179             return returnValue;
180         }
181         catch (Exception e) {
182             _log.error(e, e);
183 
184             throw new RemoteException(e.getMessage());
185         }
186     }
187 
188     public static int searchCount(long companyId, java.lang.String name,
189         java.lang.String[] properties) throws RemoteException {
190         try {
191             int returnValue = TagsEntryServiceUtil.searchCount(companyId, name,
192                     properties);
193 
194             return 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.tags.model.TagsEntrySoap updateEntry(
204         long entryId, java.lang.String name) throws RemoteException {
205         try {
206             com.liferay.portlet.tags.model.TagsEntry returnValue = TagsEntryServiceUtil.updateEntry(entryId,
207                     name);
208 
209             return com.liferay.portlet.tags.model.TagsEntrySoap.toSoapModel(returnValue);
210         }
211         catch (Exception e) {
212             _log.error(e, e);
213 
214             throw new RemoteException(e.getMessage());
215         }
216     }
217 
218     public static com.liferay.portlet.tags.model.TagsEntrySoap updateEntry(
219         long entryId, java.lang.String name, java.lang.String[] properties)
220         throws RemoteException {
221         try {
222             com.liferay.portlet.tags.model.TagsEntry returnValue = TagsEntryServiceUtil.updateEntry(entryId,
223                     name, properties);
224 
225             return com.liferay.portlet.tags.model.TagsEntrySoap.toSoapModel(returnValue);
226         }
227         catch (Exception e) {
228             _log.error(e, e);
229 
230             throw new RemoteException(e.getMessage());
231         }
232     }
233 
234     private static Log _log = LogFactoryUtil.getLog(TagsEntryServiceSoap.class);
235 }