001
014
015 package com.liferay.portlet.asset.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019
020 import com.liferay.portlet.asset.service.AssetCategoryServiceUtil;
021
022 import java.rmi.RemoteException;
023
024
067 public class AssetCategoryServiceSoap {
068 public static void deleteCategories(long[] categoryIds)
069 throws RemoteException {
070 try {
071 AssetCategoryServiceUtil.deleteCategories(categoryIds);
072 }
073 catch (Exception e) {
074 _log.error(e, e);
075
076 throw new RemoteException(e.getMessage());
077 }
078 }
079
080 public static void deleteCategory(long categoryId)
081 throws RemoteException {
082 try {
083 AssetCategoryServiceUtil.deleteCategory(categoryId);
084 }
085 catch (Exception e) {
086 _log.error(e, e);
087
088 throw new RemoteException(e.getMessage());
089 }
090 }
091
092 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getCategories(
093 java.lang.String className, long classPK) throws RemoteException {
094 try {
095 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
096 AssetCategoryServiceUtil.getCategories(className, classPK);
097
098 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
099 }
100 catch (Exception e) {
101 _log.error(e, e);
102
103 throw new RemoteException(e.getMessage());
104 }
105 }
106
107 public static com.liferay.portlet.asset.model.AssetCategorySoap getCategory(
108 long categoryId) throws RemoteException {
109 try {
110 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.getCategory(categoryId);
111
112 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
113 }
114 catch (Exception e) {
115 _log.error(e, e);
116
117 throw new RemoteException(e.getMessage());
118 }
119 }
120
121 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getChildCategories(
122 long parentCategoryId) throws RemoteException {
123 try {
124 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
125 AssetCategoryServiceUtil.getChildCategories(parentCategoryId);
126
127 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
128 }
129 catch (Exception e) {
130 _log.error(e, e);
131
132 throw new RemoteException(e.getMessage());
133 }
134 }
135
136 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getChildCategories(
137 long parentCategoryId, int start, int end,
138 com.liferay.portal.kernel.util.OrderByComparator obc)
139 throws RemoteException {
140 try {
141 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
142 AssetCategoryServiceUtil.getChildCategories(parentCategoryId,
143 start, end, obc);
144
145 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
146 }
147 catch (Exception e) {
148 _log.error(e, e);
149
150 throw new RemoteException(e.getMessage());
151 }
152 }
153
154 public static java.lang.String getJSONVocabularyCategories(long groupId,
155 java.lang.String name, long vocabularyId, int start, int end,
156 com.liferay.portal.kernel.util.OrderByComparator obc)
157 throws RemoteException {
158 try {
159 com.liferay.portal.kernel.json.JSONObject returnValue = AssetCategoryServiceUtil.getJSONVocabularyCategories(groupId,
160 name, vocabularyId, start, end, obc);
161
162 return returnValue.toString();
163 }
164 catch (Exception e) {
165 _log.error(e, e);
166
167 throw new RemoteException(e.getMessage());
168 }
169 }
170
171 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyCategories(
172 long vocabularyId, int start, int end,
173 com.liferay.portal.kernel.util.OrderByComparator obc)
174 throws RemoteException {
175 try {
176 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
177 AssetCategoryServiceUtil.getVocabularyCategories(vocabularyId,
178 start, end, obc);
179
180 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
181 }
182 catch (Exception e) {
183 _log.error(e, e);
184
185 throw new RemoteException(e.getMessage());
186 }
187 }
188
189 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyCategories(
190 long parentCategoryId, long vocabularyId, int start, int end,
191 com.liferay.portal.kernel.util.OrderByComparator obc)
192 throws RemoteException {
193 try {
194 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
195 AssetCategoryServiceUtil.getVocabularyCategories(parentCategoryId,
196 vocabularyId, start, end, obc);
197
198 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
199 }
200 catch (Exception e) {
201 _log.error(e, e);
202
203 throw new RemoteException(e.getMessage());
204 }
205 }
206
207 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyCategories(
208 long groupId, java.lang.String name, long vocabularyId, int start,
209 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
210 throws RemoteException {
211 try {
212 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
213 AssetCategoryServiceUtil.getVocabularyCategories(groupId, name,
214 vocabularyId, start, end, obc);
215
216 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
217 }
218 catch (Exception e) {
219 _log.error(e, e);
220
221 throw new RemoteException(e.getMessage());
222 }
223 }
224
225 public static int getVocabularyCategoriesCount(long groupId,
226 long vocabularyId) throws RemoteException {
227 try {
228 int returnValue = AssetCategoryServiceUtil.getVocabularyCategoriesCount(groupId,
229 vocabularyId);
230
231 return returnValue;
232 }
233 catch (Exception e) {
234 _log.error(e, e);
235
236 throw new RemoteException(e.getMessage());
237 }
238 }
239
240 public static int getVocabularyCategoriesCount(long groupId,
241 java.lang.String name, long vocabularyId) throws RemoteException {
242 try {
243 int returnValue = AssetCategoryServiceUtil.getVocabularyCategoriesCount(groupId,
244 name, vocabularyId);
245
246 return returnValue;
247 }
248 catch (Exception e) {
249 _log.error(e, e);
250
251 throw new RemoteException(e.getMessage());
252 }
253 }
254
255 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyRootCategories(
256 long vocabularyId, int start, int end,
257 com.liferay.portal.kernel.util.OrderByComparator obc)
258 throws RemoteException {
259 try {
260 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
261 AssetCategoryServiceUtil.getVocabularyRootCategories(vocabularyId,
262 start, end, obc);
263
264 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
265 }
266 catch (Exception e) {
267 _log.error(e, e);
268
269 throw new RemoteException(e.getMessage());
270 }
271 }
272
273 public static com.liferay.portlet.asset.model.AssetCategorySoap moveCategory(
274 long categoryId, long parentCategoryId, long vocabularyId,
275 com.liferay.portal.service.ServiceContext serviceContext)
276 throws RemoteException {
277 try {
278 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.moveCategory(categoryId,
279 parentCategoryId, vocabularyId, serviceContext);
280
281 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
282 }
283 catch (Exception e) {
284 _log.error(e, e);
285
286 throw new RemoteException(e.getMessage());
287 }
288 }
289
290 public static java.lang.String search(long groupId, java.lang.String name,
291 java.lang.String[] categoryProperties, int start, int end)
292 throws RemoteException {
293 try {
294 com.liferay.portal.kernel.json.JSONArray returnValue = AssetCategoryServiceUtil.search(groupId,
295 name, categoryProperties, start, end);
296
297 return returnValue.toString();
298 }
299 catch (Exception e) {
300 _log.error(e, e);
301
302 throw new RemoteException(e.getMessage());
303 }
304 }
305
306 private static Log _log = LogFactoryUtil.getLog(AssetCategoryServiceSoap.class);
307 }