001
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
033 public class ShoppingCategoryServiceUtil {
034
039
040
045 public static java.lang.String getBeanIdentifier() {
046 return getService().getBeanIdentifier();
047 }
048
049
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
131 public void setService(ShoppingCategoryService service) {
132 }
133
134 private static ShoppingCategoryService _service;
135 }