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