1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portlet.tags.service.http;
16  
17  import com.liferay.portal.kernel.log.Log;
18  import com.liferay.portal.kernel.log.LogFactoryUtil;
19  
20  import com.liferay.portlet.tags.service.TagsAssetServiceUtil;
21  
22  import java.rmi.RemoteException;
23  
24  /**
25   * <a href="TagsAssetServiceSoap.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * <p>
33   * This class provides a SOAP utility for the
34   * {@link com.liferay.portlet.tags.service.TagsAssetServiceUtil} service utility. The
35   * static methods of this class calls the same methods of the service utility.
36   * However, the signatures are different because it is difficult for SOAP to
37   * support certain types.
38   * </p>
39   *
40   * <p>
41   * ServiceBuilder follows certain rules in translating the methods. For example,
42   * if the method in the service utility returns a {@link java.util.List}, that
43   * is translated to an array of {@link com.liferay.portlet.tags.model.TagsAssetSoap}.
44   * If the method in the service utility returns a
45   * {@link com.liferay.portlet.tags.model.TagsAsset}, that is translated to a
46   * {@link com.liferay.portlet.tags.model.TagsAssetSoap}. Methods that SOAP cannot
47   * safely wire are skipped.
48   * </p>
49   *
50   * <p>
51   * The benefits of using the SOAP utility is that it is cross platform
52   * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
53   * even Perl, to call the generated services. One drawback of SOAP is that it is
54   * slow because it needs to serialize all calls into a text format (XML).
55   * </p>
56   *
57   * <p>
58   * You can see a list of services at
59   * http://localhost:8080/tunnel-web/secure/axis. Set the property
60   * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
61   * security.
62   * </p>
63   *
64   * <p>
65   * The SOAP utility is only generated for remote services.
66   * </p>
67   *
68   * @author    Brian Wing Shun Chan
69   * @see       TagsAssetServiceHttp
70   * @see       com.liferay.portlet.tags.model.TagsAssetSoap
71   * @see       com.liferay.portlet.tags.service.TagsAssetServiceUtil
72   * @generated
73   */
74  public class TagsAssetServiceSoap {
75      public static void deleteAsset(long assetId) throws RemoteException {
76          try {
77              TagsAssetServiceUtil.deleteAsset(assetId);
78          }
79          catch (Exception e) {
80              _log.error(e, e);
81  
82              throw new RemoteException(e.getMessage());
83          }
84      }
85  
86      public static com.liferay.portlet.tags.model.TagsAssetSoap getAsset(
87          long assetId) throws RemoteException {
88          try {
89              com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.getAsset(assetId);
90  
91              return com.liferay.portlet.tags.model.TagsAssetSoap.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 java.lang.String getAssetsRSS(long groupId,
101         long[] classNameIds, long[] entryIds, long[] notEntryIds,
102         boolean andOperator, java.lang.String orderByCol1,
103         java.lang.String orderByCol2, java.lang.String orderByType1,
104         java.lang.String orderByType2, boolean excludeZeroViewCount,
105         java.util.Date publishDate, java.util.Date expirationDate, int max,
106         java.lang.String type, double version, java.lang.String displayStyle,
107         java.lang.String feedURL, java.lang.String entryURL)
108         throws RemoteException {
109         try {
110             java.lang.String returnValue = TagsAssetServiceUtil.getAssetsRSS(groupId,
111                     classNameIds, entryIds, notEntryIds, andOperator,
112                     orderByCol1, orderByCol2, orderByType1, orderByType2,
113                     excludeZeroViewCount, publishDate, expirationDate, max,
114                     type, version, displayStyle, feedURL, entryURL);
115 
116             return 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.tags.model.TagsAssetType[] getAssetTypes(
126         java.lang.String languageId) throws RemoteException {
127         try {
128             com.liferay.portlet.tags.model.TagsAssetType[] returnValue = TagsAssetServiceUtil.getAssetTypes(languageId);
129 
130             return returnValue;
131         }
132         catch (Exception e) {
133             _log.error(e, e);
134 
135             throw new RemoteException(e.getMessage());
136         }
137     }
138 
139     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
140         long companyId, int start, int end, java.lang.String languageId)
141         throws RemoteException {
142         try {
143             com.liferay.portlet.tags.model.TagsAssetDisplay[] returnValue = TagsAssetServiceUtil.getCompanyAssetDisplays(companyId,
144                     start, end, languageId);
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 com.liferay.portlet.tags.model.TagsAssetSoap[] getCompanyAssets(
156         long companyId, int start, int end) throws RemoteException {
157         try {
158             java.util.List<com.liferay.portlet.tags.model.TagsAsset> returnValue =
159                 TagsAssetServiceUtil.getCompanyAssets(companyId, start, end);
160 
161             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModels(returnValue);
162         }
163         catch (Exception e) {
164             _log.error(e, e);
165 
166             throw new RemoteException(e.getMessage());
167         }
168     }
169 
170     public static int getCompanyAssetsCount(long companyId)
171         throws RemoteException {
172         try {
173             int returnValue = TagsAssetServiceUtil.getCompanyAssetsCount(companyId);
174 
175             return returnValue;
176         }
177         catch (Exception e) {
178             _log.error(e, e);
179 
180             throw new RemoteException(e.getMessage());
181         }
182     }
183 
184     public static java.lang.String getCompanyAssetsRSS(long companyId, int max,
185         java.lang.String type, double version, java.lang.String displayStyle,
186         java.lang.String feedURL, java.lang.String entryURL)
187         throws RemoteException {
188         try {
189             java.lang.String returnValue = TagsAssetServiceUtil.getCompanyAssetsRSS(companyId,
190                     max, type, version, displayStyle, feedURL, entryURL);
191 
192             return returnValue;
193         }
194         catch (Exception e) {
195             _log.error(e, e);
196 
197             throw new RemoteException(e.getMessage());
198         }
199     }
200 
201     public static com.liferay.portlet.tags.model.TagsAssetSoap incrementViewCounter(
202         java.lang.String className, long classPK) throws RemoteException {
203         try {
204             com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.incrementViewCounter(className,
205                     classPK);
206 
207             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModel(returnValue);
208         }
209         catch (Exception e) {
210             _log.error(e, e);
211 
212             throw new RemoteException(e.getMessage());
213         }
214     }
215 
216     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
217         long companyId, java.lang.String portletId, java.lang.String keywords,
218         java.lang.String languageId, int start, int end)
219         throws RemoteException {
220         try {
221             com.liferay.portlet.tags.model.TagsAssetDisplay[] returnValue = TagsAssetServiceUtil.searchAssetDisplays(companyId,
222                     portletId, keywords, languageId, start, end);
223 
224             return returnValue;
225         }
226         catch (Exception e) {
227             _log.error(e, e);
228 
229             throw new RemoteException(e.getMessage());
230         }
231     }
232 
233     public static int searchAssetDisplaysCount(long companyId,
234         java.lang.String portletId, java.lang.String keywords,
235         java.lang.String languageId) throws RemoteException {
236         try {
237             int returnValue = TagsAssetServiceUtil.searchAssetDisplaysCount(companyId,
238                     portletId, keywords, languageId);
239 
240             return returnValue;
241         }
242         catch (Exception e) {
243             _log.error(e, e);
244 
245             throw new RemoteException(e.getMessage());
246         }
247     }
248 
249     public static com.liferay.portlet.tags.model.TagsAssetSoap updateAsset(
250         long groupId, java.lang.String className, long classPK,
251         java.lang.String[] entryNames, java.util.Date startDate,
252         java.util.Date endDate, java.util.Date publishDate,
253         java.util.Date expirationDate, java.lang.String mimeType,
254         java.lang.String title, java.lang.String description,
255         java.lang.String summary, java.lang.String url, int height, int width,
256         java.lang.Integer priority) throws RemoteException {
257         try {
258             com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.updateAsset(groupId,
259                     className, classPK, entryNames, startDate, endDate,
260                     publishDate, expirationDate, mimeType, title, description,
261                     summary, url, height, width, priority);
262 
263             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModel(returnValue);
264         }
265         catch (Exception e) {
266             _log.error(e, e);
267 
268             throw new RemoteException(e.getMessage());
269         }
270     }
271 
272     private static Log _log = LogFactoryUtil.getLog(TagsAssetServiceSoap.class);
273 }