001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.asset.kernel.service.AssetEntryServiceUtil;
020    
021    import com.liferay.portal.kernel.log.Log;
022    import com.liferay.portal.kernel.log.LogFactoryUtil;
023    
024    import java.rmi.RemoteException;
025    
026    /**
027     * Provides the SOAP utility for the
028     * {@link AssetEntryServiceUtil} service utility. The
029     * static methods of this class calls the same methods of the service utility.
030     * However, the signatures are different because it is difficult for SOAP to
031     * support certain types.
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.asset.kernel.model.AssetEntrySoap}.
037     * If the method in the service utility returns a
038     * {@link com.liferay.asset.kernel.model.AssetEntry}, that is translated to a
039     * {@link com.liferay.asset.kernel.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 http://localhost:8080/api/axis. Set the
052     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
053     * security.
054     * </p>
055     *
056     * <p>
057     * The SOAP utility is only generated for remote services.
058     * </p>
059     *
060     * @author Brian Wing Shun Chan
061     * @see AssetEntryServiceHttp
062     * @see com.liferay.asset.kernel.model.AssetEntrySoap
063     * @see AssetEntryServiceUtil
064     * @generated
065     */
066    @ProviderType
067    public class AssetEntryServiceSoap {
068            public static com.liferay.asset.kernel.model.AssetEntrySoap fetchEntry(
069                    long entryId) throws RemoteException {
070                    try {
071                            com.liferay.asset.kernel.model.AssetEntry returnValue = AssetEntryServiceUtil.fetchEntry(entryId);
072    
073                            return com.liferay.asset.kernel.model.AssetEntrySoap.toSoapModel(returnValue);
074                    }
075                    catch (Exception e) {
076                            _log.error(e, e);
077    
078                            throw new RemoteException(e.getMessage());
079                    }
080            }
081    
082            public static com.liferay.asset.kernel.model.AssetEntrySoap[] getCompanyEntries(
083                    long companyId, int start, int end) throws RemoteException {
084                    try {
085                            java.util.List<com.liferay.asset.kernel.model.AssetEntry> returnValue =
086                                    AssetEntryServiceUtil.getCompanyEntries(companyId, start, end);
087    
088                            return com.liferay.asset.kernel.model.AssetEntrySoap.toSoapModels(returnValue);
089                    }
090                    catch (Exception e) {
091                            _log.error(e, e);
092    
093                            throw new RemoteException(e.getMessage());
094                    }
095            }
096    
097            public static int getCompanyEntriesCount(long companyId)
098                    throws RemoteException {
099                    try {
100                            int returnValue = AssetEntryServiceUtil.getCompanyEntriesCount(companyId);
101    
102                            return returnValue;
103                    }
104                    catch (Exception e) {
105                            _log.error(e, e);
106    
107                            throw new RemoteException(e.getMessage());
108                    }
109            }
110    
111            public static com.liferay.asset.kernel.model.AssetEntrySoap[] getEntries(
112                    com.liferay.asset.kernel.service.persistence.AssetEntryQuery entryQuery)
113                    throws RemoteException {
114                    try {
115                            java.util.List<com.liferay.asset.kernel.model.AssetEntry> returnValue =
116                                    AssetEntryServiceUtil.getEntries(entryQuery);
117    
118                            return com.liferay.asset.kernel.model.AssetEntrySoap.toSoapModels(returnValue);
119                    }
120                    catch (Exception e) {
121                            _log.error(e, e);
122    
123                            throw new RemoteException(e.getMessage());
124                    }
125            }
126    
127            public static int getEntriesCount(
128                    com.liferay.asset.kernel.service.persistence.AssetEntryQuery entryQuery)
129                    throws RemoteException {
130                    try {
131                            int returnValue = AssetEntryServiceUtil.getEntriesCount(entryQuery);
132    
133                            return returnValue;
134                    }
135                    catch (Exception e) {
136                            _log.error(e, e);
137    
138                            throw new RemoteException(e.getMessage());
139                    }
140            }
141    
142            public static com.liferay.asset.kernel.model.AssetEntrySoap getEntry(
143                    long entryId) throws RemoteException {
144                    try {
145                            com.liferay.asset.kernel.model.AssetEntry returnValue = AssetEntryServiceUtil.getEntry(entryId);
146    
147                            return com.liferay.asset.kernel.model.AssetEntrySoap.toSoapModel(returnValue);
148                    }
149                    catch (Exception e) {
150                            _log.error(e, e);
151    
152                            throw new RemoteException(e.getMessage());
153                    }
154            }
155    
156            public static com.liferay.asset.kernel.model.AssetEntrySoap incrementViewCounter(
157                    java.lang.String className, long classPK) throws RemoteException {
158                    try {
159                            com.liferay.asset.kernel.model.AssetEntry returnValue = AssetEntryServiceUtil.incrementViewCounter(className,
160                                            classPK);
161    
162                            return com.liferay.asset.kernel.model.AssetEntrySoap.toSoapModel(returnValue);
163                    }
164                    catch (Exception e) {
165                            _log.error(e, e);
166    
167                            throw new RemoteException(e.getMessage());
168                    }
169            }
170    
171            public static com.liferay.asset.kernel.model.AssetEntrySoap updateEntry(
172                    long groupId, java.util.Date createDate, java.util.Date modifiedDate,
173                    java.lang.String className, long classPK, java.lang.String classUuid,
174                    long classTypeId, long[] categoryIds, java.lang.String[] tagNames,
175                    boolean listable, boolean visible, java.util.Date startDate,
176                    java.util.Date endDate, java.util.Date publishDate,
177                    java.util.Date expirationDate, java.lang.String mimeType,
178                    java.lang.String title, java.lang.String description,
179                    java.lang.String summary, java.lang.String url,
180                    java.lang.String layoutUuid, int height, int width,
181                    java.lang.Double priority) throws RemoteException {
182                    try {
183                            com.liferay.asset.kernel.model.AssetEntry returnValue = AssetEntryServiceUtil.updateEntry(groupId,
184                                            createDate, modifiedDate, className, classPK, classUuid,
185                                            classTypeId, categoryIds, tagNames, listable, visible,
186                                            startDate, endDate, publishDate, expirationDate, mimeType,
187                                            title, description, summary, url, layoutUuid, height,
188                                            width, priority);
189    
190                            return com.liferay.asset.kernel.model.AssetEntrySoap.toSoapModel(returnValue);
191                    }
192                    catch (Exception e) {
193                            _log.error(e, e);
194    
195                            throw new RemoteException(e.getMessage());
196                    }
197            }
198    
199            /**
200            * @deprecated As of 7.0.0, replaced by {@link #updateEntry(long, Date,
201            Date, String, long, String, long, long[], String[], boolean,
202            boolean, Date, Date, Date, Date, String, String, String,
203            String, String, String, int, int, Double)}
204            */
205            @Deprecated
206            public static com.liferay.asset.kernel.model.AssetEntrySoap updateEntry(
207                    long groupId, java.util.Date createDate, java.util.Date modifiedDate,
208                    java.lang.String className, long classPK, java.lang.String classUuid,
209                    long classTypeId, long[] categoryIds, java.lang.String[] tagNames,
210                    boolean listable, boolean visible, java.util.Date startDate,
211                    java.util.Date endDate, java.util.Date expirationDate,
212                    java.lang.String mimeType, java.lang.String title,
213                    java.lang.String description, java.lang.String summary,
214                    java.lang.String url, java.lang.String layoutUuid, int height,
215                    int width, java.lang.Double priority) throws RemoteException {
216                    try {
217                            com.liferay.asset.kernel.model.AssetEntry returnValue = AssetEntryServiceUtil.updateEntry(groupId,
218                                            createDate, modifiedDate, className, classPK, classUuid,
219                                            classTypeId, categoryIds, tagNames, listable, visible,
220                                            startDate, endDate, expirationDate, mimeType, title,
221                                            description, summary, url, layoutUuid, height, width,
222                                            priority);
223    
224                            return com.liferay.asset.kernel.model.AssetEntrySoap.toSoapModel(returnValue);
225                    }
226                    catch (Exception e) {
227                            _log.error(e, e);
228    
229                            throw new RemoteException(e.getMessage());
230                    }
231            }
232    
233            /**
234            * @deprecated As of 7.0.0, replaced by {@link #updateEntry(long, Date,
235            Date, String, long, String, long, long[], String[], boolean,
236            boolean, Date, Date, Date, Date, String, String, String,
237            String, String, String, int, int, Double)}
238            */
239            @Deprecated
240            public static com.liferay.asset.kernel.model.AssetEntrySoap updateEntry(
241                    long groupId, java.util.Date createDate, java.util.Date modifiedDate,
242                    java.lang.String className, long classPK, java.lang.String classUuid,
243                    long classTypeId, long[] categoryIds, java.lang.String[] tagNames,
244                    boolean visible, java.util.Date startDate, java.util.Date endDate,
245                    java.util.Date expirationDate, java.lang.String mimeType,
246                    java.lang.String title, java.lang.String description,
247                    java.lang.String summary, java.lang.String url,
248                    java.lang.String layoutUuid, int height, int width,
249                    java.lang.Integer priority, boolean sync) throws RemoteException {
250                    try {
251                            com.liferay.asset.kernel.model.AssetEntry returnValue = AssetEntryServiceUtil.updateEntry(groupId,
252                                            createDate, modifiedDate, className, classPK, classUuid,
253                                            classTypeId, categoryIds, tagNames, visible, startDate,
254                                            endDate, expirationDate, mimeType, title, description,
255                                            summary, url, layoutUuid, height, width, priority, sync);
256    
257                            return com.liferay.asset.kernel.model.AssetEntrySoap.toSoapModel(returnValue);
258                    }
259                    catch (Exception e) {
260                            _log.error(e, e);
261    
262                            throw new RemoteException(e.getMessage());
263                    }
264            }
265    
266            private static Log _log = LogFactoryUtil.getLog(AssetEntryServiceSoap.class);
267    }