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