1   /**
2    * Copyright (c) 2000-2008 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  /**
27   * <a href="ShoppingItemServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.shopping.service.ShoppingItemService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * <p>
43   * <code>com.liferay.portlet.shopping.service.ShoppingItemServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.shopping.service.ShoppingItemService
50   * @see com.liferay.portlet.shopping.service.ShoppingItemServiceFactory
51   *
52   */
53  public class ShoppingItemServiceUtil {
54      public static void addBookItems(long categoryId, java.lang.String[] isbns)
55          throws com.liferay.portal.PortalException,
56              com.liferay.portal.SystemException, java.rmi.RemoteException {
57          ShoppingItemService shoppingItemService = ShoppingItemServiceFactory.getService();
58  
59          shoppingItemService.addBookItems(categoryId, isbns);
60      }
61  
62      public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
63          long categoryId, java.lang.String sku, java.lang.String name,
64          java.lang.String description, java.lang.String properties,
65          java.lang.String fieldsQuantities, boolean requiresShipping,
66          int stockQuantity, boolean featured, java.lang.Boolean sale,
67          boolean smallImage, java.lang.String smallImageURL,
68          java.io.File smallFile, boolean mediumImage,
69          java.lang.String mediumImageURL, java.io.File mediumFile,
70          boolean largeImage, java.lang.String largeImageURL,
71          java.io.File largeFile,
72          java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
73          java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
74          boolean addCommunityPermissions, boolean addGuestPermissions)
75          throws com.liferay.portal.PortalException,
76              com.liferay.portal.SystemException, java.rmi.RemoteException {
77          ShoppingItemService shoppingItemService = ShoppingItemServiceFactory.getService();
78  
79          return shoppingItemService.addItem(categoryId, sku, name, description,
80              properties, fieldsQuantities, requiresShipping, stockQuantity,
81              featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
82              mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
83              itemFields, itemPrices, addCommunityPermissions, addGuestPermissions);
84      }
85  
86      public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
87          long categoryId, java.lang.String sku, java.lang.String name,
88          java.lang.String description, java.lang.String properties,
89          java.lang.String fieldsQuantities, boolean requiresShipping,
90          int stockQuantity, boolean featured, java.lang.Boolean sale,
91          boolean smallImage, java.lang.String smallImageURL,
92          java.io.File smallFile, boolean mediumImage,
93          java.lang.String mediumImageURL, java.io.File mediumFile,
94          boolean largeImage, java.lang.String largeImageURL,
95          java.io.File largeFile,
96          java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
97          java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
98          java.lang.String[] communityPermissions,
99          java.lang.String[] guestPermissions)
100         throws com.liferay.portal.PortalException,
101             com.liferay.portal.SystemException, java.rmi.RemoteException {
102         ShoppingItemService shoppingItemService = ShoppingItemServiceFactory.getService();
103 
104         return shoppingItemService.addItem(categoryId, sku, name, description,
105             properties, fieldsQuantities, requiresShipping, stockQuantity,
106             featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
107             mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
108             itemFields, itemPrices, communityPermissions, guestPermissions);
109     }
110 
111     public static void deleteItem(long itemId)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException, java.rmi.RemoteException {
114         ShoppingItemService shoppingItemService = ShoppingItemServiceFactory.getService();
115 
116         shoppingItemService.deleteItem(itemId);
117     }
118 
119     public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
120         long itemId)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException, java.rmi.RemoteException {
123         ShoppingItemService shoppingItemService = ShoppingItemServiceFactory.getService();
124 
125         return shoppingItemService.getItem(itemId);
126     }
127 
128     public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
129         long itemId, long categoryId, java.lang.String sku,
130         java.lang.String name, java.lang.String description,
131         java.lang.String properties, java.lang.String fieldsQuantities,
132         boolean requiresShipping, int stockQuantity, boolean featured,
133         java.lang.Boolean sale, boolean smallImage,
134         java.lang.String smallImageURL, java.io.File smallFile,
135         boolean mediumImage, java.lang.String mediumImageURL,
136         java.io.File mediumFile, boolean largeImage,
137         java.lang.String largeImageURL, java.io.File largeFile,
138         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
139         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException, java.rmi.RemoteException {
142         ShoppingItemService shoppingItemService = ShoppingItemServiceFactory.getService();
143 
144         return shoppingItemService.updateItem(itemId, categoryId, sku, name,
145             description, properties, fieldsQuantities, requiresShipping,
146             stockQuantity, featured, sale, smallImage, smallImageURL,
147             smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
148             largeImageURL, largeFile, itemFields, itemPrices);
149     }
150 }