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