001    /**
002     * Copyright (c) 2000-present 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.shopping.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for ShoppingCategory. This utility wraps
024     * {@link com.liferay.portlet.shopping.service.impl.ShoppingCategoryServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see ShoppingCategoryService
032     * @see com.liferay.portlet.shopping.service.base.ShoppingCategoryServiceBaseImpl
033     * @see com.liferay.portlet.shopping.service.impl.ShoppingCategoryServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class ShoppingCategoryServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.shopping.service.impl.ShoppingCategoryServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.shopping.model.ShoppingCategory addCategory(
044                    long parentCategoryId, java.lang.String name,
045                    java.lang.String description,
046                    com.liferay.portal.service.ServiceContext serviceContext)
047                    throws com.liferay.portal.kernel.exception.PortalException {
048                    return getService()
049                                       .addCategory(parentCategoryId, name, description,
050                            serviceContext);
051            }
052    
053            public static void deleteCategory(long categoryId)
054                    throws com.liferay.portal.kernel.exception.PortalException {
055                    getService().deleteCategory(categoryId);
056            }
057    
058            /**
059            * Returns the Spring bean ID for this bean.
060            *
061            * @return the Spring bean ID for this bean
062            */
063            public static java.lang.String getBeanIdentifier() {
064                    return getService().getBeanIdentifier();
065            }
066    
067            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getCategories(
068                    long groupId) {
069                    return getService().getCategories(groupId);
070            }
071    
072            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getCategories(
073                    long groupId, long parentCategoryId, int start, int end) {
074                    return getService().getCategories(groupId, parentCategoryId, start, end);
075            }
076    
077            public static int getCategoriesCount(long groupId, long parentCategoryId) {
078                    return getService().getCategoriesCount(groupId, parentCategoryId);
079            }
080    
081            public static com.liferay.portlet.shopping.model.ShoppingCategory getCategory(
082                    long categoryId)
083                    throws com.liferay.portal.kernel.exception.PortalException {
084                    return getService().getCategory(categoryId);
085            }
086    
087            public static void getSubcategoryIds(
088                    java.util.List<java.lang.Long> categoryIds, long groupId,
089                    long categoryId) {
090                    getService().getSubcategoryIds(categoryIds, groupId, categoryId);
091            }
092    
093            /**
094            * Sets the Spring bean ID for this bean.
095            *
096            * @param beanIdentifier the Spring bean ID for this bean
097            */
098            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
099                    getService().setBeanIdentifier(beanIdentifier);
100            }
101    
102            public static com.liferay.portlet.shopping.model.ShoppingCategory updateCategory(
103                    long categoryId, long parentCategoryId, java.lang.String name,
104                    java.lang.String description, boolean mergeWithParentCategory,
105                    com.liferay.portal.service.ServiceContext serviceContext)
106                    throws com.liferay.portal.kernel.exception.PortalException {
107                    return getService()
108                                       .updateCategory(categoryId, parentCategoryId, name,
109                            description, mergeWithParentCategory, serviceContext);
110            }
111    
112            public static ShoppingCategoryService getService() {
113                    if (_service == null) {
114                            _service = (ShoppingCategoryService)PortalBeanLocatorUtil.locate(ShoppingCategoryService.class.getName());
115    
116                            ReferenceRegistry.registerReference(ShoppingCategoryServiceUtil.class,
117                                    "_service");
118                    }
119    
120                    return _service;
121            }
122    
123            /**
124             * @deprecated As of 6.2.0
125             */
126            @Deprecated
127            public void setService(ShoppingCategoryService service) {
128            }
129    
130            private static ShoppingCategoryService _service;
131    }