001
014
015 package com.liferay.portlet.shopping.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
032 public class ShoppingCategoryServiceUtil {
033 public static com.liferay.portlet.shopping.model.ShoppingCategory addCategory(
034 long parentCategoryId, java.lang.String name,
035 java.lang.String description,
036 com.liferay.portal.service.ServiceContext serviceContext)
037 throws com.liferay.portal.kernel.exception.PortalException,
038 com.liferay.portal.kernel.exception.SystemException {
039 return getService()
040 .addCategory(parentCategoryId, name, description,
041 serviceContext);
042 }
043
044 public static void deleteCategory(long categoryId)
045 throws com.liferay.portal.kernel.exception.PortalException,
046 com.liferay.portal.kernel.exception.SystemException {
047 getService().deleteCategory(categoryId);
048 }
049
050 public static com.liferay.portlet.shopping.model.ShoppingCategory getCategory(
051 long categoryId)
052 throws com.liferay.portal.kernel.exception.PortalException,
053 com.liferay.portal.kernel.exception.SystemException {
054 return getService().getCategory(categoryId);
055 }
056
057 public static com.liferay.portlet.shopping.model.ShoppingCategory updateCategory(
058 long categoryId, long parentCategoryId, java.lang.String name,
059 java.lang.String description, boolean mergeWithParentCategory,
060 com.liferay.portal.service.ServiceContext serviceContext)
061 throws com.liferay.portal.kernel.exception.PortalException,
062 com.liferay.portal.kernel.exception.SystemException {
063 return getService()
064 .updateCategory(categoryId, parentCategoryId, name,
065 description, mergeWithParentCategory, serviceContext);
066 }
067
068 public static ShoppingCategoryService getService() {
069 if (_service == null) {
070 _service = (ShoppingCategoryService)PortalBeanLocatorUtil.locate(ShoppingCategoryService.class.getName());
071 }
072
073 return _service;
074 }
075
076 public void setService(ShoppingCategoryService service) {
077 _service = service;
078 }
079
080 private static ShoppingCategoryService _service;
081 }