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