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
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
103 public static void deleteCategories(long[] categoryIds)
104 throws RemoteException {
105 try {
106 AssetCategoryServiceUtil.deleteCategories(categoryIds);
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
210 public static java.lang.String getJSONSearch(long groupId,
211 java.lang.String keywords, long vocabularyId, int start, int end,
212 com.liferay.portal.kernel.util.OrderByComparator obc)
213 throws RemoteException {
214 try {
215 com.liferay.portal.kernel.json.JSONArray returnValue = AssetCategoryServiceUtil.getJSONSearch(groupId,
216 keywords, vocabularyId, start, end, obc);
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
230 public static java.lang.String getJSONSearch(long groupId,
231 java.lang.String name, long[] vocabularyIds, int start, int end)
232 throws RemoteException {
233 try {
234 com.liferay.portal.kernel.json.JSONArray returnValue = AssetCategoryServiceUtil.getJSONSearch(groupId,
235 name, vocabularyIds, start, end);
236
237 return returnValue.toString();
238 }
239 catch (Exception e) {
240 _log.error(e, e);
241
242 throw new RemoteException(e.getMessage());
243 }
244 }
245
246 public static java.lang.String getJSONVocabularyCategories(
247 long vocabularyId, int start, int end,
248 com.liferay.portal.kernel.util.OrderByComparator obc)
249 throws RemoteException {
250 try {
251 com.liferay.portal.kernel.json.JSONObject returnValue = AssetCategoryServiceUtil.getJSONVocabularyCategories(vocabularyId,
252 start, end, obc);
253
254 return returnValue.toString();
255 }
256 catch (Exception e) {
257 _log.error(e, e);
258
259 throw new RemoteException(e.getMessage());
260 }
261 }
262
263 public static java.lang.String getJSONVocabularyCategories(long groupId,
264 java.lang.String name, long vocabularyId, int start, int end,
265 com.liferay.portal.kernel.util.OrderByComparator obc)
266 throws RemoteException {
267 try {
268 com.liferay.portal.kernel.json.JSONObject returnValue = AssetCategoryServiceUtil.getJSONVocabularyCategories(groupId,
269 name, vocabularyId, start, end, obc);
270
271 return returnValue.toString();
272 }
273 catch (Exception e) {
274 _log.error(e, e);
275
276 throw new RemoteException(e.getMessage());
277 }
278 }
279
280 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyCategories(
281 long vocabularyId, int start, int end,
282 com.liferay.portal.kernel.util.OrderByComparator obc)
283 throws RemoteException {
284 try {
285 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
286 AssetCategoryServiceUtil.getVocabularyCategories(vocabularyId,
287 start, end, obc);
288
289 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
290 }
291 catch (Exception e) {
292 _log.error(e, e);
293
294 throw new RemoteException(e.getMessage());
295 }
296 }
297
298 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyCategories(
299 long parentCategoryId, long vocabularyId, int start, int end,
300 com.liferay.portal.kernel.util.OrderByComparator obc)
301 throws RemoteException {
302 try {
303 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
304 AssetCategoryServiceUtil.getVocabularyCategories(parentCategoryId,
305 vocabularyId, start, end, obc);
306
307 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
308 }
309 catch (Exception e) {
310 _log.error(e, e);
311
312 throw new RemoteException(e.getMessage());
313 }
314 }
315
316 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyCategories(
317 long groupId, java.lang.String name, long vocabularyId, int start,
318 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
319 throws RemoteException {
320 try {
321 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
322 AssetCategoryServiceUtil.getVocabularyCategories(groupId, name,
323 vocabularyId, start, end, obc);
324
325 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
326 }
327 catch (Exception e) {
328 _log.error(e, e);
329
330 throw new RemoteException(e.getMessage());
331 }
332 }
333
334 public static int getVocabularyCategoriesCount(long groupId,
335 long vocabularyId) throws RemoteException {
336 try {
337 int returnValue = AssetCategoryServiceUtil.getVocabularyCategoriesCount(groupId,
338 vocabularyId);
339
340 return returnValue;
341 }
342 catch (Exception e) {
343 _log.error(e, e);
344
345 throw new RemoteException(e.getMessage());
346 }
347 }
348
349 public static int getVocabularyCategoriesCount(long groupId,
350 java.lang.String name, long vocabularyId) throws RemoteException {
351 try {
352 int returnValue = AssetCategoryServiceUtil.getVocabularyCategoriesCount(groupId,
353 name, vocabularyId);
354
355 return returnValue;
356 }
357 catch (Exception e) {
358 _log.error(e, e);
359
360 throw new RemoteException(e.getMessage());
361 }
362 }
363
364
368 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyRootCategories(
369 long vocabularyId, int start, int end,
370 com.liferay.portal.kernel.util.OrderByComparator obc)
371 throws RemoteException {
372 try {
373 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
374 AssetCategoryServiceUtil.getVocabularyRootCategories(vocabularyId,
375 start, end, obc);
376
377 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
378 }
379 catch (Exception e) {
380 _log.error(e, e);
381
382 throw new RemoteException(e.getMessage());
383 }
384 }
385
386 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyRootCategories(
387 long groupId, long vocabularyId, int start, int end,
388 com.liferay.portal.kernel.util.OrderByComparator obc)
389 throws RemoteException {
390 try {
391 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
392 AssetCategoryServiceUtil.getVocabularyRootCategories(groupId,
393 vocabularyId, start, end, obc);
394
395 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
396 }
397 catch (Exception e) {
398 _log.error(e, e);
399
400 throw new RemoteException(e.getMessage());
401 }
402 }
403
404 public static int getVocabularyRootCategoriesCount(long groupId,
405 long vocabularyId) throws RemoteException {
406 try {
407 int returnValue = AssetCategoryServiceUtil.getVocabularyRootCategoriesCount(groupId,
408 vocabularyId);
409
410 return returnValue;
411 }
412 catch (Exception e) {
413 _log.error(e, e);
414
415 throw new RemoteException(e.getMessage());
416 }
417 }
418
419 public static com.liferay.portlet.asset.model.AssetCategorySoap moveCategory(
420 long categoryId, long parentCategoryId, long vocabularyId,
421 com.liferay.portal.service.ServiceContext serviceContext)
422 throws RemoteException {
423 try {
424 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.moveCategory(categoryId,
425 parentCategoryId, vocabularyId, serviceContext);
426
427 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
428 }
429 catch (Exception e) {
430 _log.error(e, e);
431
432 throw new RemoteException(e.getMessage());
433 }
434 }
435
436 public static com.liferay.portlet.asset.model.AssetCategorySoap[] search(
437 long groupId, java.lang.String keywords, long vocabularyId, int start,
438 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
439 throws RemoteException {
440 try {
441 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
442 AssetCategoryServiceUtil.search(groupId, keywords,
443 vocabularyId, start, end, obc);
444
445 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
446 }
447 catch (Exception e) {
448 _log.error(e, e);
449
450 throw new RemoteException(e.getMessage());
451 }
452 }
453
454 public static java.lang.String search(long groupId, java.lang.String name,
455 java.lang.String[] categoryProperties, int start, int end)
456 throws RemoteException {
457 try {
458 com.liferay.portal.kernel.json.JSONArray returnValue = AssetCategoryServiceUtil.search(groupId,
459 name, categoryProperties, start, end);
460
461 return returnValue.toString();
462 }
463 catch (Exception e) {
464 _log.error(e, e);
465
466 throw new RemoteException(e.getMessage());
467 }
468 }
469
470 public static java.lang.String search(long[] groupIds,
471 java.lang.String name, long[] vocabularyIds, int start, int end)
472 throws RemoteException {
473 try {
474 com.liferay.portal.kernel.json.JSONArray returnValue = AssetCategoryServiceUtil.search(groupIds,
475 name, vocabularyIds, start, end);
476
477 return returnValue.toString();
478 }
479 catch (Exception e) {
480 _log.error(e, e);
481
482 throw new RemoteException(e.getMessage());
483 }
484 }
485
486 public static com.liferay.portlet.asset.model.AssetCategorySoap updateCategory(
487 long categoryId, long parentCategoryId,
488 java.lang.String[] titleMapLanguageIds,
489 java.lang.String[] titleMapValues,
490 java.lang.String[] descriptionMapLanguageIds,
491 java.lang.String[] descriptionMapValues, long vocabularyId,
492 java.lang.String[] categoryProperties,
493 com.liferay.portal.service.ServiceContext serviceContext)
494 throws RemoteException {
495 try {
496 Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
497 titleMapValues);
498 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
499 descriptionMapValues);
500
501 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.updateCategory(categoryId,
502 parentCategoryId, titleMap, descriptionMap, vocabularyId,
503 categoryProperties, serviceContext);
504
505 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
506 }
507 catch (Exception e) {
508 _log.error(e, e);
509
510 throw new RemoteException(e.getMessage());
511 }
512 }
513
514 private static Log _log = LogFactoryUtil.getLog(AssetCategoryServiceSoap.class);
515 }