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.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.service.TagsAssetServiceUtil
79   * @see com.liferay.portlet.tags.service.http.TagsAssetServiceHttp
80   * @see com.liferay.portlet.tags.service.model.TagsAssetSoap
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 java.lang.String getAssetsRSS(long groupId,
110         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 max,
115         java.lang.String type, double version, java.lang.String displayStyle,
116         java.lang.String feedURL, java.lang.String entryURL)
117         throws RemoteException {
118         try {
119             java.lang.String returnValue = TagsAssetServiceUtil.getAssetsRSS(groupId,
120                     classNameIds, entryIds, notEntryIds, andOperator,
121                     orderByCol1, orderByCol2, orderByType1, orderByType2,
122                     excludeZeroViewCount, publishDate, expirationDate, max,
123                     type, version, displayStyle, feedURL, entryURL);
124 
125             return returnValue;
126         }
127         catch (Exception e) {
128             _log.error(e, e);
129 
130             throw new RemoteException(e.getMessage());
131         }
132     }
133 
134     public static com.liferay.portlet.tags.model.TagsAssetType[] getAssetTypes(
135         java.lang.String languageId) throws RemoteException {
136         try {
137             com.liferay.portlet.tags.model.TagsAssetType[] returnValue = TagsAssetServiceUtil.getAssetTypes(languageId);
138 
139             return returnValue;
140         }
141         catch (Exception e) {
142             _log.error(e, e);
143 
144             throw new RemoteException(e.getMessage());
145         }
146     }
147 
148     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
149         long companyId, int start, int end, java.lang.String languageId)
150         throws RemoteException {
151         try {
152             com.liferay.portlet.tags.model.TagsAssetDisplay[] returnValue = TagsAssetServiceUtil.getCompanyAssetDisplays(companyId,
153                     start, end, languageId);
154 
155             return returnValue;
156         }
157         catch (Exception e) {
158             _log.error(e, e);
159 
160             throw new RemoteException(e.getMessage());
161         }
162     }
163 
164     public static com.liferay.portlet.tags.model.TagsAssetSoap[] getCompanyAssets(
165         long companyId, int start, int end) throws RemoteException {
166         try {
167             java.util.List<com.liferay.portlet.tags.model.TagsAsset> returnValue =
168                 TagsAssetServiceUtil.getCompanyAssets(companyId, start, end);
169 
170             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModels(returnValue);
171         }
172         catch (Exception e) {
173             _log.error(e, e);
174 
175             throw new RemoteException(e.getMessage());
176         }
177     }
178 
179     public static int getCompanyAssetsCount(long companyId)
180         throws RemoteException {
181         try {
182             int returnValue = TagsAssetServiceUtil.getCompanyAssetsCount(companyId);
183 
184             return returnValue;
185         }
186         catch (Exception e) {
187             _log.error(e, e);
188 
189             throw new RemoteException(e.getMessage());
190         }
191     }
192 
193     public static java.lang.String getCompanyAssetsRSS(long companyId, int max,
194         java.lang.String type, double version, java.lang.String displayStyle,
195         java.lang.String feedURL, java.lang.String entryURL)
196         throws RemoteException {
197         try {
198             java.lang.String returnValue = TagsAssetServiceUtil.getCompanyAssetsRSS(companyId,
199                     max, type, version, displayStyle, feedURL, entryURL);
200 
201             return returnValue;
202         }
203         catch (Exception e) {
204             _log.error(e, e);
205 
206             throw new RemoteException(e.getMessage());
207         }
208     }
209 
210     public static com.liferay.portlet.tags.model.TagsAssetSoap incrementViewCounter(
211         java.lang.String className, long classPK) throws RemoteException {
212         try {
213             com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.incrementViewCounter(className,
214                     classPK);
215 
216             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModel(returnValue);
217         }
218         catch (Exception e) {
219             _log.error(e, e);
220 
221             throw new RemoteException(e.getMessage());
222         }
223     }
224 
225     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
226         long companyId, java.lang.String portletId, java.lang.String keywords,
227         java.lang.String languageId, int start, int end)
228         throws RemoteException {
229         try {
230             com.liferay.portlet.tags.model.TagsAssetDisplay[] returnValue = TagsAssetServiceUtil.searchAssetDisplays(companyId,
231                     portletId, keywords, languageId, start, end);
232 
233             return returnValue;
234         }
235         catch (Exception e) {
236             _log.error(e, e);
237 
238             throw new RemoteException(e.getMessage());
239         }
240     }
241 
242     public static int searchAssetDisplaysCount(long companyId,
243         java.lang.String portletId, java.lang.String keywords,
244         java.lang.String languageId) throws RemoteException {
245         try {
246             int returnValue = TagsAssetServiceUtil.searchAssetDisplaysCount(companyId,
247                     portletId, keywords, languageId);
248 
249             return returnValue;
250         }
251         catch (Exception e) {
252             _log.error(e, e);
253 
254             throw new RemoteException(e.getMessage());
255         }
256     }
257 
258     public static com.liferay.portlet.tags.model.TagsAssetSoap updateAsset(
259         long groupId, java.lang.String className, long classPK,
260         java.lang.String[] entryNames, java.util.Date startDate,
261         java.util.Date endDate, java.util.Date publishDate,
262         java.util.Date expirationDate, java.lang.String mimeType,
263         java.lang.String title, java.lang.String description,
264         java.lang.String summary, java.lang.String url, int height, int width,
265         java.lang.Integer priority) throws RemoteException {
266         try {
267             com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.updateAsset(groupId,
268                     className, classPK, entryNames, startDate, endDate,
269                     publishDate, expirationDate, mimeType, title, description,
270                     summary, url, height, width, priority);
271 
272             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModel(returnValue);
273         }
274         catch (Exception e) {
275             _log.error(e, e);
276 
277             throw new RemoteException(e.getMessage());
278         }
279     }
280 
281     private static Log _log = LogFactoryUtil.getLog(TagsAssetServiceSoap.class);
282 }