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