001
014
015 package com.liferay.portlet.shopping.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
032 public class ShoppingItemServiceUtil {
033 public static void addBookItems(long groupId, long categoryId,
034 java.lang.String[] isbns)
035 throws com.liferay.portal.kernel.exception.PortalException,
036 com.liferay.portal.kernel.exception.SystemException {
037 getService().addBookItems(groupId, categoryId, isbns);
038 }
039
040 public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
041 long groupId, long categoryId, java.lang.String sku,
042 java.lang.String name, java.lang.String description,
043 java.lang.String properties, java.lang.String fieldsQuantities,
044 boolean requiresShipping, int stockQuantity, boolean featured,
045 java.lang.Boolean sale, boolean smallImage,
046 java.lang.String smallImageURL, java.io.File smallFile,
047 boolean mediumImage, java.lang.String mediumImageURL,
048 java.io.File mediumFile, boolean largeImage,
049 java.lang.String largeImageURL, java.io.File largeFile,
050 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
051 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
052 com.liferay.portal.service.ServiceContext serviceContext)
053 throws com.liferay.portal.kernel.exception.PortalException,
054 com.liferay.portal.kernel.exception.SystemException {
055 return getService()
056 .addItem(groupId, categoryId, sku, name, description,
057 properties, fieldsQuantities, requiresShipping, stockQuantity,
058 featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
059 mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
060 itemFields, itemPrices, serviceContext);
061 }
062
063 public static void deleteItem(long itemId)
064 throws com.liferay.portal.kernel.exception.PortalException,
065 com.liferay.portal.kernel.exception.SystemException {
066 getService().deleteItem(itemId);
067 }
068
069 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
070 long itemId)
071 throws com.liferay.portal.kernel.exception.PortalException,
072 com.liferay.portal.kernel.exception.SystemException {
073 return getService().getItem(itemId);
074 }
075
076 public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
077 long itemId, long groupId, long categoryId, java.lang.String sku,
078 java.lang.String name, java.lang.String description,
079 java.lang.String properties, java.lang.String fieldsQuantities,
080 boolean requiresShipping, int stockQuantity, boolean featured,
081 java.lang.Boolean sale, boolean smallImage,
082 java.lang.String smallImageURL, java.io.File smallFile,
083 boolean mediumImage, java.lang.String mediumImageURL,
084 java.io.File mediumFile, boolean largeImage,
085 java.lang.String largeImageURL, java.io.File largeFile,
086 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
087 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
088 com.liferay.portal.service.ServiceContext serviceContext)
089 throws com.liferay.portal.kernel.exception.PortalException,
090 com.liferay.portal.kernel.exception.SystemException {
091 return getService()
092 .updateItem(itemId, groupId, categoryId, sku, name,
093 description, properties, fieldsQuantities, requiresShipping,
094 stockQuantity, featured, sale, smallImage, smallImageURL,
095 smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
096 largeImageURL, largeFile, itemFields, itemPrices, serviceContext);
097 }
098
099 public static ShoppingItemService getService() {
100 if (_service == null) {
101 _service = (ShoppingItemService)PortalBeanLocatorUtil.locate(ShoppingItemService.class.getName());
102 }
103
104 return _service;
105 }
106
107 public void setService(ShoppingItemService service) {
108 _service = service;
109 }
110
111 private static ShoppingItemService _service;
112 }