1
19
20 package com.liferay.portlet.shopping.service;
21
22 import com.liferay.portal.PortalException;
23 import com.liferay.portal.SystemException;
24 import com.liferay.portal.kernel.annotation.Isolation;
25 import com.liferay.portal.kernel.annotation.Propagation;
26 import com.liferay.portal.kernel.annotation.Transactional;
27
28
52 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
53 PortalException.class, SystemException.class})
54 public interface ShoppingItemLocalService {
55 public com.liferay.portlet.shopping.model.ShoppingItem addShoppingItem(
56 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
57 throws com.liferay.portal.SystemException;
58
59 public com.liferay.portlet.shopping.model.ShoppingItem createShoppingItem(
60 long itemId);
61
62 public void deleteShoppingItem(long itemId)
63 throws com.liferay.portal.SystemException,
64 com.liferay.portal.PortalException;
65
66 public void deleteShoppingItem(
67 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
68 throws com.liferay.portal.SystemException;
69
70 public java.util.List<Object> dynamicQuery(
71 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
72 throws com.liferay.portal.SystemException;
73
74 public java.util.List<Object> dynamicQuery(
75 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
76 int end) throws com.liferay.portal.SystemException;
77
78 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
79 public com.liferay.portlet.shopping.model.ShoppingItem getShoppingItem(
80 long itemId)
81 throws com.liferay.portal.SystemException,
82 com.liferay.portal.PortalException;
83
84 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
85 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getShoppingItems(
86 int start, int end) throws com.liferay.portal.SystemException;
87
88 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
89 public int getShoppingItemsCount()
90 throws com.liferay.portal.SystemException;
91
92 public com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
93 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
94 throws com.liferay.portal.SystemException;
95
96 public com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
97 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
98 boolean merge) throws com.liferay.portal.SystemException;
99
100 public void addBookItems(long userId, long categoryId,
101 java.lang.String[] isbns)
102 throws com.liferay.portal.PortalException,
103 com.liferay.portal.SystemException;
104
105 public com.liferay.portlet.shopping.model.ShoppingItem addItem(
106 long userId, long categoryId, java.lang.String sku,
107 java.lang.String name, java.lang.String description,
108 java.lang.String properties, java.lang.String fieldsQuantities,
109 boolean requiresShipping, int stockQuantity, boolean featured,
110 java.lang.Boolean sale, boolean smallImage,
111 java.lang.String smallImageURL, java.io.File smallFile,
112 boolean mediumImage, java.lang.String mediumImageURL,
113 java.io.File mediumFile, boolean largeImage,
114 java.lang.String largeImageURL, java.io.File largeFile,
115 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
116 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
117 com.liferay.portal.service.ServiceContext serviceContext)
118 throws com.liferay.portal.PortalException,
119 com.liferay.portal.SystemException;
120
121 public void addItemResources(long itemId, boolean addCommunityPermissions,
122 boolean addGuestPermissions)
123 throws com.liferay.portal.PortalException,
124 com.liferay.portal.SystemException;
125
126 public void addItemResources(
127 com.liferay.portlet.shopping.model.ShoppingCategory category,
128 com.liferay.portlet.shopping.model.ShoppingItem item,
129 boolean addCommunityPermissions, boolean addGuestPermissions)
130 throws com.liferay.portal.PortalException,
131 com.liferay.portal.SystemException;
132
133 public void addItemResources(long itemId,
134 java.lang.String[] communityPermissions,
135 java.lang.String[] guestPermissions)
136 throws com.liferay.portal.PortalException,
137 com.liferay.portal.SystemException;
138
139 public void addItemResources(
140 com.liferay.portlet.shopping.model.ShoppingCategory category,
141 com.liferay.portlet.shopping.model.ShoppingItem item,
142 java.lang.String[] communityPermissions,
143 java.lang.String[] guestPermissions)
144 throws com.liferay.portal.PortalException,
145 com.liferay.portal.SystemException;
146
147 public void deleteItem(long itemId)
148 throws com.liferay.portal.PortalException,
149 com.liferay.portal.SystemException;
150
151 public void deleteItem(com.liferay.portlet.shopping.model.ShoppingItem item)
152 throws com.liferay.portal.PortalException,
153 com.liferay.portal.SystemException;
154
155 public void deleteItems(long categoryId)
156 throws com.liferay.portal.PortalException,
157 com.liferay.portal.SystemException;
158
159 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160 public int getCategoriesItemsCount(java.util.List<Long> categoryIds)
161 throws com.liferay.portal.SystemException;
162
163 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
165 long groupId, long categoryId, int numOfItems)
166 throws com.liferay.portal.SystemException;
167
168 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
169 public com.liferay.portlet.shopping.model.ShoppingItem getItem(long itemId)
170 throws com.liferay.portal.PortalException,
171 com.liferay.portal.SystemException;
172
173 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
174 public com.liferay.portlet.shopping.model.ShoppingItem getItem(
175 long companyId, java.lang.String sku)
176 throws com.liferay.portal.PortalException,
177 com.liferay.portal.SystemException;
178
179 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180 public com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
181 long largeImageId)
182 throws com.liferay.portal.PortalException,
183 com.liferay.portal.SystemException;
184
185 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186 public com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
187 long mediumImageId)
188 throws com.liferay.portal.PortalException,
189 com.liferay.portal.SystemException;
190
191 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
192 public com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
193 long smallImageId)
194 throws com.liferay.portal.PortalException,
195 com.liferay.portal.SystemException;
196
197 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
199 long categoryId) throws com.liferay.portal.SystemException;
200
201 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
202 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
203 long categoryId, int start, int end,
204 com.liferay.portal.kernel.util.OrderByComparator obc)
205 throws com.liferay.portal.SystemException;
206
207 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208 public com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
209 long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
210 throws com.liferay.portal.PortalException,
211 com.liferay.portal.SystemException;
212
213 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214 public int getItemsCount(long categoryId)
215 throws com.liferay.portal.SystemException;
216
217 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getSaleItems(
219 long groupId, long categoryId, int numOfItems)
220 throws com.liferay.portal.SystemException;
221
222 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> search(
224 long groupId, long[] categoryIds, java.lang.String keywords, int start,
225 int end) throws com.liferay.portal.SystemException;
226
227 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
228 public int searchCount(long groupId, long[] categoryIds,
229 java.lang.String keywords) throws com.liferay.portal.SystemException;
230
231 public com.liferay.portlet.shopping.model.ShoppingItem updateItem(
232 long userId, long itemId, long categoryId, java.lang.String sku,
233 java.lang.String name, java.lang.String description,
234 java.lang.String properties, java.lang.String fieldsQuantities,
235 boolean requiresShipping, int stockQuantity, boolean featured,
236 java.lang.Boolean sale, boolean smallImage,
237 java.lang.String smallImageURL, java.io.File smallFile,
238 boolean mediumImage, java.lang.String mediumImageURL,
239 java.io.File mediumFile, boolean largeImage,
240 java.lang.String largeImageURL, java.io.File largeFile,
241 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
242 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
243 com.liferay.portal.service.ServiceContext serviceContext)
244 throws com.liferay.portal.PortalException,
245 com.liferay.portal.SystemException;
246 }