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 import com.liferay.portal.kernel.util.LocalizationUtil;
020
021 import com.liferay.portlet.asset.service.AssetCategoryServiceUtil;
022
023 import java.rmi.RemoteException;
024
025 import java.util.Locale;
026 import java.util.Map;
027
028
070 public class AssetCategoryServiceSoap {
071 public static com.liferay.portlet.asset.model.AssetCategorySoap addCategory(
072 long parentCategoryId, java.lang.String[] titleMapLanguageIds,
073 java.lang.String[] titleMapValues,
074 java.lang.String[] descriptionMapLanguageIds,
075 java.lang.String[] descriptionMapValues, long vocabularyId,
076 java.lang.String[] categoryProperties,
077 com.liferay.portal.service.ServiceContext serviceContext)
078 throws RemoteException {
079 try {
080 Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
081 titleMapValues);
082 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
083 descriptionMapValues);
084
085 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.addCategory(parentCategoryId,
086 titleMap, descriptionMap, vocabularyId, categoryProperties,
087 serviceContext);
088
089 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
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.asset.model.AssetCategorySoap addCategory(
099 java.lang.String title, long vocabularyId,
100 com.liferay.portal.service.ServiceContext serviceContext)
101 throws RemoteException {
102 try {
103 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.addCategory(title,
104 vocabularyId, serviceContext);
105
106 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
107 }
108 catch (Exception e) {
109 _log.error(e, e);
110
111 throw new RemoteException(e.getMessage());
112 }
113 }
114
115 public static com.liferay.portlet.asset.model.AssetCategorySoap[] deleteCategories(
116 long[] categoryIds,
117 com.liferay.portal.service.ServiceContext serviceContext)
118 throws RemoteException {
119 try {
120 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
121 AssetCategoryServiceUtil.deleteCategories(categoryIds,
122 serviceContext);
123
124 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
125 }
126 catch (Exception e) {
127 _log.error(e, e);
128
129 throw new RemoteException(e.getMessage());
130 }
131 }
132
133 public static void deleteCategory(long categoryId)
134 throws RemoteException {
135 try {
136 AssetCategoryServiceUtil.deleteCategory(categoryId);
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.asset.model.AssetCategorySoap[] getCategories(
146 java.lang.String className, long classPK) throws RemoteException {
147 try {
148 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
149 AssetCategoryServiceUtil.getCategories(className, classPK);
150
151 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
152 }
153 catch (Exception e) {
154 _log.error(e, e);
155
156 throw new RemoteException(e.getMessage());
157 }
158 }
159
160 public static com.liferay.portlet.asset.model.AssetCategorySoap getCategory(
161 long categoryId) throws RemoteException {
162 try {
163 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.getCategory(categoryId);
164
165 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
166 }
167 catch (Exception e) {
168 _log.error(e, e);
169
170 throw new RemoteException(e.getMessage());
171 }
172 }
173
174 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getChildCategories(
175 long parentCategoryId) throws RemoteException {
176 try {
177 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
178 AssetCategoryServiceUtil.getChildCategories(parentCategoryId);
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[] getChildCategories(
190 long parentCategoryId, 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.getChildCategories(parentCategoryId,
196 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
211 public static java.lang.String getJSONSearch(long groupId,
212 java.lang.String name, long[] vocabularyIds, int start, int end)
213 throws RemoteException {
214 try {
215 com.liferay.portal.kernel.json.JSONArray returnValue = AssetCategoryServiceUtil.getJSONSearch(groupId,
216 name, vocabularyIds, start, end);
217
218 return returnValue.toString();
219 }
220 catch (Exception e) {
221 _log.error(e, e);
222
223 throw new RemoteException(e.getMessage());
224 }
225 }
226
227
232 public static java.lang.String getJSONVocabularyCategories(
233 long vocabularyId, int start, int end,
234 com.liferay.portal.kernel.util.OrderByComparator obc)
235 throws RemoteException {
236 try {
237 com.liferay.portal.kernel.json.JSONObject returnValue = AssetCategoryServiceUtil.getJSONVocabularyCategories(vocabularyId,
238 start, end, obc);
239
240 return returnValue.toString();
241 }
242 catch (Exception e) {
243 _log.error(e, e);
244
245 throw new RemoteException(e.getMessage());
246 }
247 }
248
249
254 public static java.lang.String getJSONVocabularyCategories(long groupId,
255 java.lang.String name, long vocabularyId, int start, int end,
256 com.liferay.portal.kernel.util.OrderByComparator obc)
257 throws RemoteException {
258 try {
259 com.liferay.portal.kernel.json.JSONObject returnValue = AssetCategoryServiceUtil.getJSONVocabularyCategories(groupId,
260 name, vocabularyId, start, end, obc);
261
262 return returnValue.toString();
263 }
264 catch (Exception e) {
265 _log.error(e, e);
266
267 throw new RemoteException(e.getMessage());
268 }
269 }
270
271 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyCategories(
272 long vocabularyId, int start, int end,
273 com.liferay.portal.kernel.util.OrderByComparator obc)
274 throws RemoteException {
275 try {
276 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
277 AssetCategoryServiceUtil.getVocabularyCategories(vocabularyId,
278 start, end, obc);
279
280 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
281 }
282 catch (Exception e) {
283 _log.error(e, e);
284
285 throw new RemoteException(e.getMessage());
286 }
287 }
288
289 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyCategories(
290 long parentCategoryId, long vocabularyId, int start, int end,
291 com.liferay.portal.kernel.util.OrderByComparator obc)
292 throws RemoteException {
293 try {
294 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
295 AssetCategoryServiceUtil.getVocabularyCategories(parentCategoryId,
296 vocabularyId, start, end, obc);
297
298 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
299 }
300 catch (Exception e) {
301 _log.error(e, e);
302
303 throw new RemoteException(e.getMessage());
304 }
305 }
306
307 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyCategories(
308 long groupId, java.lang.String name, long vocabularyId, int start,
309 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
310 throws RemoteException {
311 try {
312 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
313 AssetCategoryServiceUtil.getVocabularyCategories(groupId, name,
314 vocabularyId, start, end, obc);
315
316 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
317 }
318 catch (Exception e) {
319 _log.error(e, e);
320
321 throw new RemoteException(e.getMessage());
322 }
323 }
324
325 public static int getVocabularyCategoriesCount(long groupId,
326 long vocabularyId) throws RemoteException {
327 try {
328 int returnValue = AssetCategoryServiceUtil.getVocabularyCategoriesCount(groupId,
329 vocabularyId);
330
331 return returnValue;
332 }
333 catch (Exception e) {
334 _log.error(e, e);
335
336 throw new RemoteException(e.getMessage());
337 }
338 }
339
340 public static int getVocabularyCategoriesCount(long groupId,
341 java.lang.String name, long vocabularyId) throws RemoteException {
342 try {
343 int returnValue = AssetCategoryServiceUtil.getVocabularyCategoriesCount(groupId,
344 name, vocabularyId);
345
346 return returnValue;
347 }
348 catch (Exception e) {
349 _log.error(e, e);
350
351 throw new RemoteException(e.getMessage());
352 }
353 }
354
355 public static com.liferay.portlet.asset.model.AssetCategoryDisplay getVocabularyCategoriesDisplay(
356 long vocabularyId, int start, int end,
357 com.liferay.portal.kernel.util.OrderByComparator obc)
358 throws RemoteException {
359 try {
360 com.liferay.portlet.asset.model.AssetCategoryDisplay returnValue = AssetCategoryServiceUtil.getVocabularyCategoriesDisplay(vocabularyId,
361 start, end, obc);
362
363 return returnValue;
364 }
365 catch (Exception e) {
366 _log.error(e, e);
367
368 throw new RemoteException(e.getMessage());
369 }
370 }
371
372 public static com.liferay.portlet.asset.model.AssetCategoryDisplay getVocabularyCategoriesDisplay(
373 long groupId, java.lang.String name, long vocabularyId, int start,
374 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
375 throws RemoteException {
376 try {
377 com.liferay.portlet.asset.model.AssetCategoryDisplay returnValue = AssetCategoryServiceUtil.getVocabularyCategoriesDisplay(groupId,
378 name, vocabularyId, start, end, obc);
379
380 return returnValue;
381 }
382 catch (Exception e) {
383 _log.error(e, e);
384
385 throw new RemoteException(e.getMessage());
386 }
387 }
388
389
394 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyRootCategories(
395 long vocabularyId, int start, int end,
396 com.liferay.portal.kernel.util.OrderByComparator obc)
397 throws RemoteException {
398 try {
399 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
400 AssetCategoryServiceUtil.getVocabularyRootCategories(vocabularyId,
401 start, end, obc);
402
403 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
404 }
405 catch (Exception e) {
406 _log.error(e, e);
407
408 throw new RemoteException(e.getMessage());
409 }
410 }
411
412 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyRootCategories(
413 long groupId, long vocabularyId, int start, int end,
414 com.liferay.portal.kernel.util.OrderByComparator obc)
415 throws RemoteException {
416 try {
417 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
418 AssetCategoryServiceUtil.getVocabularyRootCategories(groupId,
419 vocabularyId, start, end, obc);
420
421 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
422 }
423 catch (Exception e) {
424 _log.error(e, e);
425
426 throw new RemoteException(e.getMessage());
427 }
428 }
429
430 public static int getVocabularyRootCategoriesCount(long groupId,
431 long vocabularyId) throws RemoteException {
432 try {
433 int returnValue = AssetCategoryServiceUtil.getVocabularyRootCategoriesCount(groupId,
434 vocabularyId);
435
436 return returnValue;
437 }
438 catch (Exception e) {
439 _log.error(e, e);
440
441 throw new RemoteException(e.getMessage());
442 }
443 }
444
445 public static com.liferay.portlet.asset.model.AssetCategorySoap moveCategory(
446 long categoryId, long parentCategoryId, long vocabularyId,
447 com.liferay.portal.service.ServiceContext serviceContext)
448 throws RemoteException {
449 try {
450 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.moveCategory(categoryId,
451 parentCategoryId, vocabularyId, serviceContext);
452
453 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
454 }
455 catch (Exception e) {
456 _log.error(e, e);
457
458 throw new RemoteException(e.getMessage());
459 }
460 }
461
462 public static com.liferay.portlet.asset.model.AssetCategorySoap[] search(
463 long groupId, java.lang.String keywords, long vocabularyId, int start,
464 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
465 throws RemoteException {
466 try {
467 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
468 AssetCategoryServiceUtil.search(groupId, keywords,
469 vocabularyId, start, end, obc);
470
471 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
472 }
473 catch (Exception e) {
474 _log.error(e, e);
475
476 throw new RemoteException(e.getMessage());
477 }
478 }
479
480 public static java.lang.String search(long groupId, java.lang.String name,
481 java.lang.String[] categoryProperties, int start, int end)
482 throws RemoteException {
483 try {
484 com.liferay.portal.kernel.json.JSONArray returnValue = AssetCategoryServiceUtil.search(groupId,
485 name, categoryProperties, start, end);
486
487 return returnValue.toString();
488 }
489 catch (Exception e) {
490 _log.error(e, e);
491
492 throw new RemoteException(e.getMessage());
493 }
494 }
495
496 public static java.lang.String search(long[] groupIds,
497 java.lang.String name, long[] vocabularyIds, int start, int end)
498 throws RemoteException {
499 try {
500 com.liferay.portal.kernel.json.JSONArray returnValue = AssetCategoryServiceUtil.search(groupIds,
501 name, vocabularyIds, start, end);
502
503 return returnValue.toString();
504 }
505 catch (Exception e) {
506 _log.error(e, e);
507
508 throw new RemoteException(e.getMessage());
509 }
510 }
511
512 public static com.liferay.portlet.asset.model.AssetCategorySoap updateCategory(
513 long categoryId, long parentCategoryId,
514 java.lang.String[] titleMapLanguageIds,
515 java.lang.String[] titleMapValues,
516 java.lang.String[] descriptionMapLanguageIds,
517 java.lang.String[] descriptionMapValues, long vocabularyId,
518 java.lang.String[] categoryProperties,
519 com.liferay.portal.service.ServiceContext serviceContext)
520 throws RemoteException {
521 try {
522 Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
523 titleMapValues);
524 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
525 descriptionMapValues);
526
527 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.updateCategory(categoryId,
528 parentCategoryId, titleMap, descriptionMap, vocabularyId,
529 categoryProperties, serviceContext);
530
531 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
532 }
533 catch (Exception e) {
534 _log.error(e, e);
535
536 throw new RemoteException(e.getMessage());
537 }
538 }
539
540 private static Log _log = LogFactoryUtil.getLog(AssetCategoryServiceSoap.class);
541 }