1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.shopping.service;
24  
25  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Isolation;
28  import com.liferay.portal.kernel.annotation.Propagation;
29  import com.liferay.portal.kernel.annotation.Transactional;
30  
31  /**
32   * <a href="ShoppingItemLocalService.java.html"><b><i>View Source</i></b></a>
33   *
34   * <p>
35   * ServiceBuilder generated this class. Modifications in this class will be
36   * overwritten the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This interface defines the service. The default implementation is
41   * {@link
42   * com.liferay.portlet.shopping.service.impl.ShoppingItemLocalServiceImpl}}.
43   * Modify methods in that class and rerun ServiceBuilder to populate this class
44   * and all other generated classes.
45   * </p>
46   *
47   * <p>
48   * 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.
49   * </p>
50   *
51   * @author    Brian Wing Shun Chan
52   * @see       ShoppingItemLocalServiceUtil
53   * @generated
54   */
55  @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
56      PortalException.class, SystemException.class})
57  public interface ShoppingItemLocalService {
58      public com.liferay.portlet.shopping.model.ShoppingItem addShoppingItem(
59          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
60          throws com.liferay.portal.SystemException;
61  
62      public com.liferay.portlet.shopping.model.ShoppingItem createShoppingItem(
63          long itemId);
64  
65      public void deleteShoppingItem(long itemId)
66          throws com.liferay.portal.PortalException,
67              com.liferay.portal.SystemException;
68  
69      public void deleteShoppingItem(
70          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
71          throws com.liferay.portal.SystemException;
72  
73      public java.util.List<Object> dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
75          throws com.liferay.portal.SystemException;
76  
77      public java.util.List<Object> dynamicQuery(
78          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
79          int end) throws com.liferay.portal.SystemException;
80  
81      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
82      public com.liferay.portlet.shopping.model.ShoppingItem getShoppingItem(
83          long itemId)
84          throws com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException;
86  
87      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
88      public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getShoppingItems(
89          int start, int end) throws com.liferay.portal.SystemException;
90  
91      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
92      public int getShoppingItemsCount()
93          throws com.liferay.portal.SystemException;
94  
95      public com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
96          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
97          throws com.liferay.portal.SystemException;
98  
99      public com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
100         com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
101         boolean merge) throws com.liferay.portal.SystemException;
102 
103     public void addBookItems(long userId, long categoryId,
104         java.lang.String[] isbns)
105         throws com.liferay.portal.PortalException,
106             com.liferay.portal.SystemException;
107 
108     public com.liferay.portlet.shopping.model.ShoppingItem addItem(
109         long userId, 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         boolean addCommunityPermissions, boolean addGuestPermissions)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException;
123 
124     public com.liferay.portlet.shopping.model.ShoppingItem addItem(
125         long userId, long categoryId, java.lang.String sku,
126         java.lang.String name, java.lang.String description,
127         java.lang.String properties, java.lang.String fieldsQuantities,
128         boolean requiresShipping, int stockQuantity, boolean featured,
129         java.lang.Boolean sale, boolean smallImage,
130         java.lang.String smallImageURL, java.io.File smallFile,
131         boolean mediumImage, java.lang.String mediumImageURL,
132         java.io.File mediumFile, boolean largeImage,
133         java.lang.String largeImageURL, java.io.File largeFile,
134         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
135         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
136         java.lang.String[] communityPermissions,
137         java.lang.String[] guestPermissions)
138         throws com.liferay.portal.PortalException,
139             com.liferay.portal.SystemException;
140 
141     public com.liferay.portlet.shopping.model.ShoppingItem addItem(
142         long userId, long categoryId, java.lang.String sku,
143         java.lang.String name, java.lang.String description,
144         java.lang.String properties, java.lang.String fieldsQuantities,
145         boolean requiresShipping, int stockQuantity, boolean featured,
146         java.lang.Boolean sale, boolean smallImage,
147         java.lang.String smallImageURL, java.io.File smallFile,
148         boolean mediumImage, java.lang.String mediumImageURL,
149         java.io.File mediumFile, boolean largeImage,
150         java.lang.String largeImageURL, java.io.File largeFile,
151         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
152         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
153         java.lang.Boolean addCommunityPermissions,
154         java.lang.Boolean addGuestPermissions,
155         java.lang.String[] communityPermissions,
156         java.lang.String[] guestPermissions)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException;
159 
160     public void addItemResources(long itemId, boolean addCommunityPermissions,
161         boolean addGuestPermissions)
162         throws com.liferay.portal.PortalException,
163             com.liferay.portal.SystemException;
164 
165     public void addItemResources(
166         com.liferay.portlet.shopping.model.ShoppingCategory category,
167         com.liferay.portlet.shopping.model.ShoppingItem item,
168         boolean addCommunityPermissions, boolean addGuestPermissions)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException;
171 
172     public void addItemResources(long itemId,
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 addItemResources(
179         com.liferay.portlet.shopping.model.ShoppingCategory category,
180         com.liferay.portlet.shopping.model.ShoppingItem item,
181         java.lang.String[] communityPermissions,
182         java.lang.String[] guestPermissions)
183         throws com.liferay.portal.PortalException,
184             com.liferay.portal.SystemException;
185 
186     public void deleteItem(long itemId)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException;
189 
190     public void deleteItem(com.liferay.portlet.shopping.model.ShoppingItem item)
191         throws com.liferay.portal.PortalException,
192             com.liferay.portal.SystemException;
193 
194     public void deleteItems(long categoryId)
195         throws com.liferay.portal.PortalException,
196             com.liferay.portal.SystemException;
197 
198     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
199     public int getCategoriesItemsCount(java.util.List<Long> categoryIds)
200         throws com.liferay.portal.SystemException;
201 
202     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
204         long groupId, long categoryId, int numOfItems)
205         throws com.liferay.portal.SystemException;
206 
207     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208     public com.liferay.portlet.shopping.model.ShoppingItem getItem(long itemId)
209         throws com.liferay.portal.PortalException,
210             com.liferay.portal.SystemException;
211 
212     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213     public com.liferay.portlet.shopping.model.ShoppingItem getItem(
214         long companyId, java.lang.String sku)
215         throws com.liferay.portal.PortalException,
216             com.liferay.portal.SystemException;
217 
218     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219     public com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
220         long largeImageId)
221         throws com.liferay.portal.PortalException,
222             com.liferay.portal.SystemException;
223 
224     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225     public com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
226         long mediumImageId)
227         throws com.liferay.portal.PortalException,
228             com.liferay.portal.SystemException;
229 
230     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231     public com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
232         long smallImageId)
233         throws com.liferay.portal.PortalException,
234             com.liferay.portal.SystemException;
235 
236     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
237     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
238         long categoryId) throws com.liferay.portal.SystemException;
239 
240     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
241     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
242         long categoryId, int start, int end,
243         com.liferay.portal.kernel.util.OrderByComparator obc)
244         throws com.liferay.portal.SystemException;
245 
246     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
247     public com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
248         long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
249         throws com.liferay.portal.PortalException,
250             com.liferay.portal.SystemException;
251 
252     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
253     public int getItemsCount(long categoryId)
254         throws com.liferay.portal.SystemException;
255 
256     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
257     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getSaleItems(
258         long groupId, long categoryId, int numOfItems)
259         throws com.liferay.portal.SystemException;
260 
261     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> search(
263         long groupId, long[] categoryIds, java.lang.String keywords, int start,
264         int end) throws com.liferay.portal.SystemException;
265 
266     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
267     public int searchCount(long groupId, long[] categoryIds,
268         java.lang.String keywords) throws com.liferay.portal.SystemException;
269 
270     public com.liferay.portlet.shopping.model.ShoppingItem updateItem(
271         long userId, long itemId, long categoryId, java.lang.String sku,
272         java.lang.String name, java.lang.String description,
273         java.lang.String properties, java.lang.String fieldsQuantities,
274         boolean requiresShipping, int stockQuantity, boolean featured,
275         java.lang.Boolean sale, boolean smallImage,
276         java.lang.String smallImageURL, java.io.File smallFile,
277         boolean mediumImage, java.lang.String mediumImageURL,
278         java.io.File mediumFile, boolean largeImage,
279         java.lang.String largeImageURL, java.io.File largeFile,
280         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
281         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices)
282         throws com.liferay.portal.PortalException,
283             com.liferay.portal.SystemException;
284 }