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