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