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