1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.shopping.service;
21  
22  import com.liferay.portal.PortalException;
23  import com.liferay.portal.SystemException;
24  import com.liferay.portal.kernel.annotation.Propagation;
25  import com.liferay.portal.kernel.annotation.Transactional;
26  
27  /**
28   * <a href="ShoppingItemLocalService.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This interface defines the service. The default implementation is
37   * <code>com.liferay.portlet.shopping.service.impl.ShoppingItemLocalServiceImpl</code>.
38   * Modify methods in that class and rerun ServiceBuilder to populate this class
39   * and all other generated classes.
40   * </p>
41   *
42   * <p>
43   * 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.
44   * </p>
45   *
46   * @author Brian Wing Shun Chan
47   *
48   * @see com.liferay.portlet.shopping.service.ShoppingItemLocalServiceUtil
49   *
50   */
51  @Transactional(rollbackFor =  {
52      PortalException.class, SystemException.class})
53  public interface ShoppingItemLocalService {
54      public com.liferay.portlet.shopping.model.ShoppingItem addShoppingItem(
55          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
56          throws com.liferay.portal.SystemException;
57  
58      public com.liferay.portlet.shopping.model.ShoppingItem createShoppingItem(
59          long itemId);
60  
61      public void deleteShoppingItem(long itemId)
62          throws com.liferay.portal.SystemException,
63              com.liferay.portal.PortalException;
64  
65      public void deleteShoppingItem(
66          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
67          throws com.liferay.portal.SystemException;
68  
69      public java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
71          throws com.liferay.portal.SystemException;
72  
73      public java.util.List<Object> dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end) throws com.liferay.portal.SystemException;
76  
77      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
78      public com.liferay.portlet.shopping.model.ShoppingItem getShoppingItem(
79          long itemId)
80          throws com.liferay.portal.SystemException,
81              com.liferay.portal.PortalException;
82  
83      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
84      public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getShoppingItems(
85          int start, int end) throws com.liferay.portal.SystemException;
86  
87      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
88      public int getShoppingItemsCount()
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          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.String[] communityPermissions,
129         java.lang.String[] guestPermissions)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException;
132 
133     public com.liferay.portlet.shopping.model.ShoppingItem addItem(
134         long userId, long categoryId, java.lang.String sku,
135         java.lang.String name, java.lang.String description,
136         java.lang.String properties, java.lang.String fieldsQuantities,
137         boolean requiresShipping, int stockQuantity, boolean featured,
138         java.lang.Boolean sale, boolean smallImage,
139         java.lang.String smallImageURL, java.io.File smallFile,
140         boolean mediumImage, java.lang.String mediumImageURL,
141         java.io.File mediumFile, boolean largeImage,
142         java.lang.String largeImageURL, java.io.File largeFile,
143         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
144         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
145         java.lang.Boolean addCommunityPermissions,
146         java.lang.Boolean addGuestPermissions,
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(
158         com.liferay.portlet.shopping.model.ShoppingCategory category,
159         com.liferay.portlet.shopping.model.ShoppingItem item,
160         boolean addCommunityPermissions, boolean addGuestPermissions)
161         throws com.liferay.portal.PortalException,
162             com.liferay.portal.SystemException;
163 
164     public void addItemResources(long itemId,
165         java.lang.String[] communityPermissions,
166         java.lang.String[] guestPermissions)
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 com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
240         long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
241         throws com.liferay.portal.PortalException,
242             com.liferay.portal.SystemException;
243 
244     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245     public int getItemsCount(long categoryId)
246         throws 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 }