001
014
015 package com.liferay.portlet.shopping.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019 import com.liferay.portal.kernel.util.ListUtil;
020
021 import com.liferay.portlet.shopping.service.ShoppingItemServiceUtil;
022
023 import java.rmi.RemoteException;
024
025
068 public class ShoppingItemServiceSoap {
069 public static void addBookItems(long groupId, long categoryId,
070 java.lang.String[] isbns) throws RemoteException {
071 try {
072 ShoppingItemServiceUtil.addBookItems(groupId, categoryId, isbns);
073 }
074 catch (Exception e) {
075 _log.error(e, e);
076
077 throw new RemoteException(e.getMessage());
078 }
079 }
080
081 public static void deleteItem(long itemId) throws RemoteException {
082 try {
083 ShoppingItemServiceUtil.deleteItem(itemId);
084 }
085 catch (Exception e) {
086 _log.error(e, e);
087
088 throw new RemoteException(e.getMessage());
089 }
090 }
091
092 public static int getCategoriesItemsCount(long groupId, Long[] categoryIds)
093 throws RemoteException {
094 try {
095 int returnValue = ShoppingItemServiceUtil.getCategoriesItemsCount(groupId,
096 ListUtil.toList(categoryIds));
097
098 return returnValue;
099 }
100 catch (Exception e) {
101 _log.error(e, e);
102
103 throw new RemoteException(e.getMessage());
104 }
105 }
106
107 public static com.liferay.portlet.shopping.model.ShoppingItemSoap getItem(
108 long itemId) throws RemoteException {
109 try {
110 com.liferay.portlet.shopping.model.ShoppingItem returnValue = ShoppingItemServiceUtil.getItem(itemId);
111
112 return com.liferay.portlet.shopping.model.ShoppingItemSoap.toSoapModel(returnValue);
113 }
114 catch (Exception e) {
115 _log.error(e, e);
116
117 throw new RemoteException(e.getMessage());
118 }
119 }
120
121 public static com.liferay.portlet.shopping.model.ShoppingItemSoap[] getItems(
122 long groupId, long categoryId) throws RemoteException {
123 try {
124 java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> returnValue =
125 ShoppingItemServiceUtil.getItems(groupId, categoryId);
126
127 return com.liferay.portlet.shopping.model.ShoppingItemSoap.toSoapModels(returnValue);
128 }
129 catch (Exception e) {
130 _log.error(e, e);
131
132 throw new RemoteException(e.getMessage());
133 }
134 }
135
136 public static com.liferay.portlet.shopping.model.ShoppingItemSoap[] getItems(
137 long groupId, long categoryId, int start, int end,
138 com.liferay.portal.kernel.util.OrderByComparator obc)
139 throws RemoteException {
140 try {
141 java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> returnValue =
142 ShoppingItemServiceUtil.getItems(groupId, categoryId, start,
143 end, obc);
144
145 return com.liferay.portlet.shopping.model.ShoppingItemSoap.toSoapModels(returnValue);
146 }
147 catch (Exception e) {
148 _log.error(e, e);
149
150 throw new RemoteException(e.getMessage());
151 }
152 }
153
154 public static int getItemsCount(long groupId, long categoryId)
155 throws RemoteException {
156 try {
157 int returnValue = ShoppingItemServiceUtil.getItemsCount(groupId,
158 categoryId);
159
160 return returnValue;
161 }
162 catch (Exception e) {
163 _log.error(e, e);
164
165 throw new RemoteException(e.getMessage());
166 }
167 }
168
169 public static com.liferay.portlet.shopping.model.ShoppingItemSoap[] getItemsPrevAndNext(
170 long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
171 throws RemoteException {
172 try {
173 com.liferay.portlet.shopping.model.ShoppingItem[] returnValue = ShoppingItemServiceUtil.getItemsPrevAndNext(itemId,
174 obc);
175
176 return com.liferay.portlet.shopping.model.ShoppingItemSoap.toSoapModels(returnValue);
177 }
178 catch (Exception e) {
179 _log.error(e, e);
180
181 throw new RemoteException(e.getMessage());
182 }
183 }
184
185 private static Log _log = LogFactoryUtil.getLog(ShoppingItemServiceSoap.class);
186 }