1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.asset.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.asset.service.AssetEntryServiceUtil;
21  
22  import java.rmi.RemoteException;
23  
24  /**
25   * <a href="AssetEntryServiceSoap.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.asset.service.AssetEntryServiceUtil} 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.asset.model.AssetEntrySoap}.
44   * If the method in the service utility returns a
45   * {@link com.liferay.portlet.asset.model.AssetEntry}, that is translated to a
46   * {@link com.liferay.portlet.asset.model.AssetEntrySoap}. 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       AssetEntryServiceHttp
70   * @see       com.liferay.portlet.asset.model.AssetEntrySoap
71   * @see       com.liferay.portlet.asset.service.AssetEntryServiceUtil
72   * @generated
73   */
74  public class AssetEntryServiceSoap {
75      public static void deleteEntry(long entryId) throws RemoteException {
76          try {
77              AssetEntryServiceUtil.deleteEntry(entryId);
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.asset.model.AssetEntrySoap[] getCompanyEntries(
87          long companyId, int start, int end) throws RemoteException {
88          try {
89              java.util.List<com.liferay.portlet.asset.model.AssetEntry> returnValue =
90                  AssetEntryServiceUtil.getCompanyEntries(companyId, start, end);
91  
92              return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModels(returnValue);
93          }
94          catch (Exception e) {
95              _log.error(e, e);
96  
97              throw new RemoteException(e.getMessage());
98          }
99      }
100 
101     public static int getCompanyEntriesCount(long companyId)
102         throws RemoteException {
103         try {
104             int returnValue = AssetEntryServiceUtil.getCompanyEntriesCount(companyId);
105 
106             return returnValue;
107         }
108         catch (Exception e) {
109             _log.error(e, e);
110 
111             throw new RemoteException(e.getMessage());
112         }
113     }
114 
115     public static java.lang.String getCompanyEntriesRSS(long companyId,
116         int max, java.lang.String type, double version,
117         java.lang.String displayStyle, java.lang.String feedURL,
118         java.lang.String tagURL) throws RemoteException {
119         try {
120             java.lang.String returnValue = AssetEntryServiceUtil.getCompanyEntriesRSS(companyId,
121                     max, type, version, displayStyle, feedURL, tagURL);
122 
123             return returnValue;
124         }
125         catch (Exception e) {
126             _log.error(e, e);
127 
128             throw new RemoteException(e.getMessage());
129         }
130     }
131 
132     public static com.liferay.portlet.asset.model.AssetEntryDisplay[] getCompanyEntryDisplays(
133         long companyId, int start, int end, java.lang.String languageId)
134         throws RemoteException {
135         try {
136             com.liferay.portlet.asset.model.AssetEntryDisplay[] returnValue = AssetEntryServiceUtil.getCompanyEntryDisplays(companyId,
137                     start, end, 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.asset.model.AssetEntrySoap[] getEntries(
149         com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
150         throws RemoteException {
151         try {
152             java.util.List<com.liferay.portlet.asset.model.AssetEntry> returnValue =
153                 AssetEntryServiceUtil.getEntries(entryQuery);
154 
155             return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModels(returnValue);
156         }
157         catch (Exception e) {
158             _log.error(e, e);
159 
160             throw new RemoteException(e.getMessage());
161         }
162     }
163 
164     public static int getEntriesCount(
165         com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
166         throws RemoteException {
167         try {
168             int returnValue = AssetEntryServiceUtil.getEntriesCount(entryQuery);
169 
170             return returnValue;
171         }
172         catch (Exception e) {
173             _log.error(e, e);
174 
175             throw new RemoteException(e.getMessage());
176         }
177     }
178 
179     public static java.lang.String getEntriesRSS(
180         com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery,
181         java.lang.String name, java.lang.String type, double version,
182         java.lang.String displayStyle, java.lang.String feedURL,
183         java.lang.String tagURL) throws RemoteException {
184         try {
185             java.lang.String returnValue = AssetEntryServiceUtil.getEntriesRSS(entryQuery,
186                     name, type, version, displayStyle, feedURL, tagURL);
187 
188             return returnValue;
189         }
190         catch (Exception e) {
191             _log.error(e, e);
192 
193             throw new RemoteException(e.getMessage());
194         }
195     }
196 
197     public static com.liferay.portlet.asset.model.AssetEntrySoap getEntry(
198         long entryId) throws RemoteException {
199         try {
200             com.liferay.portlet.asset.model.AssetEntry returnValue = AssetEntryServiceUtil.getEntry(entryId);
201 
202             return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModel(returnValue);
203         }
204         catch (Exception e) {
205             _log.error(e, e);
206 
207             throw new RemoteException(e.getMessage());
208         }
209     }
210 
211     public static void incrementViewCounter(java.lang.String className,
212         long classPK) throws RemoteException {
213         try {
214             AssetEntryServiceUtil.incrementViewCounter(className, classPK);
215         }
216         catch (Exception e) {
217             _log.error(e, e);
218 
219             throw new RemoteException(e.getMessage());
220         }
221     }
222 
223     public static com.liferay.portlet.asset.model.AssetEntryDisplay[] searchEntryDisplays(
224         long companyId, java.lang.String portletId, java.lang.String keywords,
225         java.lang.String languageId, int start, int end)
226         throws RemoteException {
227         try {
228             com.liferay.portlet.asset.model.AssetEntryDisplay[] returnValue = AssetEntryServiceUtil.searchEntryDisplays(companyId,
229                     portletId, keywords, languageId, start, end);
230 
231             return returnValue;
232         }
233         catch (Exception e) {
234             _log.error(e, e);
235 
236             throw new RemoteException(e.getMessage());
237         }
238     }
239 
240     public static int searchEntryDisplaysCount(long companyId,
241         java.lang.String portletId, java.lang.String keywords,
242         java.lang.String languageId) throws RemoteException {
243         try {
244             int returnValue = AssetEntryServiceUtil.searchEntryDisplaysCount(companyId,
245                     portletId, keywords, languageId);
246 
247             return returnValue;
248         }
249         catch (Exception e) {
250             _log.error(e, e);
251 
252             throw new RemoteException(e.getMessage());
253         }
254     }
255 
256     public static com.liferay.portlet.asset.model.AssetEntrySoap updateEntry(
257         long groupId, java.lang.String className, long classPK,
258         long[] categoryIds, java.lang.String[] tagNames, boolean visible,
259         java.util.Date startDate, java.util.Date endDate,
260         java.util.Date publishDate, java.util.Date expirationDate,
261         java.lang.String mimeType, java.lang.String title,
262         java.lang.String description, java.lang.String summary,
263         java.lang.String url, int height, int width,
264         java.lang.Integer priority, boolean sync) throws RemoteException {
265         try {
266             com.liferay.portlet.asset.model.AssetEntry returnValue = AssetEntryServiceUtil.updateEntry(groupId,
267                     className, classPK, categoryIds, tagNames, visible,
268                     startDate, endDate, publishDate, expirationDate, mimeType,
269                     title, description, summary, url, height, width, priority,
270                     sync);
271 
272             return com.liferay.portlet.asset.model.AssetEntrySoap.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(AssetEntryServiceSoap.class);
282 }