001    /**
002     * Copyright (c) 2000-2012 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/api/secure/axis. Set the property
053     * <b>axis.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 com.liferay.portlet.asset.model.AssetEntrySoap[] getCompanyEntries(
069                    long companyId, int start, int end) throws RemoteException {
070                    try {
071                            java.util.List<com.liferay.portlet.asset.model.AssetEntry> returnValue =
072                                    AssetEntryServiceUtil.getCompanyEntries(companyId, start, end);
073    
074                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModels(returnValue);
075                    }
076                    catch (Exception e) {
077                            _log.error(e, e);
078    
079                            throw new RemoteException(e.getMessage());
080                    }
081            }
082    
083            public static int getCompanyEntriesCount(long companyId)
084                    throws RemoteException {
085                    try {
086                            int returnValue = AssetEntryServiceUtil.getCompanyEntriesCount(companyId);
087    
088                            return returnValue;
089                    }
090                    catch (Exception e) {
091                            _log.error(e, e);
092    
093                            throw new RemoteException(e.getMessage());
094                    }
095            }
096    
097            public static com.liferay.portlet.asset.model.AssetEntryDisplay[] getCompanyEntryDisplays(
098                    long companyId, int start, int end, java.lang.String languageId)
099                    throws RemoteException {
100                    try {
101                            com.liferay.portlet.asset.model.AssetEntryDisplay[] returnValue = AssetEntryServiceUtil.getCompanyEntryDisplays(companyId,
102                                            start, end, languageId);
103    
104                            return returnValue;
105                    }
106                    catch (Exception e) {
107                            _log.error(e, e);
108    
109                            throw new RemoteException(e.getMessage());
110                    }
111            }
112    
113            public static com.liferay.portlet.asset.model.AssetEntrySoap[] getEntries(
114                    com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
115                    throws RemoteException {
116                    try {
117                            java.util.List<com.liferay.portlet.asset.model.AssetEntry> returnValue =
118                                    AssetEntryServiceUtil.getEntries(entryQuery);
119    
120                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModels(returnValue);
121                    }
122                    catch (Exception e) {
123                            _log.error(e, e);
124    
125                            throw new RemoteException(e.getMessage());
126                    }
127            }
128    
129            public static int getEntriesCount(
130                    com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
131                    throws RemoteException {
132                    try {
133                            int returnValue = AssetEntryServiceUtil.getEntriesCount(entryQuery);
134    
135                            return returnValue;
136                    }
137                    catch (Exception e) {
138                            _log.error(e, e);
139    
140                            throw new RemoteException(e.getMessage());
141                    }
142            }
143    
144            public static com.liferay.portlet.asset.model.AssetEntrySoap getEntry(
145                    long entryId) throws RemoteException {
146                    try {
147                            com.liferay.portlet.asset.model.AssetEntry returnValue = AssetEntryServiceUtil.getEntry(entryId);
148    
149                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModel(returnValue);
150                    }
151                    catch (Exception e) {
152                            _log.error(e, e);
153    
154                            throw new RemoteException(e.getMessage());
155                    }
156            }
157    
158            public static com.liferay.portlet.asset.model.AssetEntrySoap incrementViewCounter(
159                    java.lang.String className, long classPK) throws RemoteException {
160                    try {
161                            com.liferay.portlet.asset.model.AssetEntry returnValue = AssetEntryServiceUtil.incrementViewCounter(className,
162                                            classPK);
163    
164                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModel(returnValue);
165                    }
166                    catch (Exception e) {
167                            _log.error(e, e);
168    
169                            throw new RemoteException(e.getMessage());
170                    }
171            }
172    
173            public static com.liferay.portlet.asset.model.AssetEntryDisplay[] searchEntryDisplays(
174                    long companyId, long[] groupIds, java.lang.String className,
175                    java.lang.String keywords, java.lang.String languageId, int start,
176                    int end) throws RemoteException {
177                    try {
178                            com.liferay.portlet.asset.model.AssetEntryDisplay[] returnValue = AssetEntryServiceUtil.searchEntryDisplays(companyId,
179                                            groupIds, className, keywords, languageId, start, end);
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 int searchEntryDisplaysCount(long companyId, long[] groupIds,
191                    java.lang.String className, java.lang.String keywords,
192                    java.lang.String languageId) throws RemoteException {
193                    try {
194                            int returnValue = AssetEntryServiceUtil.searchEntryDisplaysCount(companyId,
195                                            groupIds, className, keywords, languageId);
196    
197                            return returnValue;
198                    }
199                    catch (Exception e) {
200                            _log.error(e, e);
201    
202                            throw new RemoteException(e.getMessage());
203                    }
204            }
205    
206            public static com.liferay.portlet.asset.model.AssetEntrySoap updateEntry(
207                    long groupId, java.lang.String className, long classPK,
208                    java.lang.String classUuid, long classTypeId, long[] categoryIds,
209                    java.lang.String[] tagNames, boolean visible, java.util.Date startDate,
210                    java.util.Date endDate, java.util.Date publishDate,
211                    java.util.Date expirationDate, java.lang.String mimeType,
212                    java.lang.String title, java.lang.String description,
213                    java.lang.String summary, java.lang.String url,
214                    java.lang.String layoutUuid, int height, int width,
215                    java.lang.Integer priority, boolean sync) throws RemoteException {
216                    try {
217                            com.liferay.portlet.asset.model.AssetEntry returnValue = AssetEntryServiceUtil.updateEntry(groupId,
218                                            className, classPK, classUuid, classTypeId, categoryIds,
219                                            tagNames, visible, startDate, endDate, publishDate,
220                                            expirationDate, mimeType, title, description, summary, url,
221                                            layoutUuid, height, width, priority, sync);
222    
223                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModel(returnValue);
224                    }
225                    catch (Exception e) {
226                            _log.error(e, e);
227    
228                            throw new RemoteException(e.getMessage());
229                    }
230            }
231    
232            private static Log _log = LogFactoryUtil.getLog(AssetEntryServiceSoap.class);
233    }