1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.shopping.service;
16  
17  import com.liferay.portal.kernel.annotation.Isolation;
18  import com.liferay.portal.kernel.annotation.Propagation;
19  import com.liferay.portal.kernel.annotation.Transactional;
20  import com.liferay.portal.kernel.exception.PortalException;
21  import com.liferay.portal.kernel.exception.SystemException;
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.kernel.exception.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.kernel.exception.PortalException,
59              com.liferay.portal.kernel.exception.SystemException;
60  
61      public void deleteShoppingItem(
62          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
63          throws com.liferay.portal.kernel.exception.SystemException;
64  
65      public java.util.List<Object> dynamicQuery(
66          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
67          throws com.liferay.portal.kernel.exception.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.kernel.exception.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.kernel.exception.SystemException;
78  
79      public int dynamicQueryCount(
80          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
81          throws com.liferay.portal.kernel.exception.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.kernel.exception.PortalException,
87              com.liferay.portal.kernel.exception.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)
92          throws com.liferay.portal.kernel.exception.SystemException;
93  
94      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
95      public int getShoppingItemsCount()
96          throws com.liferay.portal.kernel.exception.SystemException;
97  
98      public com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
99          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
100         throws com.liferay.portal.kernel.exception.SystemException;
101 
102     public com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
103         com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
104         boolean merge)
105         throws com.liferay.portal.kernel.exception.SystemException;
106 
107     public void addBookItems(long userId, long groupId, long categoryId,
108         java.lang.String[] isbns)
109         throws com.liferay.portal.kernel.exception.PortalException,
110             com.liferay.portal.kernel.exception.SystemException;
111 
112     public com.liferay.portlet.shopping.model.ShoppingItem addItem(
113         long userId, long groupId, long categoryId, java.lang.String sku,
114         java.lang.String name, java.lang.String description,
115         java.lang.String properties, java.lang.String fieldsQuantities,
116         boolean requiresShipping, int stockQuantity, boolean featured,
117         java.lang.Boolean sale, boolean smallImage,
118         java.lang.String smallImageURL, java.io.File smallFile,
119         boolean mediumImage, java.lang.String mediumImageURL,
120         java.io.File mediumFile, boolean largeImage,
121         java.lang.String largeImageURL, java.io.File largeFile,
122         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
123         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
124         com.liferay.portal.service.ServiceContext serviceContext)
125         throws com.liferay.portal.kernel.exception.PortalException,
126             com.liferay.portal.kernel.exception.SystemException;
127 
128     public void addItemResources(long itemId, boolean addCommunityPermissions,
129         boolean addGuestPermissions)
130         throws com.liferay.portal.kernel.exception.PortalException,
131             com.liferay.portal.kernel.exception.SystemException;
132 
133     public void addItemResources(long itemId,
134         java.lang.String[] communityPermissions,
135         java.lang.String[] guestPermissions)
136         throws com.liferay.portal.kernel.exception.PortalException,
137             com.liferay.portal.kernel.exception.SystemException;
138 
139     public void addItemResources(
140         com.liferay.portlet.shopping.model.ShoppingItem item,
141         boolean addCommunityPermissions, boolean addGuestPermissions)
142         throws com.liferay.portal.kernel.exception.PortalException,
143             com.liferay.portal.kernel.exception.SystemException;
144 
145     public void addItemResources(
146         com.liferay.portlet.shopping.model.ShoppingItem item,
147         java.lang.String[] communityPermissions,
148         java.lang.String[] guestPermissions)
149         throws com.liferay.portal.kernel.exception.PortalException,
150             com.liferay.portal.kernel.exception.SystemException;
151 
152     public void deleteItem(long itemId)
153         throws com.liferay.portal.kernel.exception.PortalException,
154             com.liferay.portal.kernel.exception.SystemException;
155 
156     public void deleteItem(com.liferay.portlet.shopping.model.ShoppingItem item)
157         throws com.liferay.portal.kernel.exception.PortalException,
158             com.liferay.portal.kernel.exception.SystemException;
159 
160     public void deleteItems(long groupId, long categoryId)
161         throws com.liferay.portal.kernel.exception.PortalException,
162             com.liferay.portal.kernel.exception.SystemException;
163 
164     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
165     public int getCategoriesItemsCount(long groupId,
166         java.util.List<Long> categoryIds)
167         throws com.liferay.portal.kernel.exception.SystemException;
168 
169     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
171         long groupId, long categoryId, int numOfItems)
172         throws com.liferay.portal.kernel.exception.SystemException;
173 
174     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
175     public com.liferay.portlet.shopping.model.ShoppingItem getItem(long itemId)
176         throws com.liferay.portal.kernel.exception.PortalException,
177             com.liferay.portal.kernel.exception.SystemException;
178 
179     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180     public com.liferay.portlet.shopping.model.ShoppingItem getItem(
181         long companyId, java.lang.String sku)
182         throws com.liferay.portal.kernel.exception.PortalException,
183             com.liferay.portal.kernel.exception.SystemException;
184 
185     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186     public com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
187         long largeImageId)
188         throws com.liferay.portal.kernel.exception.PortalException,
189             com.liferay.portal.kernel.exception.SystemException;
190 
191     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
192     public com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
193         long mediumImageId)
194         throws com.liferay.portal.kernel.exception.PortalException,
195             com.liferay.portal.kernel.exception.SystemException;
196 
197     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198     public com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
199         long smallImageId)
200         throws com.liferay.portal.kernel.exception.PortalException,
201             com.liferay.portal.kernel.exception.SystemException;
202 
203     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
205         long groupId, long categoryId)
206         throws com.liferay.portal.kernel.exception.SystemException;
207 
208     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
209     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
210         long groupId, long categoryId, int start, int end,
211         com.liferay.portal.kernel.util.OrderByComparator obc)
212         throws com.liferay.portal.kernel.exception.SystemException;
213 
214     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
215     public int getItemsCount(long groupId, long categoryId)
216         throws com.liferay.portal.kernel.exception.SystemException;
217 
218     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219     public com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
220         long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
221         throws com.liferay.portal.kernel.exception.PortalException,
222             com.liferay.portal.kernel.exception.SystemException;
223 
224     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getSaleItems(
226         long groupId, long categoryId, int numOfItems)
227         throws com.liferay.portal.kernel.exception.SystemException;
228 
229     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> search(
231         long groupId, long[] categoryIds, java.lang.String keywords, int start,
232         int end) throws com.liferay.portal.kernel.exception.SystemException;
233 
234     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
235     public int searchCount(long groupId, long[] categoryIds,
236         java.lang.String keywords)
237         throws com.liferay.portal.kernel.exception.SystemException;
238 
239     public com.liferay.portlet.shopping.model.ShoppingItem updateItem(
240         long userId, long itemId, long groupId, long categoryId,
241         java.lang.String sku, java.lang.String name,
242         java.lang.String description, java.lang.String properties,
243         java.lang.String fieldsQuantities, boolean requiresShipping,
244         int stockQuantity, boolean featured, java.lang.Boolean sale,
245         boolean smallImage, java.lang.String smallImageURL,
246         java.io.File smallFile, boolean mediumImage,
247         java.lang.String mediumImageURL, java.io.File mediumFile,
248         boolean largeImage, java.lang.String largeImageURL,
249         java.io.File largeFile,
250         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
251         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
252         com.liferay.portal.service.ServiceContext serviceContext)
253         throws com.liferay.portal.kernel.exception.PortalException,
254             com.liferay.portal.kernel.exception.SystemException;
255 }