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