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.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="ShoppingItemServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link ShoppingItemService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       ShoppingItemService
37   * @generated
38   */
39  public class ShoppingItemServiceUtil {
40      public static void addBookItems(long groupId, long categoryId,
41          java.lang.String[] isbns)
42          throws com.liferay.portal.kernel.exception.PortalException,
43              com.liferay.portal.kernel.exception.SystemException {
44          getService().addBookItems(groupId, categoryId, isbns);
45      }
46  
47      public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
48          long groupId, long categoryId, java.lang.String sku,
49          java.lang.String name, java.lang.String description,
50          java.lang.String properties, java.lang.String fieldsQuantities,
51          boolean requiresShipping, int stockQuantity, boolean featured,
52          java.lang.Boolean sale, boolean smallImage,
53          java.lang.String smallImageURL, java.io.File smallFile,
54          boolean mediumImage, java.lang.String mediumImageURL,
55          java.io.File mediumFile, boolean largeImage,
56          java.lang.String largeImageURL, java.io.File largeFile,
57          java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
58          java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
59          com.liferay.portal.service.ServiceContext serviceContext)
60          throws com.liferay.portal.kernel.exception.PortalException,
61              com.liferay.portal.kernel.exception.SystemException {
62          return getService()
63                     .addItem(groupId, categoryId, sku, name, description,
64              properties, fieldsQuantities, requiresShipping, stockQuantity,
65              featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
66              mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
67              itemFields, itemPrices, serviceContext);
68      }
69  
70      public static void deleteItem(long itemId)
71          throws com.liferay.portal.kernel.exception.PortalException,
72              com.liferay.portal.kernel.exception.SystemException {
73          getService().deleteItem(itemId);
74      }
75  
76      public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
77          long itemId)
78          throws com.liferay.portal.kernel.exception.PortalException,
79              com.liferay.portal.kernel.exception.SystemException {
80          return getService().getItem(itemId);
81      }
82  
83      public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
84          long itemId, long groupId, long categoryId, java.lang.String sku,
85          java.lang.String name, java.lang.String description,
86          java.lang.String properties, java.lang.String fieldsQuantities,
87          boolean requiresShipping, int stockQuantity, boolean featured,
88          java.lang.Boolean sale, boolean smallImage,
89          java.lang.String smallImageURL, java.io.File smallFile,
90          boolean mediumImage, java.lang.String mediumImageURL,
91          java.io.File mediumFile, boolean largeImage,
92          java.lang.String largeImageURL, java.io.File largeFile,
93          java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
94          java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
95          com.liferay.portal.service.ServiceContext serviceContext)
96          throws com.liferay.portal.kernel.exception.PortalException,
97              com.liferay.portal.kernel.exception.SystemException {
98          return getService()
99                     .updateItem(itemId, groupId, categoryId, sku, name,
100             description, properties, fieldsQuantities, requiresShipping,
101             stockQuantity, featured, sale, smallImage, smallImageURL,
102             smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
103             largeImageURL, largeFile, itemFields, itemPrices, serviceContext);
104     }
105 
106     public static ShoppingItemService getService() {
107         if (_service == null) {
108             _service = (ShoppingItemService)PortalBeanLocatorUtil.locate(ShoppingItemService.class.getName());
109         }
110 
111         return _service;
112     }
113 
114     public void setService(ShoppingItemService service) {
115         _service = service;
116     }
117 
118     private static ShoppingItemService _service;
119 }