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