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