001    /**
002     * Copyright (c) 2000-2012 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    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the shopping item remote service. This utility wraps {@link com.liferay.portlet.shopping.service.impl.ShoppingItemServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see ShoppingItemService
030     * @see com.liferay.portlet.shopping.service.base.ShoppingItemServiceBaseImpl
031     * @see com.liferay.portlet.shopping.service.impl.ShoppingItemServiceImpl
032     * @generated
033     */
034    public class ShoppingItemServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.shopping.service.impl.ShoppingItemServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static void addBookItems(long groupId, long categoryId,
041                    java.lang.String[] isbns)
042                    throws com.liferay.portal.kernel.exception.PortalException,
043                            com.liferay.portal.kernel.exception.SystemException {
044                    getService().addBookItems(groupId, categoryId, isbns);
045            }
046    
047            public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
048                    long groupId, long categoryId, java.lang.String sku,
049                    java.lang.String name, java.lang.String description,
050                    java.lang.String properties, java.lang.String fieldsQuantities,
051                    boolean requiresShipping, int stockQuantity, boolean featured,
052                    java.lang.Boolean sale, boolean smallImage,
053                    java.lang.String smallImageURL, java.io.File smallFile,
054                    boolean mediumImage, java.lang.String mediumImageURL,
055                    java.io.File mediumFile, boolean largeImage,
056                    java.lang.String largeImageURL, java.io.File largeFile,
057                    java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
058                    java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
059                    com.liferay.portal.service.ServiceContext serviceContext)
060                    throws com.liferay.portal.kernel.exception.PortalException,
061                            com.liferay.portal.kernel.exception.SystemException {
062                    return getService()
063                                       .addItem(groupId, categoryId, sku, name, description,
064                            properties, fieldsQuantities, requiresShipping, stockQuantity,
065                            featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
066                            mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
067                            itemFields, itemPrices, serviceContext);
068            }
069    
070            public static void deleteItem(long itemId)
071                    throws com.liferay.portal.kernel.exception.PortalException,
072                            com.liferay.portal.kernel.exception.SystemException {
073                    getService().deleteItem(itemId);
074            }
075    
076            public static int getCategoriesItemsCount(long groupId,
077                    java.util.List<java.lang.Long> categoryIds)
078                    throws com.liferay.portal.kernel.exception.SystemException {
079                    return getService().getCategoriesItemsCount(groupId, categoryIds);
080            }
081    
082            public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
083                    long itemId)
084                    throws com.liferay.portal.kernel.exception.PortalException,
085                            com.liferay.portal.kernel.exception.SystemException {
086                    return getService().getItem(itemId);
087            }
088    
089            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
090                    long groupId, long categoryId)
091                    throws com.liferay.portal.kernel.exception.SystemException {
092                    return getService().getItems(groupId, categoryId);
093            }
094    
095            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
096                    long groupId, long categoryId, int start, int end,
097                    com.liferay.portal.kernel.util.OrderByComparator obc)
098                    throws com.liferay.portal.kernel.exception.SystemException {
099                    return getService().getItems(groupId, categoryId, start, end, obc);
100            }
101    
102            public static int getItemsCount(long groupId, long categoryId)
103                    throws com.liferay.portal.kernel.exception.SystemException {
104                    return getService().getItemsCount(groupId, categoryId);
105            }
106    
107            public static com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
108                    long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
109                    throws com.liferay.portal.kernel.exception.PortalException,
110                            com.liferay.portal.kernel.exception.SystemException {
111                    return getService().getItemsPrevAndNext(itemId, obc);
112            }
113    
114            public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
115                    long itemId, long groupId, long categoryId, java.lang.String sku,
116                    java.lang.String name, java.lang.String description,
117                    java.lang.String properties, java.lang.String fieldsQuantities,
118                    boolean requiresShipping, int stockQuantity, boolean featured,
119                    java.lang.Boolean sale, boolean smallImage,
120                    java.lang.String smallImageURL, java.io.File smallFile,
121                    boolean mediumImage, java.lang.String mediumImageURL,
122                    java.io.File mediumFile, boolean largeImage,
123                    java.lang.String largeImageURL, java.io.File largeFile,
124                    java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
125                    java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
126                    com.liferay.portal.service.ServiceContext serviceContext)
127                    throws com.liferay.portal.kernel.exception.PortalException,
128                            com.liferay.portal.kernel.exception.SystemException {
129                    return getService()
130                                       .updateItem(itemId, groupId, categoryId, sku, name,
131                            description, properties, fieldsQuantities, requiresShipping,
132                            stockQuantity, featured, sale, smallImage, smallImageURL,
133                            smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
134                            largeImageURL, largeFile, itemFields, itemPrices, serviceContext);
135            }
136    
137            public static ShoppingItemService getService() {
138                    if (_service == null) {
139                            _service = (ShoppingItemService)PortalBeanLocatorUtil.locate(ShoppingItemService.class.getName());
140    
141                            ReferenceRegistry.registerReference(ShoppingItemServiceUtil.class,
142                                    "_service");
143                            MethodCache.remove(ShoppingItemService.class);
144                    }
145    
146                    return _service;
147            }
148    
149            public void setService(ShoppingItemService service) {
150                    MethodCache.remove(ShoppingItemService.class);
151    
152                    _service = service;
153    
154                    ReferenceRegistry.registerReference(ShoppingItemServiceUtil.class,
155                            "_service");
156                    MethodCache.remove(ShoppingItemService.class);
157            }
158    
159            private static ShoppingItemService _service;
160    }