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