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