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.softwarecatalog.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the s c product version remote service. This utility wraps {@link com.liferay.portlet.softwarecatalog.service.impl.SCProductVersionServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see SCProductVersionService
030     * @see com.liferay.portlet.softwarecatalog.service.base.SCProductVersionServiceBaseImpl
031     * @see com.liferay.portlet.softwarecatalog.service.impl.SCProductVersionServiceImpl
032     * @generated
033     */
034    public class SCProductVersionServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.softwarecatalog.service.impl.SCProductVersionServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.softwarecatalog.model.SCProductVersion addProductVersion(
041                    long productEntryId, java.lang.String version,
042                    java.lang.String changeLog, java.lang.String downloadPageURL,
043                    java.lang.String directDownloadURL, boolean testDirectDownloadURL,
044                    boolean repoStoreArtifact, long[] frameworkVersionIds,
045                    com.liferay.portal.service.ServiceContext serviceContext)
046                    throws com.liferay.portal.kernel.exception.PortalException,
047                            com.liferay.portal.kernel.exception.SystemException {
048                    return getService()
049                                       .addProductVersion(productEntryId, version, changeLog,
050                            downloadPageURL, directDownloadURL, testDirectDownloadURL,
051                            repoStoreArtifact, frameworkVersionIds, serviceContext);
052            }
053    
054            public static void deleteProductVersion(long productVersionId)
055                    throws com.liferay.portal.kernel.exception.PortalException,
056                            com.liferay.portal.kernel.exception.SystemException {
057                    getService().deleteProductVersion(productVersionId);
058            }
059    
060            public static com.liferay.portlet.softwarecatalog.model.SCProductVersion getProductVersion(
061                    long productVersionId)
062                    throws com.liferay.portal.kernel.exception.PortalException,
063                            com.liferay.portal.kernel.exception.SystemException {
064                    return getService().getProductVersion(productVersionId);
065            }
066    
067            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> getProductVersions(
068                    long productEntryId, int start, int end)
069                    throws com.liferay.portal.kernel.exception.PortalException,
070                            com.liferay.portal.kernel.exception.SystemException {
071                    return getService().getProductVersions(productEntryId, start, end);
072            }
073    
074            public static int getProductVersionsCount(long productEntryId)
075                    throws com.liferay.portal.kernel.exception.PortalException,
076                            com.liferay.portal.kernel.exception.SystemException {
077                    return getService().getProductVersionsCount(productEntryId);
078            }
079    
080            public static com.liferay.portlet.softwarecatalog.model.SCProductVersion updateProductVersion(
081                    long productVersionId, java.lang.String version,
082                    java.lang.String changeLog, java.lang.String downloadPageURL,
083                    java.lang.String directDownloadURL, boolean testDirectDownloadURL,
084                    boolean repoStoreArtifact, long[] frameworkVersionIds)
085                    throws com.liferay.portal.kernel.exception.PortalException,
086                            com.liferay.portal.kernel.exception.SystemException {
087                    return getService()
088                                       .updateProductVersion(productVersionId, version, changeLog,
089                            downloadPageURL, directDownloadURL, testDirectDownloadURL,
090                            repoStoreArtifact, frameworkVersionIds);
091            }
092    
093            public static SCProductVersionService getService() {
094                    if (_service == null) {
095                            _service = (SCProductVersionService)PortalBeanLocatorUtil.locate(SCProductVersionService.class.getName());
096    
097                            ReferenceRegistry.registerReference(SCProductVersionServiceUtil.class,
098                                    "_service");
099                            MethodCache.remove(SCProductVersionService.class);
100                    }
101    
102                    return _service;
103            }
104    
105            public void setService(SCProductVersionService service) {
106                    MethodCache.remove(SCProductVersionService.class);
107    
108                    _service = service;
109    
110                    ReferenceRegistry.registerReference(SCProductVersionServiceUtil.class,
111                            "_service");
112                    MethodCache.remove(SCProductVersionService.class);
113            }
114    
115            private static SCProductVersionService _service;
116    }