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 type, double version, java.lang.String displayStyle,
182         java.lang.String feedURL, java.lang.String tagURL)
183         throws RemoteException {
184         try {
185             java.lang.String returnValue = AssetEntryServiceUtil.getEntriesRSS(entryQuery,
186                     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 com.liferay.portlet.asset.model.AssetEntrySoap incrementViewCounter(
212         java.lang.String className, long classPK) throws RemoteException {
213         try {
214             com.liferay.portlet.asset.model.AssetEntry returnValue = AssetEntryServiceUtil.incrementViewCounter(className,
215                     classPK);
216 
217             return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModel(returnValue);
218         }
219         catch (Exception e) {
220             _log.error(e, e);
221 
222             throw new RemoteException(e.getMessage());
223         }
224     }
225 
226     public static com.liferay.portlet.asset.model.AssetEntryDisplay[] searchEntryDisplays(
227         long companyId, java.lang.String portletId, java.lang.String keywords,
228         java.lang.String languageId, int start, int end)
229         throws RemoteException {
230         try {
231             com.liferay.portlet.asset.model.AssetEntryDisplay[] returnValue = AssetEntryServiceUtil.searchEntryDisplays(companyId,
232                     portletId, keywords, languageId, start, end);
233 
234             return returnValue;
235         }
236         catch (Exception e) {
237             _log.error(e, e);
238 
239             throw new RemoteException(e.getMessage());
240         }
241     }
242 
243     public static int searchEntryDisplaysCount(long companyId,
244         java.lang.String portletId, java.lang.String keywords,
245         java.lang.String languageId) throws RemoteException {
246         try {
247             int returnValue = AssetEntryServiceUtil.searchEntryDisplaysCount(companyId,
248                     portletId, keywords, languageId);
249 
250             return returnValue;
251         }
252         catch (Exception e) {
253             _log.error(e, e);
254 
255             throw new RemoteException(e.getMessage());
256         }
257     }
258 
259     public static com.liferay.portlet.asset.model.AssetEntrySoap updateEntry(
260         long groupId, java.lang.String className, long classPK,
261         long[] categoryIds, java.lang.String[] tagNames, boolean visible,
262         java.util.Date startDate, java.util.Date endDate,
263         java.util.Date publishDate, java.util.Date expirationDate,
264         java.lang.String mimeType, java.lang.String title,
265         java.lang.String description, java.lang.String summary,
266         java.lang.String url, int height, int width,
267         java.lang.Integer priority, boolean sync) throws RemoteException {
268         try {
269             com.liferay.portlet.asset.model.AssetEntry returnValue = AssetEntryServiceUtil.updateEntry(groupId,
270                     className, classPK, categoryIds, tagNames, visible,
271                     startDate, endDate, publishDate, expirationDate, mimeType,
272                     title, description, summary, url, height, width, priority,
273                     sync);
274 
275             return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModel(returnValue);
276         }
277         catch (Exception e) {
278             _log.error(e, e);
279 
280             throw new RemoteException(e.getMessage());
281         }
282     }
283 
284     private static Log _log = LogFactoryUtil.getLog(AssetEntryServiceSoap.class);
285 }