1
14
15 package com.liferay.portlet.shopping.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
39 public class ShoppingCategoryServiceUtil {
40 public static com.liferay.portlet.shopping.model.ShoppingCategory addCategory(
41 long plid, long parentCategoryId, java.lang.String name,
42 java.lang.String description, boolean addCommunityPermissions,
43 boolean addGuestPermissions)
44 throws com.liferay.portal.PortalException,
45 com.liferay.portal.SystemException, java.rmi.RemoteException {
46 return getService()
47 .addCategory(plid, parentCategoryId, name, description,
48 addCommunityPermissions, addGuestPermissions);
49 }
50
51 public static com.liferay.portlet.shopping.model.ShoppingCategory addCategory(
52 long plid, long parentCategoryId, java.lang.String name,
53 java.lang.String description, java.lang.String[] communityPermissions,
54 java.lang.String[] guestPermissions)
55 throws com.liferay.portal.PortalException,
56 com.liferay.portal.SystemException, java.rmi.RemoteException {
57 return getService()
58 .addCategory(plid, parentCategoryId, name, description,
59 communityPermissions, guestPermissions);
60 }
61
62 public static void deleteCategory(long categoryId)
63 throws com.liferay.portal.PortalException,
64 com.liferay.portal.SystemException, java.rmi.RemoteException {
65 getService().deleteCategory(categoryId);
66 }
67
68 public static com.liferay.portlet.shopping.model.ShoppingCategory getCategory(
69 long categoryId)
70 throws com.liferay.portal.PortalException,
71 com.liferay.portal.SystemException, java.rmi.RemoteException {
72 return getService().getCategory(categoryId);
73 }
74
75 public static com.liferay.portlet.shopping.model.ShoppingCategory updateCategory(
76 long categoryId, long parentCategoryId, java.lang.String name,
77 java.lang.String description, boolean mergeWithParentCategory)
78 throws com.liferay.portal.PortalException,
79 com.liferay.portal.SystemException, java.rmi.RemoteException {
80 return getService()
81 .updateCategory(categoryId, parentCategoryId, name,
82 description, mergeWithParentCategory);
83 }
84
85 public static ShoppingCategoryService getService() {
86 if (_service == null) {
87 _service = (ShoppingCategoryService)PortalBeanLocatorUtil.locate(ShoppingCategoryService.class.getName());
88 }
89
90 return _service;
91 }
92
93 public void setService(ShoppingCategoryService service) {
94 _service = service;
95 }
96
97 private static ShoppingCategoryService _service;
98 }