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.softwarecatalog.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.softwarecatalog.service.SCProductVersionServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    /**
025     * <p>
026     * This class provides a SOAP utility for the
027     * {@link com.liferay.portlet.softwarecatalog.service.SCProductVersionServiceUtil} 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.softwarecatalog.model.SCProductVersionSoap}.
037     * If the method in the service utility returns a
038     * {@link com.liferay.portlet.softwarecatalog.model.SCProductVersion}, that is translated to a
039     * {@link com.liferay.portlet.softwarecatalog.model.SCProductVersionSoap}. 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       SCProductVersionServiceHttp
062     * @see       com.liferay.portlet.softwarecatalog.model.SCProductVersionSoap
063     * @see       com.liferay.portlet.softwarecatalog.service.SCProductVersionServiceUtil
064     * @generated
065     */
066    public class SCProductVersionServiceSoap {
067            public static com.liferay.portlet.softwarecatalog.model.SCProductVersionSoap addProductVersion(
068                    long productEntryId, java.lang.String version,
069                    java.lang.String changeLog, java.lang.String downloadPageURL,
070                    java.lang.String directDownloadURL, boolean testDirectDownloadURL,
071                    boolean repoStoreArtifact, long[] frameworkVersionIds,
072                    com.liferay.portal.service.ServiceContext serviceContext)
073                    throws RemoteException {
074                    try {
075                            com.liferay.portlet.softwarecatalog.model.SCProductVersion returnValue =
076                                    SCProductVersionServiceUtil.addProductVersion(productEntryId,
077                                            version, changeLog, downloadPageURL, directDownloadURL,
078                                            testDirectDownloadURL, repoStoreArtifact,
079                                            frameworkVersionIds, serviceContext);
080    
081                            return com.liferay.portlet.softwarecatalog.model.SCProductVersionSoap.toSoapModel(returnValue);
082                    }
083                    catch (Exception e) {
084                            _log.error(e, e);
085    
086                            throw new RemoteException(e.getMessage());
087                    }
088            }
089    
090            public static void deleteProductVersion(long productVersionId)
091                    throws RemoteException {
092                    try {
093                            SCProductVersionServiceUtil.deleteProductVersion(productVersionId);
094                    }
095                    catch (Exception e) {
096                            _log.error(e, e);
097    
098                            throw new RemoteException(e.getMessage());
099                    }
100            }
101    
102            public static com.liferay.portlet.softwarecatalog.model.SCProductVersionSoap getProductVersion(
103                    long productVersionId) throws RemoteException {
104                    try {
105                            com.liferay.portlet.softwarecatalog.model.SCProductVersion returnValue =
106                                    SCProductVersionServiceUtil.getProductVersion(productVersionId);
107    
108                            return com.liferay.portlet.softwarecatalog.model.SCProductVersionSoap.toSoapModel(returnValue);
109                    }
110                    catch (Exception e) {
111                            _log.error(e, e);
112    
113                            throw new RemoteException(e.getMessage());
114                    }
115            }
116    
117            public static com.liferay.portlet.softwarecatalog.model.SCProductVersionSoap[] getProductVersions(
118                    long productEntryId, int start, int end) throws RemoteException {
119                    try {
120                            java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> returnValue =
121                                    SCProductVersionServiceUtil.getProductVersions(productEntryId,
122                                            start, end);
123    
124                            return com.liferay.portlet.softwarecatalog.model.SCProductVersionSoap.toSoapModels(returnValue);
125                    }
126                    catch (Exception e) {
127                            _log.error(e, e);
128    
129                            throw new RemoteException(e.getMessage());
130                    }
131            }
132    
133            public static int getProductVersionsCount(long productEntryId)
134                    throws RemoteException {
135                    try {
136                            int returnValue = SCProductVersionServiceUtil.getProductVersionsCount(productEntryId);
137    
138                            return returnValue;
139                    }
140                    catch (Exception e) {
141                            _log.error(e, e);
142    
143                            throw new RemoteException(e.getMessage());
144                    }
145            }
146    
147            public static com.liferay.portlet.softwarecatalog.model.SCProductVersionSoap updateProductVersion(
148                    long productVersionId, java.lang.String version,
149                    java.lang.String changeLog, java.lang.String downloadPageURL,
150                    java.lang.String directDownloadURL, boolean testDirectDownloadURL,
151                    boolean repoStoreArtifact, long[] frameworkVersionIds)
152                    throws RemoteException {
153                    try {
154                            com.liferay.portlet.softwarecatalog.model.SCProductVersion returnValue =
155                                    SCProductVersionServiceUtil.updateProductVersion(productVersionId,
156                                            version, changeLog, downloadPageURL, directDownloadURL,
157                                            testDirectDownloadURL, repoStoreArtifact,
158                                            frameworkVersionIds);
159    
160                            return com.liferay.portlet.softwarecatalog.model.SCProductVersionSoap.toSoapModel(returnValue);
161                    }
162                    catch (Exception e) {
163                            _log.error(e, e);
164    
165                            throw new RemoteException(e.getMessage());
166                    }
167            }
168    
169            private static Log _log = LogFactoryUtil.getLog(SCProductVersionServiceSoap.class);
170    }