1   /**
2    * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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  /**
26   * <a href="ShoppingItemServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portlet.shopping.service.ShoppingItemService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portlet.shopping.service.ShoppingItemServiceFactory</code>
42   * is responsible for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portlet.shopping.service.ShoppingItemService
48   * @see com.liferay.portlet.shopping.service.ShoppingItemServiceFactory
49   *
50   */
51  public class ShoppingItemServiceUtil {
52      public static void addBookItems(long categoryId, java.lang.String[] isbns)
53          throws com.liferay.portal.PortalException, 
54              com.liferay.portal.SystemException, java.rmi.RemoteException {
55          ShoppingItemService shoppingItemService = ShoppingItemServiceFactory.getService();
56          shoppingItemService.addBookItems(categoryId, isbns);
57      }
58  
59      public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
60          long categoryId, java.lang.String sku, java.lang.String name,
61          java.lang.String description, java.lang.String properties,
62          java.lang.String fieldsQuantities, boolean requiresShipping,
63          int stockQuantity, boolean featured, java.lang.Boolean sale,
64          boolean smallImage, java.lang.String smallImageURL,
65          java.io.File smallFile, boolean mediumImage,
66          java.lang.String mediumImageURL, java.io.File mediumFile,
67          boolean largeImage, java.lang.String largeImageURL,
68          java.io.File largeFile, java.util.List itemFields,
69          java.util.List itemPrices, boolean addCommunityPermissions,
70          boolean addGuestPermissions)
71          throws com.liferay.portal.PortalException, 
72              com.liferay.portal.SystemException, java.rmi.RemoteException {
73          ShoppingItemService shoppingItemService = ShoppingItemServiceFactory.getService();
74  
75          return shoppingItemService.addItem(categoryId, sku, name, description,
76              properties, fieldsQuantities, requiresShipping, stockQuantity,
77              featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
78              mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
79              itemFields, itemPrices, addCommunityPermissions, addGuestPermissions);
80      }
81  
82      public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
83          long categoryId, java.lang.String sku, java.lang.String name,
84          java.lang.String description, java.lang.String properties,
85          java.lang.String fieldsQuantities, boolean requiresShipping,
86          int stockQuantity, boolean featured, java.lang.Boolean sale,
87          boolean smallImage, java.lang.String smallImageURL,
88          java.io.File smallFile, boolean mediumImage,
89          java.lang.String mediumImageURL, java.io.File mediumFile,
90          boolean largeImage, java.lang.String largeImageURL,
91          java.io.File largeFile, java.util.List itemFields,
92          java.util.List itemPrices, java.lang.String[] communityPermissions,
93          java.lang.String[] guestPermissions)
94          throws com.liferay.portal.PortalException, 
95              com.liferay.portal.SystemException, java.rmi.RemoteException {
96          ShoppingItemService shoppingItemService = ShoppingItemServiceFactory.getService();
97  
98          return shoppingItemService.addItem(categoryId, sku, name, description,
99              properties, fieldsQuantities, requiresShipping, stockQuantity,
100             featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
101             mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
102             itemFields, itemPrices, communityPermissions, guestPermissions);
103     }
104 
105     public static void deleteItem(long itemId)
106         throws com.liferay.portal.PortalException, 
107             com.liferay.portal.SystemException, java.rmi.RemoteException {
108         ShoppingItemService shoppingItemService = ShoppingItemServiceFactory.getService();
109         shoppingItemService.deleteItem(itemId);
110     }
111 
112     public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
113         long itemId)
114         throws com.liferay.portal.PortalException, 
115             com.liferay.portal.SystemException, java.rmi.RemoteException {
116         ShoppingItemService shoppingItemService = ShoppingItemServiceFactory.getService();
117 
118         return shoppingItemService.getItem(itemId);
119     }
120 
121     public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
122         long itemId, long categoryId, java.lang.String sku,
123         java.lang.String name, java.lang.String description,
124         java.lang.String properties, java.lang.String fieldsQuantities,
125         boolean requiresShipping, int stockQuantity, boolean featured,
126         java.lang.Boolean sale, boolean smallImage,
127         java.lang.String smallImageURL, java.io.File smallFile,
128         boolean mediumImage, java.lang.String mediumImageURL,
129         java.io.File mediumFile, boolean largeImage,
130         java.lang.String largeImageURL, java.io.File largeFile,
131         java.util.List itemFields, java.util.List itemPrices)
132         throws com.liferay.portal.PortalException, 
133             com.liferay.portal.SystemException, java.rmi.RemoteException {
134         ShoppingItemService shoppingItemService = ShoppingItemServiceFactory.getService();
135 
136         return shoppingItemService.updateItem(itemId, categoryId, sku, name,
137             description, properties, fieldsQuantities, requiresShipping,
138             stockQuantity, featured, sale, smallImage, smallImageURL,
139             smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
140             largeImageURL, largeFile, itemFields, itemPrices);
141     }
142 }