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 entry remote service. This utility wraps {@link com.liferay.portlet.softwarecatalog.service.impl.SCProductEntryServiceImpl} 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 SCProductEntryService
030     * @see com.liferay.portlet.softwarecatalog.service.base.SCProductEntryServiceBaseImpl
031     * @see com.liferay.portlet.softwarecatalog.service.impl.SCProductEntryServiceImpl
032     * @generated
033     */
034    public class SCProductEntryServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.softwarecatalog.service.impl.SCProductEntryServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.softwarecatalog.model.SCProductEntry addProductEntry(
041                    java.lang.String name, java.lang.String type, java.lang.String tags,
042                    java.lang.String shortDescription, java.lang.String longDescription,
043                    java.lang.String pageURL, java.lang.String author,
044                    java.lang.String repoGroupId, java.lang.String repoArtifactId,
045                    long[] licenseIds, java.util.List<byte[]> thumbnails,
046                    java.util.List<byte[]> fullImages,
047                    com.liferay.portal.service.ServiceContext serviceContext)
048                    throws com.liferay.portal.kernel.exception.PortalException,
049                            com.liferay.portal.kernel.exception.SystemException {
050                    return getService()
051                                       .addProductEntry(name, type, tags, shortDescription,
052                            longDescription, pageURL, author, repoGroupId, repoArtifactId,
053                            licenseIds, thumbnails, fullImages, serviceContext);
054            }
055    
056            public static void deleteProductEntry(long productEntryId)
057                    throws com.liferay.portal.kernel.exception.PortalException,
058                            com.liferay.portal.kernel.exception.SystemException {
059                    getService().deleteProductEntry(productEntryId);
060            }
061    
062            public static com.liferay.portlet.softwarecatalog.model.SCProductEntry getProductEntry(
063                    long productEntryId)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    return getService().getProductEntry(productEntryId);
067            }
068    
069            public static com.liferay.portlet.softwarecatalog.model.SCProductEntry updateProductEntry(
070                    long productEntryId, java.lang.String name, java.lang.String type,
071                    java.lang.String tags, java.lang.String shortDescription,
072                    java.lang.String longDescription, java.lang.String pageURL,
073                    java.lang.String author, java.lang.String repoGroupId,
074                    java.lang.String repoArtifactId, long[] licenseIds,
075                    java.util.List<byte[]> thumbnails, java.util.List<byte[]> fullImages)
076                    throws com.liferay.portal.kernel.exception.PortalException,
077                            com.liferay.portal.kernel.exception.SystemException {
078                    return getService()
079                                       .updateProductEntry(productEntryId, name, type, tags,
080                            shortDescription, longDescription, pageURL, author, repoGroupId,
081                            repoArtifactId, licenseIds, thumbnails, fullImages);
082            }
083    
084            public static SCProductEntryService getService() {
085                    if (_service == null) {
086                            _service = (SCProductEntryService)PortalBeanLocatorUtil.locate(SCProductEntryService.class.getName());
087    
088                            ReferenceRegistry.registerReference(SCProductEntryServiceUtil.class,
089                                    "_service");
090                            MethodCache.remove(SCProductEntryService.class);
091                    }
092    
093                    return _service;
094            }
095    
096            public void setService(SCProductEntryService service) {
097                    MethodCache.remove(SCProductEntryService.class);
098    
099                    _service = service;
100    
101                    ReferenceRegistry.registerReference(SCProductEntryServiceUtil.class,
102                            "_service");
103                    MethodCache.remove(SCProductEntryService.class);
104            }
105    
106            private static SCProductEntryService _service;
107    }