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 com.liferay.portal.service.ServiceContext serviceContext)
116 throws com.liferay.portal.PortalException,
117 com.liferay.portal.SystemException;
118
119 public void addItemResources(long itemId, boolean addCommunityPermissions,
120 boolean addGuestPermissions)
121 throws com.liferay.portal.PortalException,
122 com.liferay.portal.SystemException;
123
124 public void addItemResources(
125 com.liferay.portlet.shopping.model.ShoppingCategory category,
126 com.liferay.portlet.shopping.model.ShoppingItem item,
127 boolean addCommunityPermissions, 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 java.lang.String[] communityPermissions,
141 java.lang.String[] guestPermissions)
142 throws com.liferay.portal.PortalException,
143 com.liferay.portal.SystemException;
144
145 public void deleteItem(long itemId)
146 throws com.liferay.portal.PortalException,
147 com.liferay.portal.SystemException;
148
149 public void deleteItem(com.liferay.portlet.shopping.model.ShoppingItem item)
150 throws com.liferay.portal.PortalException,
151 com.liferay.portal.SystemException;
152
153 public void deleteItems(long categoryId)
154 throws com.liferay.portal.PortalException,
155 com.liferay.portal.SystemException;
156
157 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
158 public int getCategoriesItemsCount(java.util.List<Long> categoryIds)
159 throws com.liferay.portal.SystemException;
160
161 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
162 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
163 long groupId, long categoryId, int numOfItems)
164 throws com.liferay.portal.SystemException;
165
166 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167 public com.liferay.portlet.shopping.model.ShoppingItem getItem(long itemId)
168 throws com.liferay.portal.PortalException,
169 com.liferay.portal.SystemException;
170
171 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172 public com.liferay.portlet.shopping.model.ShoppingItem getItem(
173 long companyId, java.lang.String sku)
174 throws com.liferay.portal.PortalException,
175 com.liferay.portal.SystemException;
176
177 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
178 public com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
179 long largeImageId)
180 throws com.liferay.portal.PortalException,
181 com.liferay.portal.SystemException;
182
183 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
184 public com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
185 long mediumImageId)
186 throws com.liferay.portal.PortalException,
187 com.liferay.portal.SystemException;
188
189 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
190 public com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
191 long smallImageId)
192 throws com.liferay.portal.PortalException,
193 com.liferay.portal.SystemException;
194
195 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
197 long categoryId) throws com.liferay.portal.SystemException;
198
199 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
201 long categoryId, int start, int end,
202 com.liferay.portal.kernel.util.OrderByComparator obc)
203 throws com.liferay.portal.SystemException;
204
205 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206 public com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
207 long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
208 throws com.liferay.portal.PortalException,
209 com.liferay.portal.SystemException;
210
211 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
212 public int getItemsCount(long categoryId)
213 throws com.liferay.portal.SystemException;
214
215 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getSaleItems(
217 long groupId, long categoryId, int numOfItems)
218 throws com.liferay.portal.SystemException;
219
220 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> search(
222 long groupId, long[] categoryIds, java.lang.String keywords, int start,
223 int end) throws com.liferay.portal.SystemException;
224
225 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
226 public int searchCount(long groupId, long[] categoryIds,
227 java.lang.String keywords) throws com.liferay.portal.SystemException;
228
229 public com.liferay.portlet.shopping.model.ShoppingItem updateItem(
230 long userId, long itemId, long categoryId, java.lang.String sku,
231 java.lang.String name, java.lang.String description,
232 java.lang.String properties, java.lang.String fieldsQuantities,
233 boolean requiresShipping, int stockQuantity, boolean featured,
234 java.lang.Boolean sale, boolean smallImage,
235 java.lang.String smallImageURL, java.io.File smallFile,
236 boolean mediumImage, java.lang.String mediumImageURL,
237 java.io.File mediumFile, boolean largeImage,
238 java.lang.String largeImageURL, java.io.File largeFile,
239 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
240 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
241 com.liferay.portal.service.ServiceContext serviceContext)
242 throws com.liferay.portal.PortalException,
243 com.liferay.portal.SystemException;
244 }