1   /**
2    * Copyright (c) 2000-2007 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 overwritten
37   * the next time is generated.
38   * </p>
39   *
40   * <p>
41   * This class provides a SOAP utility for the <code>com.liferay.portlet.tags.service.TagsEntryServiceUtil</code>
42   * service utility. The static methods of this class calls the same methods of the
43   * service utility. However, the signatures are different because it is difficult
44   * for SOAP to support certain types.
45   * </p>
46   *
47   * <p>
48   * ServiceBuilder follows certain rules in translating the methods. For example,
49   * if the method in the service utility returns a <code>java.util.List</code>, that
50   * is translated to an array of <code>com.liferay.portlet.tags.model.TagsEntrySoap</code>.
51   * If the method in the service utility returns a <code>com.liferay.portlet.tags.model.TagsEntry</code>,
52   * that is translated to a <code>com.liferay.portlet.tags.model.TagsEntrySoap</code>.
53   * Methods that SOAP cannot safely wire are skipped.
54   * </p>
55   *
56   * <p>
57   * The benefits of using the SOAP utility is that it is cross platform compatible.
58   * SOAP allows different languages like Java, .NET, C++, PHP, and even Perl, to
59   * call the generated services. One drawback of SOAP is that it is slow because
60   * it needs to serialize all calls into a text format (XML).
61   * </p>
62   *
63   * <p>
64   * You can see a list of services at http://localhost:8080/tunnel-web/secure/axis.
65   * Set the property <code>tunnel.servlet.hosts.allowed</code> in portal.properties
66   * to configure security.
67   * </p>
68   *
69   * <p>
70   * The SOAP utility is only generated for remote services.
71   * </p>
72   *
73   * @author Brian Wing Shun Chan
74   *
75   * @see com.liferay.portlet.tags.service.TagsEntryServiceUtil
76   * @see com.liferay.portlet.tags.service.http.TagsEntryServiceHttp
77   * @see com.liferay.portlet.tags.service.model.TagsEntrySoap
78   *
79   */
80  public class TagsEntryServiceSoap {
81      public static com.liferay.portlet.tags.model.TagsEntrySoap addEntry(
82          java.lang.String name) throws RemoteException {
83          try {
84              com.liferay.portlet.tags.model.TagsEntry returnValue = TagsEntryServiceUtil.addEntry(name);
85  
86              return com.liferay.portlet.tags.model.TagsEntrySoap.toSoapModel(returnValue);
87          }
88          catch (Exception e) {
89              _log.error(e, e);
90              throw new RemoteException(e.getMessage());
91          }
92      }
93  
94      public static com.liferay.portlet.tags.model.TagsEntrySoap addEntry(
95          java.lang.String name, java.lang.String[] properties)
96          throws RemoteException {
97          try {
98              com.liferay.portlet.tags.model.TagsEntry returnValue = TagsEntryServiceUtil.addEntry(name,
99                      properties);
100 
101             return com.liferay.portlet.tags.model.TagsEntrySoap.toSoapModel(returnValue);
102         }
103         catch (Exception e) {
104             _log.error(e, e);
105             throw new RemoteException(e.getMessage());
106         }
107     }
108 
109     public static void deleteEntry(long entryId) throws RemoteException {
110         try {
111             TagsEntryServiceUtil.deleteEntry(entryId);
112         }
113         catch (Exception e) {
114             _log.error(e, e);
115             throw new RemoteException(e.getMessage());
116         }
117     }
118 
119     public static com.liferay.portlet.tags.model.TagsEntrySoap[] getEntries(
120         java.lang.String className, long classPK) throws RemoteException {
121         try {
122             java.util.List returnValue = TagsEntryServiceUtil.getEntries(className,
123                     classPK);
124 
125             return com.liferay.portlet.tags.model.TagsEntrySoap.toSoapModels(returnValue);
126         }
127         catch (Exception e) {
128             _log.error(e, e);
129             throw new RemoteException(e.getMessage());
130         }
131     }
132 
133     public static com.liferay.portlet.tags.model.TagsEntrySoap[] search(
134         long companyId, java.lang.String name, java.lang.String[] properties)
135         throws RemoteException {
136         try {
137             java.util.List returnValue = TagsEntryServiceUtil.search(companyId,
138                     name, properties);
139 
140             return com.liferay.portlet.tags.model.TagsEntrySoap.toSoapModels(returnValue);
141         }
142         catch (Exception e) {
143             _log.error(e, e);
144             throw new RemoteException(e.getMessage());
145         }
146     }
147 
148     public static com.liferay.portlet.tags.model.TagsEntrySoap[] search(
149         long companyId, java.lang.String name, java.lang.String[] properties,
150         int begin, int end) throws RemoteException {
151         try {
152             java.util.List returnValue = TagsEntryServiceUtil.search(companyId,
153                     name, properties, begin, end);
154 
155             return com.liferay.portlet.tags.model.TagsEntrySoap.toSoapModels(returnValue);
156         }
157         catch (Exception e) {
158             _log.error(e, e);
159             throw new RemoteException(e.getMessage());
160         }
161     }
162 
163     public static com.liferay.portal.kernel.json.JSONArrayWrapper searchAutocomplete(
164         long companyId, java.lang.String name, java.lang.String[] properties,
165         int begin, int end) throws RemoteException {
166         try {
167             com.liferay.portal.kernel.json.JSONArrayWrapper returnValue = TagsEntryServiceUtil.searchAutocomplete(companyId,
168                     name, properties, begin, end);
169 
170             return returnValue;
171         }
172         catch (Exception e) {
173             _log.error(e, e);
174             throw new RemoteException(e.getMessage());
175         }
176     }
177 
178     public static int searchCount(long companyId, java.lang.String name,
179         java.lang.String[] properties) throws RemoteException {
180         try {
181             int returnValue = TagsEntryServiceUtil.searchCount(companyId, name,
182                     properties);
183 
184             return returnValue;
185         }
186         catch (Exception e) {
187             _log.error(e, e);
188             throw new RemoteException(e.getMessage());
189         }
190     }
191 
192     public static com.liferay.portlet.tags.model.TagsEntrySoap updateEntry(
193         long entryId, java.lang.String name) throws RemoteException {
194         try {
195             com.liferay.portlet.tags.model.TagsEntry returnValue = TagsEntryServiceUtil.updateEntry(entryId,
196                     name);
197 
198             return com.liferay.portlet.tags.model.TagsEntrySoap.toSoapModel(returnValue);
199         }
200         catch (Exception e) {
201             _log.error(e, e);
202             throw new RemoteException(e.getMessage());
203         }
204     }
205 
206     public static com.liferay.portlet.tags.model.TagsEntrySoap updateEntry(
207         long entryId, java.lang.String name, java.lang.String[] properties)
208         throws RemoteException {
209         try {
210             com.liferay.portlet.tags.model.TagsEntry returnValue = TagsEntryServiceUtil.updateEntry(entryId,
211                     name, properties);
212 
213             return com.liferay.portlet.tags.model.TagsEntrySoap.toSoapModel(returnValue);
214         }
215         catch (Exception e) {
216             _log.error(e, e);
217             throw new RemoteException(e.getMessage());
218         }
219     }
220 
221     private static Log _log = LogFactoryUtil.getLog(TagsEntryServiceSoap.class);
222 }