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