001
014
015 package com.liferay.portlet.shopping.service;
016
017 import com.liferay.portal.kernel.annotation.Isolation;
018 import com.liferay.portal.kernel.annotation.Propagation;
019 import com.liferay.portal.kernel.annotation.Transactional;
020 import com.liferay.portal.kernel.exception.PortalException;
021 import com.liferay.portal.kernel.exception.SystemException;
022
023
040 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
041 PortalException.class, SystemException.class})
042 public interface ShoppingItemLocalService {
043 public com.liferay.portlet.shopping.model.ShoppingItem addShoppingItem(
044 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
045 throws com.liferay.portal.kernel.exception.SystemException;
046
047 public com.liferay.portlet.shopping.model.ShoppingItem createShoppingItem(
048 long itemId);
049
050 public void deleteShoppingItem(long itemId)
051 throws com.liferay.portal.kernel.exception.PortalException,
052 com.liferay.portal.kernel.exception.SystemException;
053
054 public void deleteShoppingItem(
055 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
056 throws com.liferay.portal.kernel.exception.SystemException;
057
058 @SuppressWarnings("unchecked")
059 public java.util.List dynamicQuery(
060 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
061 throws com.liferay.portal.kernel.exception.SystemException;
062
063 @SuppressWarnings("unchecked")
064 public java.util.List dynamicQuery(
065 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066 int end) throws com.liferay.portal.kernel.exception.SystemException;
067
068 @SuppressWarnings("unchecked")
069 public java.util.List dynamicQuery(
070 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
071 int end,
072 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
073 throws com.liferay.portal.kernel.exception.SystemException;
074
075 public long dynamicQueryCount(
076 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
077 throws com.liferay.portal.kernel.exception.SystemException;
078
079 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
080 public com.liferay.portlet.shopping.model.ShoppingItem getShoppingItem(
081 long itemId)
082 throws com.liferay.portal.kernel.exception.PortalException,
083 com.liferay.portal.kernel.exception.SystemException;
084
085 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
086 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getShoppingItems(
087 int start, int end)
088 throws com.liferay.portal.kernel.exception.SystemException;
089
090 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
091 public int getShoppingItemsCount()
092 throws com.liferay.portal.kernel.exception.SystemException;
093
094 public com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
095 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
096 throws com.liferay.portal.kernel.exception.SystemException;
097
098 public com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
099 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
100 boolean merge)
101 throws com.liferay.portal.kernel.exception.SystemException;
102
103 public void addBookItems(long userId, long groupId, long categoryId,
104 java.lang.String[] isbns)
105 throws com.liferay.portal.kernel.exception.PortalException,
106 com.liferay.portal.kernel.exception.SystemException;
107
108 public com.liferay.portlet.shopping.model.ShoppingItem addItem(
109 long userId, long groupId, 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 com.liferay.portal.service.ServiceContext serviceContext)
121 throws com.liferay.portal.kernel.exception.PortalException,
122 com.liferay.portal.kernel.exception.SystemException;
123
124 public void addItemResources(long itemId, boolean addCommunityPermissions,
125 boolean addGuestPermissions)
126 throws com.liferay.portal.kernel.exception.PortalException,
127 com.liferay.portal.kernel.exception.SystemException;
128
129 public void addItemResources(long itemId,
130 java.lang.String[] communityPermissions,
131 java.lang.String[] guestPermissions)
132 throws com.liferay.portal.kernel.exception.PortalException,
133 com.liferay.portal.kernel.exception.SystemException;
134
135 public void addItemResources(
136 com.liferay.portlet.shopping.model.ShoppingItem item,
137 boolean addCommunityPermissions, boolean addGuestPermissions)
138 throws com.liferay.portal.kernel.exception.PortalException,
139 com.liferay.portal.kernel.exception.SystemException;
140
141 public void addItemResources(
142 com.liferay.portlet.shopping.model.ShoppingItem item,
143 java.lang.String[] communityPermissions,
144 java.lang.String[] guestPermissions)
145 throws com.liferay.portal.kernel.exception.PortalException,
146 com.liferay.portal.kernel.exception.SystemException;
147
148 public void deleteItem(long itemId)
149 throws com.liferay.portal.kernel.exception.PortalException,
150 com.liferay.portal.kernel.exception.SystemException;
151
152 public void deleteItem(com.liferay.portlet.shopping.model.ShoppingItem item)
153 throws com.liferay.portal.kernel.exception.PortalException,
154 com.liferay.portal.kernel.exception.SystemException;
155
156 public void deleteItems(long groupId, long categoryId)
157 throws com.liferay.portal.kernel.exception.PortalException,
158 com.liferay.portal.kernel.exception.SystemException;
159
160 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
161 public int getCategoriesItemsCount(long groupId,
162 java.util.List<java.lang.Long> categoryIds)
163 throws com.liferay.portal.kernel.exception.SystemException;
164
165 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
167 long groupId, long categoryId, int numOfItems)
168 throws com.liferay.portal.kernel.exception.SystemException;
169
170 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171 public com.liferay.portlet.shopping.model.ShoppingItem getItem(long itemId)
172 throws com.liferay.portal.kernel.exception.PortalException,
173 com.liferay.portal.kernel.exception.SystemException;
174
175 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176 public com.liferay.portlet.shopping.model.ShoppingItem getItem(
177 long companyId, java.lang.String sku)
178 throws com.liferay.portal.kernel.exception.PortalException,
179 com.liferay.portal.kernel.exception.SystemException;
180
181 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182 public com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
183 long largeImageId)
184 throws com.liferay.portal.kernel.exception.PortalException,
185 com.liferay.portal.kernel.exception.SystemException;
186
187 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
188 public com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
189 long mediumImageId)
190 throws com.liferay.portal.kernel.exception.PortalException,
191 com.liferay.portal.kernel.exception.SystemException;
192
193 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194 public com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
195 long smallImageId)
196 throws com.liferay.portal.kernel.exception.PortalException,
197 com.liferay.portal.kernel.exception.SystemException;
198
199 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
201 long groupId, long categoryId)
202 throws com.liferay.portal.kernel.exception.SystemException;
203
204 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
206 long groupId, long categoryId, int start, int end,
207 com.liferay.portal.kernel.util.OrderByComparator obc)
208 throws com.liferay.portal.kernel.exception.SystemException;
209
210 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211 public int getItemsCount(long groupId, long categoryId)
212 throws com.liferay.portal.kernel.exception.SystemException;
213
214 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
215 public com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
216 long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
217 throws com.liferay.portal.kernel.exception.PortalException,
218 com.liferay.portal.kernel.exception.SystemException;
219
220 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getSaleItems(
222 long groupId, long categoryId, int numOfItems)
223 throws com.liferay.portal.kernel.exception.SystemException;
224
225 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
226 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> search(
227 long groupId, long[] categoryIds, java.lang.String keywords, int start,
228 int end) throws com.liferay.portal.kernel.exception.SystemException;
229
230 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231 public int searchCount(long groupId, long[] categoryIds,
232 java.lang.String keywords)
233 throws com.liferay.portal.kernel.exception.SystemException;
234
235 public com.liferay.portlet.shopping.model.ShoppingItem updateItem(
236 long userId, long itemId, long groupId, long categoryId,
237 java.lang.String sku, java.lang.String name,
238 java.lang.String description, java.lang.String properties,
239 java.lang.String fieldsQuantities, boolean requiresShipping,
240 int stockQuantity, boolean featured, java.lang.Boolean sale,
241 boolean smallImage, java.lang.String smallImageURL,
242 java.io.File smallFile, boolean mediumImage,
243 java.lang.String mediumImageURL, java.io.File mediumFile,
244 boolean largeImage, java.lang.String largeImageURL,
245 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.kernel.exception.PortalException,
250 com.liferay.portal.kernel.exception.SystemException;
251 }