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 visible, java.util.Date startDate, java.util.Date endDate,
176                    java.util.Date expirationDate, java.lang.String mimeType,
177                    java.lang.String title, java.lang.String description,
178                    java.lang.String summary, java.lang.String url,
179                    java.lang.String layoutUuid, int height, int width,
180                    java.lang.Double priority) throws RemoteException {
181                    try {
182                            com.liferay.asset.kernel.model.AssetEntry returnValue = AssetEntryServiceUtil.updateEntry(groupId,
183                                            createDate, modifiedDate, className, classPK, classUuid,
184                                            classTypeId, categoryIds, tagNames, visible, startDate,
185                                            endDate, expirationDate, mimeType, title, description,
186                                            summary, url, layoutUuid, height, width, priority);
187    
188                            return com.liferay.asset.kernel.model.AssetEntrySoap.toSoapModel(returnValue);
189                    }
190                    catch (Exception e) {
191                            _log.error(e, e);
192    
193                            throw new RemoteException(e.getMessage());
194                    }
195            }
196    
197            /**
198            * @deprecated As of 7.0.0, replaced by {@link #updateEntry(long, Date,
199            Date, String, long, String, long, long[], String[], boolean,
200            Date, Date, Date, String, String, String, String, String,
201            String, int, int, Double)}
202            */
203            @Deprecated
204            public static com.liferay.asset.kernel.model.AssetEntrySoap updateEntry(
205                    long groupId, java.util.Date createDate, java.util.Date modifiedDate,
206                    java.lang.String className, long classPK, java.lang.String classUuid,
207                    long classTypeId, long[] categoryIds, java.lang.String[] tagNames,
208                    boolean visible, java.util.Date startDate, java.util.Date endDate,
209                    java.util.Date expirationDate, java.lang.String mimeType,
210                    java.lang.String title, java.lang.String description,
211                    java.lang.String summary, java.lang.String url,
212                    java.lang.String layoutUuid, int height, int width,
213                    java.lang.Integer priority, boolean sync) throws RemoteException {
214                    try {
215                            com.liferay.asset.kernel.model.AssetEntry returnValue = AssetEntryServiceUtil.updateEntry(groupId,
216                                            createDate, modifiedDate, className, classPK, classUuid,
217                                            classTypeId, categoryIds, tagNames, visible, startDate,
218                                            endDate, expirationDate, mimeType, title, description,
219                                            summary, url, layoutUuid, height, width, priority, sync);
220    
221                            return com.liferay.asset.kernel.model.AssetEntrySoap.toSoapModel(returnValue);
222                    }
223                    catch (Exception e) {
224                            _log.error(e, e);
225    
226                            throw new RemoteException(e.getMessage());
227                    }
228            }
229    
230            private static Log _log = LogFactoryUtil.getLog(AssetEntryServiceSoap.class);
231    }