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