1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
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  /**
24   * <a href="ShoppingItemLocalService.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This interface defines the service. The default implementation is
33   * {@link
34   * com.liferay.portlet.shopping.service.impl.ShoppingItemLocalServiceImpl}}.
35   * Modify methods in that class and rerun ServiceBuilder to populate this class
36   * and all other generated classes.
37   * </p>
38   *
39   * <p>
40   * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       ShoppingItemLocalServiceUtil
45   * @generated
46   */
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      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
74      public com.liferay.portlet.shopping.model.ShoppingItem getShoppingItem(
75          long itemId)
76          throws com.liferay.portal.PortalException,
77              com.liferay.portal.SystemException;
78  
79      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
80      public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getShoppingItems(
81          int start, int end) throws com.liferay.portal.SystemException;
82  
83      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
84      public int getShoppingItemsCount()
85          throws com.liferay.portal.SystemException;
86  
87      public com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
88          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
89          throws com.liferay.portal.SystemException;
90  
91      public com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
92          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
93          boolean merge) throws com.liferay.portal.SystemException;
94  
95      public void addBookItems(long userId, long categoryId,
96          java.lang.String[] isbns)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException;
99  
100     public com.liferay.portlet.shopping.model.ShoppingItem addItem(
101         long userId, long categoryId, java.lang.String sku,
102         java.lang.String name, java.lang.String description,
103         java.lang.String properties, java.lang.String fieldsQuantities,
104         boolean requiresShipping, int stockQuantity, boolean featured,
105         java.lang.Boolean sale, boolean smallImage,
106         java.lang.String smallImageURL, java.io.File smallFile,
107         boolean mediumImage, java.lang.String mediumImageURL,
108         java.io.File mediumFile, boolean largeImage,
109         java.lang.String largeImageURL, java.io.File largeFile,
110         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
111         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
112         boolean addCommunityPermissions, boolean addGuestPermissions)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException;
115 
116     public com.liferay.portlet.shopping.model.ShoppingItem addItem(
117         long userId, long categoryId, java.lang.String sku,
118         java.lang.String name, java.lang.String description,
119         java.lang.String properties, java.lang.String fieldsQuantities,
120         boolean requiresShipping, int stockQuantity, boolean featured,
121         java.lang.Boolean sale, boolean smallImage,
122         java.lang.String smallImageURL, java.io.File smallFile,
123         boolean mediumImage, java.lang.String mediumImageURL,
124         java.io.File mediumFile, boolean largeImage,
125         java.lang.String largeImageURL, java.io.File largeFile,
126         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
127         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
128         java.lang.Boolean addCommunityPermissions,
129         java.lang.Boolean addGuestPermissions,
130         java.lang.String[] communityPermissions,
131         java.lang.String[] guestPermissions)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException;
134 
135     public com.liferay.portlet.shopping.model.ShoppingItem addItem(
136         long userId, long categoryId, java.lang.String sku,
137         java.lang.String name, java.lang.String description,
138         java.lang.String properties, java.lang.String fieldsQuantities,
139         boolean requiresShipping, int stockQuantity, boolean featured,
140         java.lang.Boolean sale, boolean smallImage,
141         java.lang.String smallImageURL, java.io.File smallFile,
142         boolean mediumImage, java.lang.String mediumImageURL,
143         java.io.File mediumFile, boolean largeImage,
144         java.lang.String largeImageURL, java.io.File largeFile,
145         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
146         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
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 addItemResources(long itemId, boolean addCommunityPermissions,
153         boolean addGuestPermissions)
154         throws com.liferay.portal.PortalException,
155             com.liferay.portal.SystemException;
156 
157     public void addItemResources(long itemId,
158         java.lang.String[] communityPermissions,
159         java.lang.String[] guestPermissions)
160         throws com.liferay.portal.PortalException,
161             com.liferay.portal.SystemException;
162 
163     public void addItemResources(
164         com.liferay.portlet.shopping.model.ShoppingCategory category,
165         com.liferay.portlet.shopping.model.ShoppingItem item,
166         boolean addCommunityPermissions, boolean addGuestPermissions)
167         throws com.liferay.portal.PortalException,
168             com.liferay.portal.SystemException;
169 
170     public void addItemResources(
171         com.liferay.portlet.shopping.model.ShoppingCategory category,
172         com.liferay.portlet.shopping.model.ShoppingItem item,
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 deleteItem(long itemId)
179         throws com.liferay.portal.PortalException,
180             com.liferay.portal.SystemException;
181 
182     public void deleteItem(com.liferay.portlet.shopping.model.ShoppingItem item)
183         throws com.liferay.portal.PortalException,
184             com.liferay.portal.SystemException;
185 
186     public void deleteItems(long categoryId)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException;
189 
190     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191     public int getCategoriesItemsCount(java.util.List<Long> categoryIds)
192         throws com.liferay.portal.SystemException;
193 
194     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
196         long groupId, long categoryId, int numOfItems)
197         throws com.liferay.portal.SystemException;
198 
199     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200     public com.liferay.portlet.shopping.model.ShoppingItem getItem(long itemId)
201         throws com.liferay.portal.PortalException,
202             com.liferay.portal.SystemException;
203 
204     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205     public com.liferay.portlet.shopping.model.ShoppingItem getItem(
206         long companyId, java.lang.String sku)
207         throws com.liferay.portal.PortalException,
208             com.liferay.portal.SystemException;
209 
210     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211     public com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
212         long largeImageId)
213         throws com.liferay.portal.PortalException,
214             com.liferay.portal.SystemException;
215 
216     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217     public com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
218         long mediumImageId)
219         throws com.liferay.portal.PortalException,
220             com.liferay.portal.SystemException;
221 
222     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223     public com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
224         long smallImageId)
225         throws com.liferay.portal.PortalException,
226             com.liferay.portal.SystemException;
227 
228     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
230         long categoryId) throws com.liferay.portal.SystemException;
231 
232     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
234         long categoryId, int start, int end,
235         com.liferay.portal.kernel.util.OrderByComparator obc)
236         throws com.liferay.portal.SystemException;
237 
238     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239     public int getItemsCount(long categoryId)
240         throws com.liferay.portal.SystemException;
241 
242     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243     public com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
244         long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
245         throws com.liferay.portal.PortalException,
246             com.liferay.portal.SystemException;
247 
248     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getSaleItems(
250         long groupId, long categoryId, int numOfItems)
251         throws com.liferay.portal.SystemException;
252 
253     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> search(
255         long groupId, long[] categoryIds, java.lang.String keywords, int start,
256         int end) throws com.liferay.portal.SystemException;
257 
258     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259     public int searchCount(long groupId, long[] categoryIds,
260         java.lang.String keywords) throws com.liferay.portal.SystemException;
261 
262     public com.liferay.portlet.shopping.model.ShoppingItem updateItem(
263         long userId, long itemId, long categoryId, java.lang.String sku,
264         java.lang.String name, java.lang.String description,
265         java.lang.String properties, java.lang.String fieldsQuantities,
266         boolean requiresShipping, int stockQuantity, boolean featured,
267         java.lang.Boolean sale, boolean smallImage,
268         java.lang.String smallImageURL, java.io.File smallFile,
269         boolean mediumImage, java.lang.String mediumImageURL,
270         java.io.File mediumFile, boolean largeImage,
271         java.lang.String largeImageURL, java.io.File largeFile,
272         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
273         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices)
274         throws com.liferay.portal.PortalException,
275             com.liferay.portal.SystemException;
276 }