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.ShoppingCategoryServiceUtil;
022
023 import java.rmi.RemoteException;
024
025
068 public class ShoppingCategoryServiceSoap {
069 public static com.liferay.portlet.shopping.model.ShoppingCategorySoap addCategory(
070 long parentCategoryId, java.lang.String name,
071 java.lang.String description,
072 com.liferay.portal.service.ServiceContext serviceContext)
073 throws RemoteException {
074 try {
075 com.liferay.portlet.shopping.model.ShoppingCategory returnValue = ShoppingCategoryServiceUtil.addCategory(parentCategoryId,
076 name, description, serviceContext);
077
078 return com.liferay.portlet.shopping.model.ShoppingCategorySoap.toSoapModel(returnValue);
079 }
080 catch (Exception e) {
081 _log.error(e, e);
082
083 throw new RemoteException(e.getMessage());
084 }
085 }
086
087 public static void deleteCategory(long categoryId)
088 throws RemoteException {
089 try {
090 ShoppingCategoryServiceUtil.deleteCategory(categoryId);
091 }
092 catch (Exception e) {
093 _log.error(e, e);
094
095 throw new RemoteException(e.getMessage());
096 }
097 }
098
099 public static com.liferay.portlet.shopping.model.ShoppingCategorySoap[] getCategories(
100 long groupId) throws RemoteException {
101 try {
102 java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> returnValue =
103 ShoppingCategoryServiceUtil.getCategories(groupId);
104
105 return com.liferay.portlet.shopping.model.ShoppingCategorySoap.toSoapModels(returnValue);
106 }
107 catch (Exception e) {
108 _log.error(e, e);
109
110 throw new RemoteException(e.getMessage());
111 }
112 }
113
114 public static com.liferay.portlet.shopping.model.ShoppingCategorySoap[] getCategories(
115 long groupId, long parentCategoryId, int start, int end)
116 throws RemoteException {
117 try {
118 java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> returnValue =
119 ShoppingCategoryServiceUtil.getCategories(groupId,
120 parentCategoryId, start, end);
121
122 return com.liferay.portlet.shopping.model.ShoppingCategorySoap.toSoapModels(returnValue);
123 }
124 catch (Exception e) {
125 _log.error(e, e);
126
127 throw new RemoteException(e.getMessage());
128 }
129 }
130
131 public static int getCategoriesCount(long groupId, long parentCategoryId)
132 throws RemoteException {
133 try {
134 int returnValue = ShoppingCategoryServiceUtil.getCategoriesCount(groupId,
135 parentCategoryId);
136
137 return returnValue;
138 }
139 catch (Exception e) {
140 _log.error(e, e);
141
142 throw new RemoteException(e.getMessage());
143 }
144 }
145
146 public static com.liferay.portlet.shopping.model.ShoppingCategorySoap getCategory(
147 long categoryId) throws RemoteException {
148 try {
149 com.liferay.portlet.shopping.model.ShoppingCategory returnValue = ShoppingCategoryServiceUtil.getCategory(categoryId);
150
151 return com.liferay.portlet.shopping.model.ShoppingCategorySoap.toSoapModel(returnValue);
152 }
153 catch (Exception e) {
154 _log.error(e, e);
155
156 throw new RemoteException(e.getMessage());
157 }
158 }
159
160 public static void getSubcategoryIds(Long[] categoryIds, long groupId,
161 long categoryId) throws RemoteException {
162 try {
163 ShoppingCategoryServiceUtil.getSubcategoryIds(ListUtil.toList(
164 categoryIds), groupId, categoryId);
165 }
166 catch (Exception e) {
167 _log.error(e, e);
168
169 throw new RemoteException(e.getMessage());
170 }
171 }
172
173 public static com.liferay.portlet.shopping.model.ShoppingCategorySoap updateCategory(
174 long categoryId, long parentCategoryId, java.lang.String name,
175 java.lang.String description, boolean mergeWithParentCategory,
176 com.liferay.portal.service.ServiceContext serviceContext)
177 throws RemoteException {
178 try {
179 com.liferay.portlet.shopping.model.ShoppingCategory returnValue = ShoppingCategoryServiceUtil.updateCategory(categoryId,
180 parentCategoryId, name, description,
181 mergeWithParentCategory, serviceContext);
182
183 return com.liferay.portlet.shopping.model.ShoppingCategorySoap.toSoapModel(returnValue);
184 }
185 catch (Exception e) {
186 _log.error(e, e);
187
188 throw new RemoteException(e.getMessage());
189 }
190 }
191
192 private static Log _log = LogFactoryUtil.getLog(ShoppingCategoryServiceSoap.class);
193 }