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