001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.shopping.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link ShoppingItemService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       ShoppingItemService
030     * @generated
031     */
032    public class ShoppingItemServiceUtil {
033            public static void addBookItems(long groupId, long categoryId,
034                    java.lang.String[] isbns)
035                    throws com.liferay.portal.kernel.exception.PortalException,
036                            com.liferay.portal.kernel.exception.SystemException {
037                    getService().addBookItems(groupId, categoryId, isbns);
038            }
039    
040            public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
041                    long groupId, long categoryId, java.lang.String sku,
042                    java.lang.String name, java.lang.String description,
043                    java.lang.String properties, java.lang.String fieldsQuantities,
044                    boolean requiresShipping, int stockQuantity, boolean featured,
045                    java.lang.Boolean sale, boolean smallImage,
046                    java.lang.String smallImageURL, java.io.File smallFile,
047                    boolean mediumImage, java.lang.String mediumImageURL,
048                    java.io.File mediumFile, boolean largeImage,
049                    java.lang.String largeImageURL, java.io.File largeFile,
050                    java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
051                    java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
052                    com.liferay.portal.service.ServiceContext serviceContext)
053                    throws com.liferay.portal.kernel.exception.PortalException,
054                            com.liferay.portal.kernel.exception.SystemException {
055                    return getService()
056                                       .addItem(groupId, categoryId, sku, name, description,
057                            properties, fieldsQuantities, requiresShipping, stockQuantity,
058                            featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
059                            mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
060                            itemFields, itemPrices, serviceContext);
061            }
062    
063            public static void deleteItem(long itemId)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    getService().deleteItem(itemId);
067            }
068    
069            public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
070                    long itemId)
071                    throws com.liferay.portal.kernel.exception.PortalException,
072                            com.liferay.portal.kernel.exception.SystemException {
073                    return getService().getItem(itemId);
074            }
075    
076            public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
077                    long itemId, long groupId, long categoryId, java.lang.String sku,
078                    java.lang.String name, java.lang.String description,
079                    java.lang.String properties, java.lang.String fieldsQuantities,
080                    boolean requiresShipping, int stockQuantity, boolean featured,
081                    java.lang.Boolean sale, boolean smallImage,
082                    java.lang.String smallImageURL, java.io.File smallFile,
083                    boolean mediumImage, java.lang.String mediumImageURL,
084                    java.io.File mediumFile, boolean largeImage,
085                    java.lang.String largeImageURL, java.io.File largeFile,
086                    java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
087                    java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
088                    com.liferay.portal.service.ServiceContext serviceContext)
089                    throws com.liferay.portal.kernel.exception.PortalException,
090                            com.liferay.portal.kernel.exception.SystemException {
091                    return getService()
092                                       .updateItem(itemId, groupId, categoryId, sku, name,
093                            description, properties, fieldsQuantities, requiresShipping,
094                            stockQuantity, featured, sale, smallImage, smallImageURL,
095                            smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
096                            largeImageURL, largeFile, itemFields, itemPrices, serviceContext);
097            }
098    
099            public static ShoppingItemService getService() {
100                    if (_service == null) {
101                            _service = (ShoppingItemService)PortalBeanLocatorUtil.locate(ShoppingItemService.class.getName());
102                    }
103    
104                    return _service;
105            }
106    
107            public void setService(ShoppingItemService service) {
108                    _service = service;
109            }
110    
111            private static ShoppingItemService _service;
112    }