001
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
036 @ProviderType
037 public class ShoppingCategoryServiceUtil {
038
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
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
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
126 @Deprecated
127 public void setService(ShoppingCategoryService service) {
128 }
129
130 private static ShoppingCategoryService _service;
131 }