1
14
15 package com.liferay.portlet.shopping.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class ShoppingItemServiceUtil {
42 public static void addBookItems(long categoryId, java.lang.String[] isbns)
43 throws com.liferay.portal.PortalException,
44 com.liferay.portal.SystemException {
45 getService().addBookItems(categoryId, isbns);
46 }
47
48 public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
49 long categoryId, java.lang.String sku, java.lang.String name,
50 java.lang.String description, java.lang.String properties,
51 java.lang.String fieldsQuantities, boolean requiresShipping,
52 int stockQuantity, boolean featured, java.lang.Boolean sale,
53 boolean smallImage, java.lang.String smallImageURL,
54 java.io.File smallFile, boolean mediumImage,
55 java.lang.String mediumImageURL, java.io.File mediumFile,
56 boolean largeImage, java.lang.String largeImageURL,
57 java.io.File largeFile,
58 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
59 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
60 com.liferay.portal.service.ServiceContext serviceContext)
61 throws com.liferay.portal.PortalException,
62 com.liferay.portal.SystemException {
63 return getService()
64 .addItem(categoryId, sku, name, description, properties,
65 fieldsQuantities, requiresShipping, stockQuantity, featured, sale,
66 smallImage, smallImageURL, smallFile, mediumImage, mediumImageURL,
67 mediumFile, largeImage, largeImageURL, largeFile, itemFields,
68 itemPrices, serviceContext);
69 }
70
71 public static void deleteItem(long itemId)
72 throws com.liferay.portal.PortalException,
73 com.liferay.portal.SystemException {
74 getService().deleteItem(itemId);
75 }
76
77 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
78 long itemId)
79 throws com.liferay.portal.PortalException,
80 com.liferay.portal.SystemException {
81 return getService().getItem(itemId);
82 }
83
84 public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
85 long itemId, long categoryId, java.lang.String sku,
86 java.lang.String name, java.lang.String description,
87 java.lang.String properties, java.lang.String fieldsQuantities,
88 boolean requiresShipping, int stockQuantity, boolean featured,
89 java.lang.Boolean sale, boolean smallImage,
90 java.lang.String smallImageURL, java.io.File smallFile,
91 boolean mediumImage, java.lang.String mediumImageURL,
92 java.io.File mediumFile, boolean largeImage,
93 java.lang.String largeImageURL, java.io.File largeFile,
94 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
95 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
96 com.liferay.portal.service.ServiceContext serviceContext)
97 throws com.liferay.portal.PortalException,
98 com.liferay.portal.SystemException {
99 return getService()
100 .updateItem(itemId, categoryId, sku, name, description,
101 properties, fieldsQuantities, requiresShipping, stockQuantity,
102 featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
103 mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
104 itemFields, itemPrices, serviceContext);
105 }
106
107 public static ShoppingItemService getService() {
108 if (_service == null) {
109 _service = (ShoppingItemService)PortalBeanLocatorUtil.locate(ShoppingItemService.class.getName());
110
111 ReferenceRegistry.registerReference(ShoppingItemServiceUtil.class,
112 "_service");
113 MethodCache.remove(ShoppingItemService.class);
114 }
115
116 return _service;
117 }
118
119 public void setService(ShoppingItemService service) {
120 MethodCache.remove(ShoppingItemService.class);
121
122 _service = service;
123
124 ReferenceRegistry.registerReference(ShoppingItemServiceUtil.class,
125 "_service");
126 MethodCache.remove(ShoppingItemService.class);
127 }
128
129 private static ShoppingItemService _service;
130 }