001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.shopping.service;
022:
023: /**
024: * <a href="ShoppingItemServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portlet.shopping.service.ShoppingItemService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portlet.shopping.service.ShoppingItemServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portlet.shopping.service.ShoppingItemService
047: * @see com.liferay.portlet.shopping.service.ShoppingItemServiceFactory
048: *
049: */
050: public class ShoppingItemServiceUtil {
051: public static void addBookItems(long categoryId,
052: java.lang.String[] isbns)
053: throws com.liferay.portal.PortalException,
054: com.liferay.portal.SystemException,
055: java.rmi.RemoteException {
056: ShoppingItemService shoppingItemService = ShoppingItemServiceFactory
057: .getService();
058:
059: shoppingItemService.addBookItems(categoryId, isbns);
060: }
061:
062: public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
063: long categoryId, java.lang.String sku,
064: java.lang.String name, java.lang.String description,
065: java.lang.String properties,
066: java.lang.String fieldsQuantities,
067: boolean requiresShipping, int stockQuantity,
068: boolean featured, java.lang.Boolean sale,
069: boolean smallImage, java.lang.String smallImageURL,
070: java.io.File smallFile, boolean mediumImage,
071: java.lang.String mediumImageURL, java.io.File mediumFile,
072: boolean largeImage, java.lang.String largeImageURL,
073: java.io.File largeFile, java.util.List itemFields,
074: java.util.List itemPrices, boolean addCommunityPermissions,
075: boolean addGuestPermissions)
076: throws com.liferay.portal.PortalException,
077: com.liferay.portal.SystemException,
078: java.rmi.RemoteException {
079: ShoppingItemService shoppingItemService = ShoppingItemServiceFactory
080: .getService();
081:
082: return shoppingItemService.addItem(categoryId, sku, name,
083: description, properties, fieldsQuantities,
084: requiresShipping, stockQuantity, featured, sale,
085: smallImage, smallImageURL, smallFile, mediumImage,
086: mediumImageURL, mediumFile, largeImage, largeImageURL,
087: largeFile, itemFields, itemPrices,
088: addCommunityPermissions, addGuestPermissions);
089: }
090:
091: public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
092: long categoryId, java.lang.String sku,
093: java.lang.String name, java.lang.String description,
094: java.lang.String properties,
095: java.lang.String fieldsQuantities,
096: boolean requiresShipping, int stockQuantity,
097: boolean featured, java.lang.Boolean sale,
098: boolean smallImage, java.lang.String smallImageURL,
099: java.io.File smallFile, boolean mediumImage,
100: java.lang.String mediumImageURL, java.io.File mediumFile,
101: boolean largeImage, java.lang.String largeImageURL,
102: java.io.File largeFile, java.util.List itemFields,
103: java.util.List itemPrices,
104: java.lang.String[] communityPermissions,
105: java.lang.String[] guestPermissions)
106: throws com.liferay.portal.PortalException,
107: com.liferay.portal.SystemException,
108: java.rmi.RemoteException {
109: ShoppingItemService shoppingItemService = ShoppingItemServiceFactory
110: .getService();
111:
112: return shoppingItemService.addItem(categoryId, sku, name,
113: description, properties, fieldsQuantities,
114: requiresShipping, stockQuantity, featured, sale,
115: smallImage, smallImageURL, smallFile, mediumImage,
116: mediumImageURL, mediumFile, largeImage, largeImageURL,
117: largeFile, itemFields, itemPrices,
118: communityPermissions, guestPermissions);
119: }
120:
121: public static void deleteItem(long itemId)
122: throws com.liferay.portal.PortalException,
123: com.liferay.portal.SystemException,
124: java.rmi.RemoteException {
125: ShoppingItemService shoppingItemService = ShoppingItemServiceFactory
126: .getService();
127:
128: shoppingItemService.deleteItem(itemId);
129: }
130:
131: public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
132: long itemId) throws com.liferay.portal.PortalException,
133: com.liferay.portal.SystemException,
134: java.rmi.RemoteException {
135: ShoppingItemService shoppingItemService = ShoppingItemServiceFactory
136: .getService();
137:
138: return shoppingItemService.getItem(itemId);
139: }
140:
141: public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
142: long itemId, long categoryId, java.lang.String sku,
143: java.lang.String name, java.lang.String description,
144: java.lang.String properties,
145: java.lang.String fieldsQuantities,
146: boolean requiresShipping, int stockQuantity,
147: boolean featured, java.lang.Boolean sale,
148: boolean smallImage, java.lang.String smallImageURL,
149: java.io.File smallFile, boolean mediumImage,
150: java.lang.String mediumImageURL, java.io.File mediumFile,
151: boolean largeImage, java.lang.String largeImageURL,
152: java.io.File largeFile, java.util.List itemFields,
153: java.util.List itemPrices)
154: throws com.liferay.portal.PortalException,
155: com.liferay.portal.SystemException,
156: java.rmi.RemoteException {
157: ShoppingItemService shoppingItemService = ShoppingItemServiceFactory
158: .getService();
159:
160: return shoppingItemService.updateItem(itemId, categoryId, sku,
161: name, description, properties, fieldsQuantities,
162: requiresShipping, stockQuantity, featured, sale,
163: smallImage, smallImageURL, smallFile, mediumImage,
164: mediumImageURL, mediumFile, largeImage, largeImageURL,
165: largeFile, itemFields, itemPrices);
166: }
167: }
|