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