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 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 {@link #updateEntry(long, String, long, String, long, long[],
184            String[], boolean, Date, Date, Date, String, String, String,
185            String, String, String, int, int, Integer, boolean)}
186            */
187            public static com.liferay.portlet.asset.model.AssetEntrySoap updateEntry(
188                    long groupId, java.lang.String className, long classPK,
189                    java.lang.String classUuid, long classTypeId, long[] categoryIds,
190                    java.lang.String[] tagNames, boolean visible, java.util.Date startDate,
191                    java.util.Date endDate, java.util.Date publishDate,
192                    java.util.Date expirationDate, java.lang.String mimeType,
193                    java.lang.String title, java.lang.String description,
194                    java.lang.String summary, java.lang.String url,
195                    java.lang.String layoutUuid, int height, int width,
196                    java.lang.Integer priority, boolean sync) throws RemoteException {
197                    try {
198                            com.liferay.portlet.asset.model.AssetEntry returnValue = AssetEntryServiceUtil.updateEntry(groupId,
199                                            className, classPK, classUuid, classTypeId, categoryIds,
200                                            tagNames, visible, startDate, endDate, publishDate,
201                                            expirationDate, mimeType, title, description, summary, url,
202                                            layoutUuid, height, width, priority, sync);
203    
204                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModel(returnValue);
205                    }
206                    catch (Exception e) {
207                            _log.error(e, e);
208    
209                            throw new RemoteException(e.getMessage());
210                    }
211            }
212    
213            /**
214            * @deprecated {@link #updateEntry(long, Date, Date. String, long, String,
215            long, long[], String[], boolean, Date, Date, Date, String,
216            String, String, String, String, String, int, int, Integer,
217            boolean)}
218            */
219            public static com.liferay.portlet.asset.model.AssetEntrySoap updateEntry(
220                    long groupId, java.lang.String className, long classPK,
221                    java.lang.String classUuid, long classTypeId, long[] categoryIds,
222                    java.lang.String[] tagNames, boolean visible, java.util.Date startDate,
223                    java.util.Date endDate, java.util.Date expirationDate,
224                    java.lang.String mimeType, java.lang.String title,
225                    java.lang.String description, java.lang.String summary,
226                    java.lang.String url, java.lang.String layoutUuid, int height,
227                    int width, java.lang.Integer priority, boolean sync)
228                    throws RemoteException {
229                    try {
230                            com.liferay.portlet.asset.model.AssetEntry returnValue = AssetEntryServiceUtil.updateEntry(groupId,
231                                            className, classPK, classUuid, classTypeId, categoryIds,
232                                            tagNames, visible, startDate, endDate, expirationDate,
233                                            mimeType, title, description, summary, url, layoutUuid,
234                                            height, width, priority, sync);
235    
236                            return com.liferay.portlet.asset.model.AssetEntrySoap.toSoapModel(returnValue);
237                    }
238                    catch (Exception e) {
239                            _log.error(e, e);
240    
241                            throw new RemoteException(e.getMessage());
242                    }
243            }
244    
245            private static Log _log = LogFactoryUtil.getLog(AssetEntryServiceSoap.class);
246    }