1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.shopping.service;
21  
22  
23  /**
24   * <a href="ShoppingItemServiceUtil.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides static methods for the
33   * <code>com.liferay.portlet.shopping.service.ShoppingItemService</code>
34   * bean. The static methods of this class calls the same methods of the bean
35   * instance. It's convenient to be able to just write one line to call a method
36   * on a bean instead of writing a lookup call and a method call.
37   * </p>
38   *
39   * @author Brian Wing Shun Chan
40   *
41   * @see com.liferay.portlet.shopping.service.ShoppingItemService
42   *
43   */
44  public class ShoppingItemServiceUtil {
45      public static void addBookItems(long categoryId, java.lang.String[] isbns)
46          throws com.liferay.portal.PortalException,
47              com.liferay.portal.SystemException, java.rmi.RemoteException {
48          getService().addBookItems(categoryId, isbns);
49      }
50  
51      public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
52          long categoryId, java.lang.String sku, java.lang.String name,
53          java.lang.String description, java.lang.String properties,
54          java.lang.String fieldsQuantities, boolean requiresShipping,
55          int stockQuantity, boolean featured, java.lang.Boolean sale,
56          boolean smallImage, java.lang.String smallImageURL,
57          java.io.File smallFile, boolean mediumImage,
58          java.lang.String mediumImageURL, java.io.File mediumFile,
59          boolean largeImage, java.lang.String largeImageURL,
60          java.io.File largeFile,
61          java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
62          java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
63          boolean addCommunityPermissions, boolean addGuestPermissions)
64          throws com.liferay.portal.PortalException,
65              com.liferay.portal.SystemException, java.rmi.RemoteException {
66          return getService()
67                     .addItem(categoryId, sku, name, description, properties,
68              fieldsQuantities, requiresShipping, stockQuantity, featured, sale,
69              smallImage, smallImageURL, smallFile, mediumImage, mediumImageURL,
70              mediumFile, largeImage, largeImageURL, largeFile, itemFields,
71              itemPrices, addCommunityPermissions, addGuestPermissions);
72      }
73  
74      public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
75          long categoryId, java.lang.String sku, java.lang.String name,
76          java.lang.String description, java.lang.String properties,
77          java.lang.String fieldsQuantities, boolean requiresShipping,
78          int stockQuantity, boolean featured, java.lang.Boolean sale,
79          boolean smallImage, java.lang.String smallImageURL,
80          java.io.File smallFile, boolean mediumImage,
81          java.lang.String mediumImageURL, java.io.File mediumFile,
82          boolean largeImage, java.lang.String largeImageURL,
83          java.io.File largeFile,
84          java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
85          java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
86          java.lang.String[] communityPermissions,
87          java.lang.String[] guestPermissions)
88          throws com.liferay.portal.PortalException,
89              com.liferay.portal.SystemException, java.rmi.RemoteException {
90          return getService()
91                     .addItem(categoryId, sku, name, description, properties,
92              fieldsQuantities, requiresShipping, stockQuantity, featured, sale,
93              smallImage, smallImageURL, smallFile, mediumImage, mediumImageURL,
94              mediumFile, largeImage, largeImageURL, largeFile, itemFields,
95              itemPrices, communityPermissions, guestPermissions);
96      }
97  
98      public static void deleteItem(long itemId)
99          throws com.liferay.portal.PortalException,
100             com.liferay.portal.SystemException, java.rmi.RemoteException {
101         getService().deleteItem(itemId);
102     }
103 
104     public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
105         long itemId)
106         throws com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException, java.rmi.RemoteException {
108         return getService().getItem(itemId);
109     }
110 
111     public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
112         long itemId, long categoryId, java.lang.String sku,
113         java.lang.String name, java.lang.String description,
114         java.lang.String properties, java.lang.String fieldsQuantities,
115         boolean requiresShipping, int stockQuantity, boolean featured,
116         java.lang.Boolean sale, boolean smallImage,
117         java.lang.String smallImageURL, java.io.File smallFile,
118         boolean mediumImage, java.lang.String mediumImageURL,
119         java.io.File mediumFile, boolean largeImage,
120         java.lang.String largeImageURL, java.io.File largeFile,
121         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
122         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices)
123         throws com.liferay.portal.PortalException,
124             com.liferay.portal.SystemException, java.rmi.RemoteException {
125         return getService()
126                    .updateItem(itemId, categoryId, sku, name, description,
127             properties, fieldsQuantities, requiresShipping, stockQuantity,
128             featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
129             mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
130             itemFields, itemPrices);
131     }
132 
133     public static ShoppingItemService getService() {
134         if (_service == null) {
135             throw new RuntimeException("ShoppingItemService is not set");
136         }
137 
138         return _service;
139     }
140 
141     public void setService(ShoppingItemService service) {
142         _service = service;
143     }
144 
145     private static ShoppingItemService _service;
146 }