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