001
014
015 package com.liferay.portlet.shopping.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.ReferenceRegistry;
019
020
034 public class ShoppingItemServiceUtil {
035
040
041
046 public static java.lang.String getBeanIdentifier() {
047 return getService().getBeanIdentifier();
048 }
049
050
055 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
056 getService().setBeanIdentifier(beanIdentifier);
057 }
058
059 public static void addBookItems(long groupId, long categoryId,
060 java.lang.String[] isbns)
061 throws com.liferay.portal.kernel.exception.PortalException,
062 com.liferay.portal.kernel.exception.SystemException {
063 getService().addBookItems(groupId, categoryId, isbns);
064 }
065
066 public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
067 long groupId, long categoryId, java.lang.String sku,
068 java.lang.String name, java.lang.String description,
069 java.lang.String properties, java.lang.String fieldsQuantities,
070 boolean requiresShipping, int stockQuantity, boolean featured,
071 java.lang.Boolean sale, boolean smallImage,
072 java.lang.String smallImageURL, java.io.File smallFile,
073 boolean mediumImage, java.lang.String mediumImageURL,
074 java.io.File mediumFile, boolean largeImage,
075 java.lang.String largeImageURL, java.io.File largeFile,
076 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
077 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
078 com.liferay.portal.service.ServiceContext serviceContext)
079 throws com.liferay.portal.kernel.exception.PortalException,
080 com.liferay.portal.kernel.exception.SystemException {
081 return getService()
082 .addItem(groupId, categoryId, sku, name, description,
083 properties, fieldsQuantities, requiresShipping, stockQuantity,
084 featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
085 mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
086 itemFields, itemPrices, serviceContext);
087 }
088
089 public static void deleteItem(long itemId)
090 throws com.liferay.portal.kernel.exception.PortalException,
091 com.liferay.portal.kernel.exception.SystemException {
092 getService().deleteItem(itemId);
093 }
094
095 public static int getCategoriesItemsCount(long groupId,
096 java.util.List<java.lang.Long> categoryIds)
097 throws com.liferay.portal.kernel.exception.SystemException {
098 return getService().getCategoriesItemsCount(groupId, categoryIds);
099 }
100
101 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
102 long itemId)
103 throws com.liferay.portal.kernel.exception.PortalException,
104 com.liferay.portal.kernel.exception.SystemException {
105 return getService().getItem(itemId);
106 }
107
108 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
109 long groupId, long categoryId)
110 throws com.liferay.portal.kernel.exception.SystemException {
111 return getService().getItems(groupId, categoryId);
112 }
113
114 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
115 long groupId, long categoryId, int start, int end,
116 com.liferay.portal.kernel.util.OrderByComparator obc)
117 throws com.liferay.portal.kernel.exception.SystemException {
118 return getService().getItems(groupId, categoryId, start, end, obc);
119 }
120
121 public static int getItemsCount(long groupId, long categoryId)
122 throws com.liferay.portal.kernel.exception.SystemException {
123 return getService().getItemsCount(groupId, categoryId);
124 }
125
126 public static com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
127 long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
128 throws com.liferay.portal.kernel.exception.PortalException,
129 com.liferay.portal.kernel.exception.SystemException {
130 return getService().getItemsPrevAndNext(itemId, obc);
131 }
132
133 public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
134 long itemId, long groupId, long categoryId, java.lang.String sku,
135 java.lang.String name, java.lang.String description,
136 java.lang.String properties, java.lang.String fieldsQuantities,
137 boolean requiresShipping, int stockQuantity, boolean featured,
138 java.lang.Boolean sale, boolean smallImage,
139 java.lang.String smallImageURL, java.io.File smallFile,
140 boolean mediumImage, java.lang.String mediumImageURL,
141 java.io.File mediumFile, boolean largeImage,
142 java.lang.String largeImageURL, java.io.File largeFile,
143 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
144 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
145 com.liferay.portal.service.ServiceContext serviceContext)
146 throws com.liferay.portal.kernel.exception.PortalException,
147 com.liferay.portal.kernel.exception.SystemException {
148 return getService()
149 .updateItem(itemId, groupId, categoryId, sku, name,
150 description, properties, fieldsQuantities, requiresShipping,
151 stockQuantity, featured, sale, smallImage, smallImageURL,
152 smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
153 largeImageURL, largeFile, itemFields, itemPrices, serviceContext);
154 }
155
156 public static ShoppingItemService getService() {
157 if (_service == null) {
158 _service = (ShoppingItemService)PortalBeanLocatorUtil.locate(ShoppingItemService.class.getName());
159
160 ReferenceRegistry.registerReference(ShoppingItemServiceUtil.class,
161 "_service");
162 }
163
164 return _service;
165 }
166
167
170 public void setService(ShoppingItemService service) {
171 }
172
173 private static ShoppingItemService _service;
174 }