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 public static void deleteCategories(long[] categoryIds)
100 throws RemoteException {
101 try {
102 AssetCategoryServiceUtil.deleteCategories(categoryIds);
103 }
104 catch (Exception e) {
105 _log.error(e, e);
106
107 throw new RemoteException(e.getMessage());
108 }
109 }
110
111 public static void deleteCategory(long categoryId)
112 throws RemoteException {
113 try {
114 AssetCategoryServiceUtil.deleteCategory(categoryId);
115 }
116 catch (Exception e) {
117 _log.error(e, e);
118
119 throw new RemoteException(e.getMessage());
120 }
121 }
122
123 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getCategories(
124 java.lang.String className, long classPK) throws RemoteException {
125 try {
126 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
127 AssetCategoryServiceUtil.getCategories(className, classPK);
128
129 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
130 }
131 catch (Exception e) {
132 _log.error(e, e);
133
134 throw new RemoteException(e.getMessage());
135 }
136 }
137
138 public static com.liferay.portlet.asset.model.AssetCategorySoap getCategory(
139 long categoryId) throws RemoteException {
140 try {
141 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.getCategory(categoryId);
142
143 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
144 }
145 catch (Exception e) {
146 _log.error(e, e);
147
148 throw new RemoteException(e.getMessage());
149 }
150 }
151
152 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getChildCategories(
153 long parentCategoryId) throws RemoteException {
154 try {
155 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
156 AssetCategoryServiceUtil.getChildCategories(parentCategoryId);
157
158 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
159 }
160 catch (Exception e) {
161 _log.error(e, e);
162
163 throw new RemoteException(e.getMessage());
164 }
165 }
166
167 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getChildCategories(
168 long parentCategoryId, int start, int end,
169 com.liferay.portal.kernel.util.OrderByComparator obc)
170 throws RemoteException {
171 try {
172 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
173 AssetCategoryServiceUtil.getChildCategories(parentCategoryId,
174 start, end, obc);
175
176 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
177 }
178 catch (Exception e) {
179 _log.error(e, e);
180
181 throw new RemoteException(e.getMessage());
182 }
183 }
184
185
188 public static java.lang.String getJSONSearch(long groupId,
189 java.lang.String keywords, long vocabularyId, int start, int end,
190 com.liferay.portal.kernel.util.OrderByComparator obc)
191 throws RemoteException {
192 try {
193 com.liferay.portal.kernel.json.JSONArray returnValue = AssetCategoryServiceUtil.getJSONSearch(groupId,
194 keywords, vocabularyId, start, end, obc);
195
196 return returnValue.toString();
197 }
198 catch (Exception e) {
199 _log.error(e, e);
200
201 throw new RemoteException(e.getMessage());
202 }
203 }
204
205 public static java.lang.String getJSONSearch(long groupId,
206 java.lang.String name, long[] vocabularyIds, int start, int end)
207 throws RemoteException {
208 try {
209 com.liferay.portal.kernel.json.JSONArray returnValue = AssetCategoryServiceUtil.getJSONSearch(groupId,
210 name, vocabularyIds, start, end);
211
212 return returnValue.toString();
213 }
214 catch (Exception e) {
215 _log.error(e, e);
216
217 throw new RemoteException(e.getMessage());
218 }
219 }
220
221 public static java.lang.String getJSONVocabularyCategories(
222 long vocabularyId, int start, int end,
223 com.liferay.portal.kernel.util.OrderByComparator obc)
224 throws RemoteException {
225 try {
226 com.liferay.portal.kernel.json.JSONObject returnValue = AssetCategoryServiceUtil.getJSONVocabularyCategories(vocabularyId,
227 start, end, obc);
228
229 return returnValue.toString();
230 }
231 catch (Exception e) {
232 _log.error(e, e);
233
234 throw new RemoteException(e.getMessage());
235 }
236 }
237
238 public static java.lang.String getJSONVocabularyCategories(long groupId,
239 java.lang.String name, long vocabularyId, int start, int end,
240 com.liferay.portal.kernel.util.OrderByComparator obc)
241 throws RemoteException {
242 try {
243 com.liferay.portal.kernel.json.JSONObject returnValue = AssetCategoryServiceUtil.getJSONVocabularyCategories(groupId,
244 name, vocabularyId, start, end, obc);
245
246 return returnValue.toString();
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[] getVocabularyCategories(
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.getVocabularyCategories(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[] getVocabularyCategories(
274 long parentCategoryId, long vocabularyId, int start, int end,
275 com.liferay.portal.kernel.util.OrderByComparator obc)
276 throws RemoteException {
277 try {
278 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
279 AssetCategoryServiceUtil.getVocabularyCategories(parentCategoryId,
280 vocabularyId, start, end, obc);
281
282 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
283 }
284 catch (Exception e) {
285 _log.error(e, e);
286
287 throw new RemoteException(e.getMessage());
288 }
289 }
290
291 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyCategories(
292 long groupId, java.lang.String name, long vocabularyId, int start,
293 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
294 throws RemoteException {
295 try {
296 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
297 AssetCategoryServiceUtil.getVocabularyCategories(groupId, name,
298 vocabularyId, start, end, obc);
299
300 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
301 }
302 catch (Exception e) {
303 _log.error(e, e);
304
305 throw new RemoteException(e.getMessage());
306 }
307 }
308
309 public static int getVocabularyCategoriesCount(long groupId,
310 long vocabularyId) throws RemoteException {
311 try {
312 int returnValue = AssetCategoryServiceUtil.getVocabularyCategoriesCount(groupId,
313 vocabularyId);
314
315 return returnValue;
316 }
317 catch (Exception e) {
318 _log.error(e, e);
319
320 throw new RemoteException(e.getMessage());
321 }
322 }
323
324 public static int getVocabularyCategoriesCount(long groupId,
325 java.lang.String name, long vocabularyId) throws RemoteException {
326 try {
327 int returnValue = AssetCategoryServiceUtil.getVocabularyCategoriesCount(groupId,
328 name, vocabularyId);
329
330 return returnValue;
331 }
332 catch (Exception e) {
333 _log.error(e, e);
334
335 throw new RemoteException(e.getMessage());
336 }
337 }
338
339 public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyRootCategories(
340 long vocabularyId, int start, int end,
341 com.liferay.portal.kernel.util.OrderByComparator obc)
342 throws RemoteException {
343 try {
344 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
345 AssetCategoryServiceUtil.getVocabularyRootCategories(vocabularyId,
346 start, end, obc);
347
348 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
349 }
350 catch (Exception e) {
351 _log.error(e, e);
352
353 throw new RemoteException(e.getMessage());
354 }
355 }
356
357 public static com.liferay.portlet.asset.model.AssetCategorySoap moveCategory(
358 long categoryId, long parentCategoryId, long vocabularyId,
359 com.liferay.portal.service.ServiceContext serviceContext)
360 throws RemoteException {
361 try {
362 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.moveCategory(categoryId,
363 parentCategoryId, vocabularyId, serviceContext);
364
365 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
366 }
367 catch (Exception e) {
368 _log.error(e, e);
369
370 throw new RemoteException(e.getMessage());
371 }
372 }
373
374 public static com.liferay.portlet.asset.model.AssetCategorySoap[] search(
375 long groupId, java.lang.String keywords, long vocabularyId, int start,
376 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
377 throws RemoteException {
378 try {
379 java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
380 AssetCategoryServiceUtil.search(groupId, keywords,
381 vocabularyId, start, end, obc);
382
383 return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
384 }
385 catch (Exception e) {
386 _log.error(e, e);
387
388 throw new RemoteException(e.getMessage());
389 }
390 }
391
392 public static java.lang.String search(long groupId, java.lang.String name,
393 java.lang.String[] categoryProperties, int start, int end)
394 throws RemoteException {
395 try {
396 com.liferay.portal.kernel.json.JSONArray returnValue = AssetCategoryServiceUtil.search(groupId,
397 name, categoryProperties, start, end);
398
399 return returnValue.toString();
400 }
401 catch (Exception e) {
402 _log.error(e, e);
403
404 throw new RemoteException(e.getMessage());
405 }
406 }
407
408 public static com.liferay.portlet.asset.model.AssetCategorySoap updateCategory(
409 long categoryId, long parentCategoryId,
410 java.lang.String[] titleMapLanguageIds,
411 java.lang.String[] titleMapValues,
412 java.lang.String[] descriptionMapLanguageIds,
413 java.lang.String[] descriptionMapValues, long vocabularyId,
414 java.lang.String[] categoryProperties,
415 com.liferay.portal.service.ServiceContext serviceContext)
416 throws RemoteException {
417 try {
418 Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
419 titleMapValues);
420 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
421 descriptionMapValues);
422
423 com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.updateCategory(categoryId,
424 parentCategoryId, titleMap, descriptionMap, vocabularyId,
425 categoryProperties, 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 private static Log _log = LogFactoryUtil.getLog(AssetCategoryServiceSoap.class);
437 }