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