001    /**
002     * Copyright (c) 2000-2013 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 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.portlet.asset.model.AssetEntrySoap
063     * @see       com.liferay.portlet.asset.service.AssetEntryServiceUtil
064     * @generated
065     */
066    public class AssetEntryServiceSoap {
067            public static com.liferay.portlet.asset.model.AssetEntrySoap[] getCompanyEntries(
068                    long companyId, int start, int end) throws RemoteException {
069                    try {
070                            java.util.List<com.liferay.portlet.asset.model.AssetEntry> returnValue =
071                                    AssetEntryServiceUtil.getCompanyEntries(companyId, start, end);
072    
073                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModels(returnValue);
074                    }
075                    catch (Exception e) {
076                            _log.error(e, e);
077    
078                            throw new RemoteException(e.getMessage());
079                    }
080            }
081    
082            public static int getCompanyEntriesCount(long companyId)
083                    throws RemoteException {
084                    try {
085                            int returnValue = AssetEntryServiceUtil.getCompanyEntriesCount(companyId);
086    
087                            return returnValue;
088                    }
089                    catch (Exception e) {
090                            _log.error(e, e);
091    
092                            throw new RemoteException(e.getMessage());
093                    }
094            }
095    
096            public static com.liferay.portlet.asset.model.AssetEntrySoap[] getEntries(
097                    com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
098                    throws RemoteException {
099                    try {
100                            java.util.List<com.liferay.portlet.asset.model.AssetEntry> returnValue =
101                                    AssetEntryServiceUtil.getEntries(entryQuery);
102    
103                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModels(returnValue);
104                    }
105                    catch (Exception e) {
106                            _log.error(e, e);
107    
108                            throw new RemoteException(e.getMessage());
109                    }
110            }
111    
112            public static int getEntriesCount(
113                    com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
114                    throws RemoteException {
115                    try {
116                            int returnValue = AssetEntryServiceUtil.getEntriesCount(entryQuery);
117    
118                            return returnValue;
119                    }
120                    catch (Exception e) {
121                            _log.error(e, e);
122    
123                            throw new RemoteException(e.getMessage());
124                    }
125            }
126    
127            public static com.liferay.portlet.asset.model.AssetEntrySoap getEntry(
128                    long entryId) throws RemoteException {
129                    try {
130                            com.liferay.portlet.asset.model.AssetEntry returnValue = AssetEntryServiceUtil.getEntry(entryId);
131    
132                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModel(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 incrementViewCounter(
142                    java.lang.String className, long classPK) throws RemoteException {
143                    try {
144                            com.liferay.portlet.asset.model.AssetEntry returnValue = AssetEntryServiceUtil.incrementViewCounter(className,
145                                            classPK);
146    
147                            return com.liferay.portlet.asset.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.portlet.asset.model.AssetEntrySoap updateEntry(
157                    long groupId, java.util.Date createDate, java.util.Date modifiedDate,
158                    java.lang.String className, long classPK, java.lang.String classUuid,
159                    long classTypeId, long[] categoryIds, java.lang.String[] tagNames,
160                    boolean visible, java.util.Date startDate, java.util.Date endDate,
161                    java.util.Date expirationDate, java.lang.String mimeType,
162                    java.lang.String title, java.lang.String description,
163                    java.lang.String summary, java.lang.String url,
164                    java.lang.String layoutUuid, int height, int width,
165                    java.lang.Integer priority, boolean sync) throws RemoteException {
166                    try {
167                            com.liferay.portlet.asset.model.AssetEntry returnValue = AssetEntryServiceUtil.updateEntry(groupId,
168                                            createDate, modifiedDate, className, classPK, classUuid,
169                                            classTypeId, categoryIds, tagNames, visible, startDate,
170                                            endDate, expirationDate, mimeType, title, description,
171                                            summary, url, layoutUuid, height, width, priority, sync);
172    
173                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModel(returnValue);
174                    }
175                    catch (Exception e) {
176                            _log.error(e, e);
177    
178                            throw new RemoteException(e.getMessage());
179                    }
180            }
181    
182            /**
183            * @deprecated As of 6.2.0, replaced by {@link #updateEntry(long, String,
184            long, String, long, long[], String[], boolean, Date, Date,
185            Date, String, String, String, String, String, String, int,
186            int, Integer, boolean)}
187            */
188            public static com.liferay.portlet.asset.model.AssetEntrySoap updateEntry(
189                    long groupId, java.lang.String className, long classPK,
190                    java.lang.String classUuid, long classTypeId, long[] categoryIds,
191                    java.lang.String[] tagNames, boolean visible, java.util.Date startDate,
192                    java.util.Date endDate, java.util.Date publishDate,
193                    java.util.Date expirationDate, java.lang.String mimeType,
194                    java.lang.String title, java.lang.String description,
195                    java.lang.String summary, java.lang.String url,
196                    java.lang.String layoutUuid, int height, int width,
197                    java.lang.Integer priority, boolean sync) throws RemoteException {
198                    try {
199                            com.liferay.portlet.asset.model.AssetEntry returnValue = AssetEntryServiceUtil.updateEntry(groupId,
200                                            className, classPK, classUuid, classTypeId, categoryIds,
201                                            tagNames, visible, startDate, endDate, publishDate,
202                                            expirationDate, mimeType, title, description, summary, url,
203                                            layoutUuid, height, width, priority, sync);
204    
205                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModel(returnValue);
206                    }
207                    catch (Exception e) {
208                            _log.error(e, e);
209    
210                            throw new RemoteException(e.getMessage());
211                    }
212            }
213    
214            /**
215            * @deprecated As of 6.2.0, replaced by {@link #updateEntry(long, Date,
216            Date. String, long, String, long, long[], String[], boolean,
217            Date, Date, Date, String, String, String, String, String,
218            String, int, int, Integer, boolean)}
219            */
220            public static com.liferay.portlet.asset.model.AssetEntrySoap updateEntry(
221                    long groupId, java.lang.String className, long classPK,
222                    java.lang.String classUuid, long classTypeId, long[] categoryIds,
223                    java.lang.String[] tagNames, boolean visible, java.util.Date startDate,
224                    java.util.Date endDate, java.util.Date expirationDate,
225                    java.lang.String mimeType, java.lang.String title,
226                    java.lang.String description, java.lang.String summary,
227                    java.lang.String url, java.lang.String layoutUuid, int height,
228                    int width, java.lang.Integer priority, boolean sync)
229                    throws RemoteException {
230                    try {
231                            com.liferay.portlet.asset.model.AssetEntry returnValue = AssetEntryServiceUtil.updateEntry(groupId,
232                                            className, classPK, classUuid, classTypeId, categoryIds,
233                                            tagNames, visible, startDate, endDate, expirationDate,
234                                            mimeType, title, description, summary, url, layoutUuid,
235                                            height, width, priority, sync);
236    
237                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModel(returnValue);
238                    }
239                    catch (Exception e) {
240                            _log.error(e, e);
241    
242                            throw new RemoteException(e.getMessage());
243                    }
244            }
245    
246            private static Log _log = LogFactoryUtil.getLog(AssetEntryServiceSoap.class);
247    }