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      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
74      public com.liferay.portlet.shopping.model.ShoppingItem getShoppingItem(
75          long itemId)
76          throws com.liferay.portal.kernel.exception.PortalException,
77              com.liferay.portal.kernel.exception.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)
82          throws com.liferay.portal.kernel.exception.SystemException;
83  
84      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
85      public int getShoppingItemsCount()
86          throws com.liferay.portal.kernel.exception.SystemException;
87  
88      public com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
89          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
90          throws com.liferay.portal.kernel.exception.SystemException;
91  
92      public com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
93          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
94          boolean merge)
95          throws com.liferay.portal.kernel.exception.SystemException;
96  
97      public void addBookItems(long userId, long groupId, long categoryId,
98          java.lang.String[] isbns)
99          throws com.liferay.portal.kernel.exception.PortalException,
100             com.liferay.portal.kernel.exception.SystemException;
101 
102     public com.liferay.portlet.shopping.model.ShoppingItem addItem(
103         long userId, long groupId, long categoryId, java.lang.String sku,
104         java.lang.String name, java.lang.String description,
105         java.lang.String properties, java.lang.String fieldsQuantities,
106         boolean requiresShipping, int stockQuantity, boolean featured,
107         java.lang.Boolean sale, boolean smallImage,
108         java.lang.String smallImageURL, java.io.File smallFile,
109         boolean mediumImage, java.lang.String mediumImageURL,
110         java.io.File mediumFile, boolean largeImage,
111         java.lang.String largeImageURL, java.io.File largeFile,
112         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
113         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
114         com.liferay.portal.service.ServiceContext serviceContext)
115         throws com.liferay.portal.kernel.exception.PortalException,
116             com.liferay.portal.kernel.exception.SystemException;
117 
118     public void addItemResources(long itemId, boolean addCommunityPermissions,
119         boolean addGuestPermissions)
120         throws com.liferay.portal.kernel.exception.PortalException,
121             com.liferay.portal.kernel.exception.SystemException;
122 
123     public void addItemResources(long itemId,
124         java.lang.String[] communityPermissions,
125         java.lang.String[] guestPermissions)
126         throws com.liferay.portal.kernel.exception.PortalException,
127             com.liferay.portal.kernel.exception.SystemException;
128 
129     public void addItemResources(
130         com.liferay.portlet.shopping.model.ShoppingItem item,
131         boolean addCommunityPermissions, boolean addGuestPermissions)
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         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 deleteItem(long itemId)
143         throws com.liferay.portal.kernel.exception.PortalException,
144             com.liferay.portal.kernel.exception.SystemException;
145 
146     public void deleteItem(com.liferay.portlet.shopping.model.ShoppingItem item)
147         throws com.liferay.portal.kernel.exception.PortalException,
148             com.liferay.portal.kernel.exception.SystemException;
149 
150     public void deleteItems(long groupId, long categoryId)
151         throws com.liferay.portal.kernel.exception.PortalException,
152             com.liferay.portal.kernel.exception.SystemException;
153 
154     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155     public int getCategoriesItemsCount(long groupId,
156         java.util.List<Long> categoryIds)
157         throws com.liferay.portal.kernel.exception.SystemException;
158 
159     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
161         long groupId, long categoryId, int numOfItems)
162         throws com.liferay.portal.kernel.exception.SystemException;
163 
164     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
165     public com.liferay.portlet.shopping.model.ShoppingItem getItem(long itemId)
166         throws com.liferay.portal.kernel.exception.PortalException,
167             com.liferay.portal.kernel.exception.SystemException;
168 
169     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170     public com.liferay.portlet.shopping.model.ShoppingItem getItem(
171         long companyId, java.lang.String sku)
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 getItemByLargeImageId(
177         long largeImageId)
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 getItemByMediumImageId(
183         long mediumImageId)
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 getItemBySmallImageId(
189         long smallImageId)
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 java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
195         long groupId, long categoryId)
196         throws com.liferay.portal.kernel.exception.SystemException;
197 
198     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
199     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
200         long groupId, long categoryId, int start, int end,
201         com.liferay.portal.kernel.util.OrderByComparator obc)
202         throws com.liferay.portal.kernel.exception.SystemException;
203 
204     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205     public int getItemsCount(long groupId, long categoryId)
206         throws com.liferay.portal.kernel.exception.SystemException;
207 
208     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
209     public com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
210         long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
211         throws com.liferay.portal.kernel.exception.PortalException,
212             com.liferay.portal.kernel.exception.SystemException;
213 
214     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
215     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getSaleItems(
216         long groupId, long categoryId, int numOfItems)
217         throws com.liferay.portal.kernel.exception.SystemException;
218 
219     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> search(
221         long groupId, long[] categoryIds, java.lang.String keywords, int start,
222         int end) throws com.liferay.portal.kernel.exception.SystemException;
223 
224     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225     public int searchCount(long groupId, long[] categoryIds,
226         java.lang.String keywords)
227         throws com.liferay.portal.kernel.exception.SystemException;
228 
229     public com.liferay.portlet.shopping.model.ShoppingItem updateItem(
230         long userId, long itemId, long groupId, long categoryId,
231         java.lang.String sku, java.lang.String name,
232         java.lang.String description, java.lang.String properties,
233         java.lang.String fieldsQuantities, boolean requiresShipping,
234         int stockQuantity, boolean featured, java.lang.Boolean sale,
235         boolean smallImage, java.lang.String smallImageURL,
236         java.io.File smallFile, boolean mediumImage,
237         java.lang.String mediumImageURL, java.io.File mediumFile,
238         boolean largeImage, java.lang.String largeImageURL,
239         java.io.File largeFile,
240         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
241         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
242         com.liferay.portal.service.ServiceContext serviceContext)
243         throws com.liferay.portal.kernel.exception.PortalException,
244             com.liferay.portal.kernel.exception.SystemException;
245 }