001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.asset.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    
020    import com.liferay.portlet.asset.service.AssetEntryServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    /**
025     * <p>
026     * This class provides a SOAP utility for the
027     * {@link com.liferay.portlet.asset.service.AssetEntryServiceUtil} service utility. The
028     * static methods of this class calls the same methods of the service utility.
029     * However, the signatures are different because it is difficult for SOAP to
030     * support certain types.
031     * </p>
032     *
033     * <p>
034     * ServiceBuilder follows certain rules in translating the methods. For example,
035     * if the method in the service utility returns a {@link java.util.List}, that
036     * is translated to an array of {@link com.liferay.portlet.asset.model.AssetEntrySoap}.
037     * If the method in the service utility returns a
038     * {@link com.liferay.portlet.asset.model.AssetEntry}, that is translated to a
039     * {@link com.liferay.portlet.asset.model.AssetEntrySoap}. Methods that SOAP cannot
040     * safely wire are skipped.
041     * </p>
042     *
043     * <p>
044     * The benefits of using the SOAP utility is that it is cross platform
045     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
046     * even Perl, to call the generated services. One drawback of SOAP is that it is
047     * slow because it needs to serialize all calls into a text format (XML).
048     * </p>
049     *
050     * <p>
051     * You can see a list of services at
052     * http://localhost:8080/tunnel-web/secure/axis. Set the property
053     * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
054     * security.
055     * </p>
056     *
057     * <p>
058     * The SOAP utility is only generated for remote services.
059     * </p>
060     *
061     * @author    Brian Wing Shun Chan
062     * @see       AssetEntryServiceHttp
063     * @see       com.liferay.portlet.asset.model.AssetEntrySoap
064     * @see       com.liferay.portlet.asset.service.AssetEntryServiceUtil
065     * @generated
066     */
067    public class AssetEntryServiceSoap {
068            public static void deleteEntry(long entryId) throws RemoteException {
069                    try {
070                            AssetEntryServiceUtil.deleteEntry(entryId);
071                    }
072                    catch (Exception e) {
073                            _log.error(e, e);
074    
075                            throw new RemoteException(e.getMessage());
076                    }
077            }
078    
079            public static com.liferay.portlet.asset.model.AssetEntrySoap[] getCompanyEntries(
080                    long companyId, int start, int end) throws RemoteException {
081                    try {
082                            java.util.List<com.liferay.portlet.asset.model.AssetEntry> returnValue =
083                                    AssetEntryServiceUtil.getCompanyEntries(companyId, start, end);
084    
085                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModels(returnValue);
086                    }
087                    catch (Exception e) {
088                            _log.error(e, e);
089    
090                            throw new RemoteException(e.getMessage());
091                    }
092            }
093    
094            public static int getCompanyEntriesCount(long companyId)
095                    throws RemoteException {
096                    try {
097                            int returnValue = AssetEntryServiceUtil.getCompanyEntriesCount(companyId);
098    
099                            return returnValue;
100                    }
101                    catch (Exception e) {
102                            _log.error(e, e);
103    
104                            throw new RemoteException(e.getMessage());
105                    }
106            }
107    
108            public static java.lang.String getCompanyEntriesRSS(long companyId,
109                    int max, java.lang.String type, double version,
110                    java.lang.String displayStyle, java.lang.String feedURL,
111                    java.lang.String tagURL) throws RemoteException {
112                    try {
113                            java.lang.String returnValue = AssetEntryServiceUtil.getCompanyEntriesRSS(companyId,
114                                            max, type, version, displayStyle, feedURL, tagURL);
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.asset.model.AssetEntryDisplay[] getCompanyEntryDisplays(
126                    long companyId, int start, int end, java.lang.String languageId)
127                    throws RemoteException {
128                    try {
129                            com.liferay.portlet.asset.model.AssetEntryDisplay[] returnValue = AssetEntryServiceUtil.getCompanyEntryDisplays(companyId,
130                                            start, end, languageId);
131    
132                            return returnValue;
133                    }
134                    catch (Exception e) {
135                            _log.error(e, e);
136    
137                            throw new RemoteException(e.getMessage());
138                    }
139            }
140    
141            public static com.liferay.portlet.asset.model.AssetEntrySoap[] getEntries(
142                    com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
143                    throws RemoteException {
144                    try {
145                            java.util.List<com.liferay.portlet.asset.model.AssetEntry> returnValue =
146                                    AssetEntryServiceUtil.getEntries(entryQuery);
147    
148                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModels(returnValue);
149                    }
150                    catch (Exception e) {
151                            _log.error(e, e);
152    
153                            throw new RemoteException(e.getMessage());
154                    }
155            }
156    
157            public static int getEntriesCount(
158                    com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
159                    throws RemoteException {
160                    try {
161                            int returnValue = AssetEntryServiceUtil.getEntriesCount(entryQuery);
162    
163                            return returnValue;
164                    }
165                    catch (Exception e) {
166                            _log.error(e, e);
167    
168                            throw new RemoteException(e.getMessage());
169                    }
170            }
171    
172            public static java.lang.String getEntriesRSS(
173                    com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery,
174                    java.lang.String name, java.lang.String type, double version,
175                    java.lang.String displayStyle, java.lang.String feedURL,
176                    java.lang.String tagURL) throws RemoteException {
177                    try {
178                            java.lang.String returnValue = AssetEntryServiceUtil.getEntriesRSS(entryQuery,
179                                            name, type, version, displayStyle, feedURL, tagURL);
180    
181                            return returnValue;
182                    }
183                    catch (Exception e) {
184                            _log.error(e, e);
185    
186                            throw new RemoteException(e.getMessage());
187                    }
188            }
189    
190            public static com.liferay.portlet.asset.model.AssetEntrySoap getEntry(
191                    long entryId) throws RemoteException {
192                    try {
193                            com.liferay.portlet.asset.model.AssetEntry returnValue = AssetEntryServiceUtil.getEntry(entryId);
194    
195                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModel(returnValue);
196                    }
197                    catch (Exception e) {
198                            _log.error(e, e);
199    
200                            throw new RemoteException(e.getMessage());
201                    }
202            }
203    
204            public static void incrementViewCounter(java.lang.String className,
205                    long classPK) throws RemoteException {
206                    try {
207                            AssetEntryServiceUtil.incrementViewCounter(className, classPK);
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.asset.model.AssetEntryDisplay[] searchEntryDisplays(
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.asset.model.AssetEntryDisplay[] returnValue = AssetEntryServiceUtil.searchEntryDisplays(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 searchEntryDisplaysCount(long companyId,
234                    java.lang.String portletId, java.lang.String keywords,
235                    java.lang.String languageId) throws RemoteException {
236                    try {
237                            int returnValue = AssetEntryServiceUtil.searchEntryDisplaysCount(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.asset.model.AssetEntrySoap updateEntry(
250                    long groupId, java.lang.String className, long classPK,
251                    java.lang.String classUuid, long[] categoryIds,
252                    java.lang.String[] tagNames, boolean visible, java.util.Date startDate,
253                    java.util.Date endDate, java.util.Date publishDate,
254                    java.util.Date expirationDate, java.lang.String mimeType,
255                    java.lang.String title, java.lang.String description,
256                    java.lang.String summary, java.lang.String url, int height, int width,
257                    java.lang.Integer priority, boolean sync) throws RemoteException {
258                    try {
259                            com.liferay.portlet.asset.model.AssetEntry returnValue = AssetEntryServiceUtil.updateEntry(groupId,
260                                            className, classPK, classUuid, categoryIds, tagNames,
261                                            visible, startDate, endDate, publishDate, expirationDate,
262                                            mimeType, title, description, summary, url, height, width,
263                                            priority, sync);
264    
265                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModel(returnValue);
266                    }
267                    catch (Exception e) {
268                            _log.error(e, e);
269    
270                            throw new RemoteException(e.getMessage());
271                    }
272            }
273    
274            private static Log _log = LogFactoryUtil.getLog(AssetEntryServiceSoap.class);
275    }