1   /**
2    * Copyright (c) 2000-2009 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.TagsAssetServiceUtil;
29  
30  import java.rmi.RemoteException;
31  
32  /**
33   * <a href="TagsAssetServiceSoap.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.TagsAssetServiceUtil</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.TagsAssetSoap</code>. If the method in the
53   * service utility returns a <code>com.liferay.portlet.tags.model.TagsAsset</code>,
54   * that is translated to a <code>com.liferay.portlet.tags.model.TagsAssetSoap</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.model.TagsAssetSoap
79   * @see com.liferay.portlet.tags.service.TagsAssetServiceUtil
80   * @see com.liferay.portlet.tags.service.http.TagsAssetServiceHttp
81   *
82   */
83  public class TagsAssetServiceSoap {
84      public static void deleteAsset(long assetId) throws RemoteException {
85          try {
86              TagsAssetServiceUtil.deleteAsset(assetId);
87          }
88          catch (Exception e) {
89              _log.error(e, e);
90  
91              throw new RemoteException(e.getMessage());
92          }
93      }
94  
95      public static com.liferay.portlet.tags.model.TagsAssetSoap getAsset(
96          long assetId) throws RemoteException {
97          try {
98              com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.getAsset(assetId);
99  
100             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModel(returnValue);
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.tags.model.TagsAssetSoap[] getAssets(
110         long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
111         boolean andOperator, java.lang.String orderByCol1,
112         java.lang.String orderByCol2, java.lang.String orderByType1,
113         java.lang.String orderByType2, boolean excludeZeroViewCount,
114         java.util.Date publishDate, java.util.Date expirationDate, int start,
115         int end) throws RemoteException {
116         try {
117             java.util.List<com.liferay.portlet.tags.model.TagsAsset> returnValue =
118                 TagsAssetServiceUtil.getAssets(groupId, classNameIds, entryIds,
119                     notEntryIds, andOperator, orderByCol1, orderByCol2,
120                     orderByType1, orderByType2, excludeZeroViewCount,
121                     publishDate, expirationDate, start, end);
122 
123             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModels(returnValue);
124         }
125         catch (Exception e) {
126             _log.error(e, e);
127 
128             throw new RemoteException(e.getMessage());
129         }
130     }
131 
132     public static int getAssetsCount(long groupId, long[] classNameIds,
133         long[] entryIds, long[] notEntryIds, boolean andOperator,
134         boolean excludeZeroViewCount, java.util.Date publishDate,
135         java.util.Date expirationDate) throws RemoteException {
136         try {
137             int returnValue = TagsAssetServiceUtil.getAssetsCount(groupId,
138                     classNameIds, entryIds, notEntryIds, andOperator,
139                     excludeZeroViewCount, publishDate, expirationDate);
140 
141             return returnValue;
142         }
143         catch (Exception e) {
144             _log.error(e, e);
145 
146             throw new RemoteException(e.getMessage());
147         }
148     }
149 
150     public static java.lang.String getAssetsRSS(long groupId,
151         long[] classNameIds, long[] entryIds, long[] notEntryIds,
152         boolean andOperator, java.lang.String orderByCol1,
153         java.lang.String orderByCol2, java.lang.String orderByType1,
154         java.lang.String orderByType2, boolean excludeZeroViewCount,
155         java.util.Date publishDate, java.util.Date expirationDate, int max,
156         java.lang.String type, double version, java.lang.String displayStyle,
157         java.lang.String feedURL, java.lang.String entryURL)
158         throws RemoteException {
159         try {
160             java.lang.String returnValue = TagsAssetServiceUtil.getAssetsRSS(groupId,
161                     classNameIds, entryIds, notEntryIds, andOperator,
162                     orderByCol1, orderByCol2, orderByType1, orderByType2,
163                     excludeZeroViewCount, publishDate, expirationDate, max,
164                     type, version, displayStyle, feedURL, entryURL);
165 
166             return 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.tags.model.TagsAssetType[] getAssetTypes(
176         java.lang.String languageId) throws RemoteException {
177         try {
178             com.liferay.portlet.tags.model.TagsAssetType[] returnValue = TagsAssetServiceUtil.getAssetTypes(languageId);
179 
180             return returnValue;
181         }
182         catch (Exception e) {
183             _log.error(e, e);
184 
185             throw new RemoteException(e.getMessage());
186         }
187     }
188 
189     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
190         long companyId, int start, int end, java.lang.String languageId)
191         throws RemoteException {
192         try {
193             com.liferay.portlet.tags.model.TagsAssetDisplay[] returnValue = TagsAssetServiceUtil.getCompanyAssetDisplays(companyId,
194                     start, end, languageId);
195 
196             return returnValue;
197         }
198         catch (Exception e) {
199             _log.error(e, e);
200 
201             throw new RemoteException(e.getMessage());
202         }
203     }
204 
205     public static com.liferay.portlet.tags.model.TagsAssetSoap[] getCompanyAssets(
206         long companyId, int start, int end) throws RemoteException {
207         try {
208             java.util.List<com.liferay.portlet.tags.model.TagsAsset> returnValue =
209                 TagsAssetServiceUtil.getCompanyAssets(companyId, start, end);
210 
211             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModels(returnValue);
212         }
213         catch (Exception e) {
214             _log.error(e, e);
215 
216             throw new RemoteException(e.getMessage());
217         }
218     }
219 
220     public static int getCompanyAssetsCount(long companyId)
221         throws RemoteException {
222         try {
223             int returnValue = TagsAssetServiceUtil.getCompanyAssetsCount(companyId);
224 
225             return returnValue;
226         }
227         catch (Exception e) {
228             _log.error(e, e);
229 
230             throw new RemoteException(e.getMessage());
231         }
232     }
233 
234     public static java.lang.String getCompanyAssetsRSS(long companyId, int max,
235         java.lang.String type, double version, java.lang.String displayStyle,
236         java.lang.String feedURL, java.lang.String entryURL)
237         throws RemoteException {
238         try {
239             java.lang.String returnValue = TagsAssetServiceUtil.getCompanyAssetsRSS(companyId,
240                     max, type, version, displayStyle, feedURL, entryURL);
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 com.liferay.portlet.tags.model.TagsAssetSoap incrementViewCounter(
252         java.lang.String className, long classPK) throws RemoteException {
253         try {
254             com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.incrementViewCounter(className,
255                     classPK);
256 
257             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModel(returnValue);
258         }
259         catch (Exception e) {
260             _log.error(e, e);
261 
262             throw new RemoteException(e.getMessage());
263         }
264     }
265 
266     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
267         long companyId, java.lang.String portletId, java.lang.String keywords,
268         java.lang.String languageId, int start, int end)
269         throws RemoteException {
270         try {
271             com.liferay.portlet.tags.model.TagsAssetDisplay[] returnValue = TagsAssetServiceUtil.searchAssetDisplays(companyId,
272                     portletId, keywords, languageId, start, end);
273 
274             return returnValue;
275         }
276         catch (Exception e) {
277             _log.error(e, e);
278 
279             throw new RemoteException(e.getMessage());
280         }
281     }
282 
283     public static int searchAssetDisplaysCount(long companyId,
284         java.lang.String portletId, java.lang.String keywords,
285         java.lang.String languageId) throws RemoteException {
286         try {
287             int returnValue = TagsAssetServiceUtil.searchAssetDisplaysCount(companyId,
288                     portletId, keywords, languageId);
289 
290             return returnValue;
291         }
292         catch (Exception e) {
293             _log.error(e, e);
294 
295             throw new RemoteException(e.getMessage());
296         }
297     }
298 
299     public static com.liferay.portlet.tags.model.TagsAssetSoap updateAsset(
300         long groupId, java.lang.String className, long classPK,
301         java.lang.String[] categoryNames, java.lang.String[] entryNames,
302         boolean visible, java.util.Date startDate, java.util.Date endDate,
303         java.util.Date publishDate, java.util.Date expirationDate,
304         java.lang.String mimeType, java.lang.String title,
305         java.lang.String description, java.lang.String summary,
306         java.lang.String url, int height, int width, java.lang.Integer priority)
307         throws RemoteException {
308         try {
309             com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.updateAsset(groupId,
310                     className, classPK, categoryNames, entryNames, visible,
311                     startDate, endDate, publishDate, expirationDate, mimeType,
312                     title, description, summary, url, height, width, priority);
313 
314             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModel(returnValue);
315         }
316         catch (Exception e) {
317             _log.error(e, e);
318 
319             throw new RemoteException(e.getMessage());
320         }
321     }
322 
323     private static Log _log = LogFactoryUtil.getLog(TagsAssetServiceSoap.class);
324 }