001
014
015 package com.liferay.portlet.asset.service.http;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.log.Log;
020 import com.liferay.portal.kernel.log.LogFactoryUtil;
021 import com.liferay.portal.kernel.util.LocalizationUtil;
022
023 import com.liferay.portlet.asset.service.AssetCategoryServiceUtil;
024
025 import java.rmi.RemoteException;
026
027 import java.util.Locale;
028 import java.util.Map;
029
030
070 @ProviderType
071 public class AssetCategoryServiceSoap {
072 public static com.liferay.portlet.asset.model.AssetCategorySoap addCategory(
073 long parentCategoryId, java.lang.String[] titleMapLanguageIds,
074 java.lang.String[] titleMapValues,
075 java.lang.String[] descriptionMapLanguageIds,
076 java.lang.String[] descriptionMapValues, long vocabularyId,
077 java.lang.String[] categoryProperties,
078 com.liferay.portal.service.ServiceContext serviceContext)
079 throws RemoteException {
080 try {
081 Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
082 titleMapValues);
083 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
084 descriptionMapValues);
085
086 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.addCategory(parentCategoryId,
087 titleMap, descriptionMap, vocabularyId, categoryProperties,
088 serviceContext);
089
090 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
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.asset.model.AssetCategorySoap addCategory(
100 java.lang.String title, long vocabularyId,
101 com.liferay.portal.service.ServiceContext serviceContext)
102 throws RemoteException {
103 try {
104 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.addCategory(title,
105 vocabularyId, serviceContext);
106
107 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
108 }
109 catch (Exception e) {
110 _log.error(e, e);
111
112 throw new RemoteException(e.getMessage());
113 }
114 }
115
116
120 @Deprecated
121 public static void deleteCategories(long[] categoryIds)
122 throws RemoteException {
123 try {
124 AssetCategoryServiceUtil.deleteCategories(categoryIds);
125 }
126 catch (Exception e) {
127 _log.error(e, e);
128
129 throw new RemoteException(e.getMessage());
130 }
131 }
132
133 public static com.liferay.portlet.asset.model.AssetCategorySoap[] deleteCategories(
134 long[] categoryIds,
135 com.liferay.portal.service.ServiceContext serviceContext)
136 throws RemoteException {
137 try {
138 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
139 AssetCategoryServiceUtil.deleteCategories(categoryIds,
140 serviceContext);
141
142 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
143 }
144 catch (Exception e) {
145 _log.error(e, e);
146
147 throw new RemoteException(e.getMessage());
148 }
149 }
150
151 public static void deleteCategory(long categoryId)
152 throws RemoteException {
153 try {
154 AssetCategoryServiceUtil.deleteCategory(categoryId);
155 }
156 catch (Exception e) {
157 _log.error(e, e);
158
159 throw new RemoteException(e.getMessage());
160 }
161 }
162
163 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getCategories(
164 java.lang.String className, long classPK) throws RemoteException {
165 try {
166 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
167 AssetCategoryServiceUtil.getCategories(className, classPK);
168
169 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
170 }
171 catch (Exception e) {
172 _log.error(e, e);
173
174 throw new RemoteException(e.getMessage());
175 }
176 }
177
178 public static com.liferay.portlet.asset.model.AssetCategorySoap getCategory(
179 long categoryId) throws RemoteException {
180 try {
181 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.getCategory(categoryId);
182
183 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
184 }
185 catch (Exception e) {
186 _log.error(e, e);
187
188 throw new RemoteException(e.getMessage());
189 }
190 }
191
192 public static java.lang.String getCategoryPath(long categoryId)
193 throws RemoteException {
194 try {
195 java.lang.String returnValue = AssetCategoryServiceUtil.getCategoryPath(categoryId);
196
197 return returnValue;
198 }
199 catch (Exception e) {
200 _log.error(e, e);
201
202 throw new RemoteException(e.getMessage());
203 }
204 }
205
206 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getChildCategories(
207 long parentCategoryId) throws RemoteException {
208 try {
209 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
210 AssetCategoryServiceUtil.getChildCategories(parentCategoryId);
211
212 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
213 }
214 catch (Exception e) {
215 _log.error(e, e);
216
217 throw new RemoteException(e.getMessage());
218 }
219 }
220
221 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getChildCategories(
222 long parentCategoryId, int start, int end,
223 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
224 throws RemoteException {
225 try {
226 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
227 AssetCategoryServiceUtil.getChildCategories(parentCategoryId,
228 start, end, obc);
229
230 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
231 }
232 catch (Exception e) {
233 _log.error(e, e);
234
235 throw new RemoteException(e.getMessage());
236 }
237 }
238
239
243 @Deprecated
244 public static java.lang.String getJSONSearch(long groupId,
245 java.lang.String name, long[] vocabularyIds, int start, int end)
246 throws RemoteException {
247 try {
248 com.liferay.portal.kernel.json.JSONArray returnValue = AssetCategoryServiceUtil.getJSONSearch(groupId,
249 name, vocabularyIds, start, end);
250
251 return returnValue.toString();
252 }
253 catch (Exception e) {
254 _log.error(e, e);
255
256 throw new RemoteException(e.getMessage());
257 }
258 }
259
260
265 @Deprecated
266 public static java.lang.String getJSONVocabularyCategories(
267 long vocabularyId, int start, int end,
268 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
269 throws RemoteException {
270 try {
271 com.liferay.portal.kernel.json.JSONObject returnValue = AssetCategoryServiceUtil.getJSONVocabularyCategories(vocabularyId,
272 start, end, obc);
273
274 return returnValue.toString();
275 }
276 catch (Exception e) {
277 _log.error(e, e);
278
279 throw new RemoteException(e.getMessage());
280 }
281 }
282
283
288 @Deprecated
289 public static java.lang.String getJSONVocabularyCategories(long groupId,
290 java.lang.String name, long vocabularyId, int start, int end,
291 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
292 throws RemoteException {
293 try {
294 com.liferay.portal.kernel.json.JSONObject returnValue = AssetCategoryServiceUtil.getJSONVocabularyCategories(groupId,
295 name, vocabularyId, start, end, obc);
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 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyCategories(
307 long vocabularyId, int start, int end,
308 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
309 throws RemoteException {
310 try {
311 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
312 AssetCategoryServiceUtil.getVocabularyCategories(vocabularyId,
313 start, end, obc);
314
315 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
316 }
317 catch (Exception e) {
318 _log.error(e, e);
319
320 throw new RemoteException(e.getMessage());
321 }
322 }
323
324 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyCategories(
325 long parentCategoryId, long vocabularyId, int start, int end,
326 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
327 throws RemoteException {
328 try {
329 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
330 AssetCategoryServiceUtil.getVocabularyCategories(parentCategoryId,
331 vocabularyId, start, end, obc);
332
333 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
334 }
335 catch (Exception e) {
336 _log.error(e, e);
337
338 throw new RemoteException(e.getMessage());
339 }
340 }
341
342 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyCategories(
343 long groupId, long parentCategoryId, long vocabularyId, int start,
344 int end,
345 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
346 throws RemoteException {
347 try {
348 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
349 AssetCategoryServiceUtil.getVocabularyCategories(groupId,
350 parentCategoryId, vocabularyId, start, end, obc);
351
352 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
353 }
354 catch (Exception e) {
355 _log.error(e, e);
356
357 throw new RemoteException(e.getMessage());
358 }
359 }
360
361 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyCategories(
362 long groupId, java.lang.String name, long vocabularyId, int start,
363 int end,
364 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
365 throws RemoteException {
366 try {
367 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
368 AssetCategoryServiceUtil.getVocabularyCategories(groupId, name,
369 vocabularyId, start, end, obc);
370
371 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
372 }
373 catch (Exception e) {
374 _log.error(e, e);
375
376 throw new RemoteException(e.getMessage());
377 }
378 }
379
380 public static int getVocabularyCategoriesCount(long groupId,
381 long vocabularyId) throws RemoteException {
382 try {
383 int returnValue = AssetCategoryServiceUtil.getVocabularyCategoriesCount(groupId,
384 vocabularyId);
385
386 return returnValue;
387 }
388 catch (Exception e) {
389 _log.error(e, e);
390
391 throw new RemoteException(e.getMessage());
392 }
393 }
394
395 public static int getVocabularyCategoriesCount(long groupId,
396 long parentCategory, long vocabularyId) throws RemoteException {
397 try {
398 int returnValue = AssetCategoryServiceUtil.getVocabularyCategoriesCount(groupId,
399 parentCategory, vocabularyId);
400
401 return returnValue;
402 }
403 catch (Exception e) {
404 _log.error(e, e);
405
406 throw new RemoteException(e.getMessage());
407 }
408 }
409
410 public static int getVocabularyCategoriesCount(long groupId,
411 java.lang.String name, long vocabularyId) throws RemoteException {
412 try {
413 int returnValue = AssetCategoryServiceUtil.getVocabularyCategoriesCount(groupId,
414 name, vocabularyId);
415
416 return returnValue;
417 }
418 catch (Exception e) {
419 _log.error(e, e);
420
421 throw new RemoteException(e.getMessage());
422 }
423 }
424
425 public static com.liferay.portlet.asset.model.AssetCategoryDisplay getVocabularyCategoriesDisplay(
426 long vocabularyId, int start, int end,
427 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
428 throws RemoteException {
429 try {
430 com.liferay.portlet.asset.model.AssetCategoryDisplay returnValue = AssetCategoryServiceUtil.getVocabularyCategoriesDisplay(vocabularyId,
431 start, end, obc);
432
433 return returnValue;
434 }
435 catch (Exception e) {
436 _log.error(e, e);
437
438 throw new RemoteException(e.getMessage());
439 }
440 }
441
442 public static com.liferay.portlet.asset.model.AssetCategoryDisplay getVocabularyCategoriesDisplay(
443 long groupId, java.lang.String name, long vocabularyId, int start,
444 int end,
445 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
446 throws RemoteException {
447 try {
448 com.liferay.portlet.asset.model.AssetCategoryDisplay returnValue = AssetCategoryServiceUtil.getVocabularyCategoriesDisplay(groupId,
449 name, vocabularyId, start, end, obc);
450
451 return returnValue;
452 }
453 catch (Exception e) {
454 _log.error(e, e);
455
456 throw new RemoteException(e.getMessage());
457 }
458 }
459
460
465 @Deprecated
466 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyRootCategories(
467 long vocabularyId, int start, int end,
468 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
469 throws RemoteException {
470 try {
471 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
472 AssetCategoryServiceUtil.getVocabularyRootCategories(vocabularyId,
473 start, end, obc);
474
475 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
476 }
477 catch (Exception e) {
478 _log.error(e, e);
479
480 throw new RemoteException(e.getMessage());
481 }
482 }
483
484 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyRootCategories(
485 long groupId, long vocabularyId, int start, int end,
486 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
487 throws RemoteException {
488 try {
489 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
490 AssetCategoryServiceUtil.getVocabularyRootCategories(groupId,
491 vocabularyId, start, end, obc);
492
493 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
494 }
495 catch (Exception e) {
496 _log.error(e, e);
497
498 throw new RemoteException(e.getMessage());
499 }
500 }
501
502 public static int getVocabularyRootCategoriesCount(long groupId,
503 long vocabularyId) throws RemoteException {
504 try {
505 int returnValue = AssetCategoryServiceUtil.getVocabularyRootCategoriesCount(groupId,
506 vocabularyId);
507
508 return returnValue;
509 }
510 catch (Exception e) {
511 _log.error(e, e);
512
513 throw new RemoteException(e.getMessage());
514 }
515 }
516
517 public static com.liferay.portlet.asset.model.AssetCategorySoap moveCategory(
518 long categoryId, long parentCategoryId, long vocabularyId,
519 com.liferay.portal.service.ServiceContext serviceContext)
520 throws RemoteException {
521 try {
522 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.moveCategory(categoryId,
523 parentCategoryId, vocabularyId, serviceContext);
524
525 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
526 }
527 catch (Exception e) {
528 _log.error(e, e);
529
530 throw new RemoteException(e.getMessage());
531 }
532 }
533
534 public static com.liferay.portlet.asset.model.AssetCategorySoap[] search(
535 long groupId, java.lang.String keywords, long vocabularyId, int start,
536 int end,
537 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
538 throws RemoteException {
539 try {
540 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
541 AssetCategoryServiceUtil.search(groupId, keywords,
542 vocabularyId, start, end, obc);
543
544 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
545 }
546 catch (Exception e) {
547 _log.error(e, e);
548
549 throw new RemoteException(e.getMessage());
550 }
551 }
552
553 public static java.lang.String search(long groupId, java.lang.String name,
554 java.lang.String[] categoryProperties, int start, int end)
555 throws RemoteException {
556 try {
557 com.liferay.portal.kernel.json.JSONArray returnValue = AssetCategoryServiceUtil.search(groupId,
558 name, categoryProperties, start, end);
559
560 return returnValue.toString();
561 }
562 catch (Exception e) {
563 _log.error(e, e);
564
565 throw new RemoteException(e.getMessage());
566 }
567 }
568
569 public static java.lang.String search(long[] groupIds,
570 java.lang.String name, long[] vocabularyIds, int start, int end)
571 throws RemoteException {
572 try {
573 com.liferay.portal.kernel.json.JSONArray returnValue = AssetCategoryServiceUtil.search(groupIds,
574 name, vocabularyIds, start, end);
575
576 return returnValue.toString();
577 }
578 catch (Exception e) {
579 _log.error(e, e);
580
581 throw new RemoteException(e.getMessage());
582 }
583 }
584
585 public static com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
586 long groupId, java.lang.String title, long vocabularyId, int start,
587 int end) throws RemoteException {
588 try {
589 com.liferay.portlet.asset.model.AssetCategoryDisplay returnValue = AssetCategoryServiceUtil.searchCategoriesDisplay(groupId,
590 title, vocabularyId, start, end);
591
592 return returnValue;
593 }
594 catch (Exception e) {
595 _log.error(e, e);
596
597 throw new RemoteException(e.getMessage());
598 }
599 }
600
601 public static com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
602 long groupId, java.lang.String title, long parentCategoryId,
603 long vocabularyId, int start, int end) throws RemoteException {
604 try {
605 com.liferay.portlet.asset.model.AssetCategoryDisplay returnValue = AssetCategoryServiceUtil.searchCategoriesDisplay(groupId,
606 title, parentCategoryId, vocabularyId, start, end);
607
608 return returnValue;
609 }
610 catch (Exception e) {
611 _log.error(e, e);
612
613 throw new RemoteException(e.getMessage());
614 }
615 }
616
617 public static com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
618 long[] groupIds, java.lang.String title, long[] vocabularyIds,
619 int start, int end) throws RemoteException {
620 try {
621 com.liferay.portlet.asset.model.AssetCategoryDisplay returnValue = AssetCategoryServiceUtil.searchCategoriesDisplay(groupIds,
622 title, vocabularyIds, start, end);
623
624 return returnValue;
625 }
626 catch (Exception e) {
627 _log.error(e, e);
628
629 throw new RemoteException(e.getMessage());
630 }
631 }
632
633 public static com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
634 long[] groupIds, java.lang.String title, long[] parentCategoryIds,
635 long[] vocabularyIds, int start, int end) throws RemoteException {
636 try {
637 com.liferay.portlet.asset.model.AssetCategoryDisplay returnValue = AssetCategoryServiceUtil.searchCategoriesDisplay(groupIds,
638 title, parentCategoryIds, vocabularyIds, start, end);
639
640 return returnValue;
641 }
642 catch (Exception e) {
643 _log.error(e, e);
644
645 throw new RemoteException(e.getMessage());
646 }
647 }
648
649 public static com.liferay.portlet.asset.model.AssetCategorySoap updateCategory(
650 long categoryId, long parentCategoryId,
651 java.lang.String[] titleMapLanguageIds,
652 java.lang.String[] titleMapValues,
653 java.lang.String[] descriptionMapLanguageIds,
654 java.lang.String[] descriptionMapValues, long vocabularyId,
655 java.lang.String[] categoryProperties,
656 com.liferay.portal.service.ServiceContext serviceContext)
657 throws RemoteException {
658 try {
659 Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
660 titleMapValues);
661 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
662 descriptionMapValues);
663
664 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.updateCategory(categoryId,
665 parentCategoryId, titleMap, descriptionMap, vocabularyId,
666 categoryProperties, serviceContext);
667
668 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
669 }
670 catch (Exception e) {
671 _log.error(e, e);
672
673 throw new RemoteException(e.getMessage());
674 }
675 }
676
677 private static Log _log = LogFactoryUtil.getLog(AssetCategoryServiceSoap.class);
678 }