001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
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.AssetVocabularyServiceUtil;
024    
025    import java.rmi.RemoteException;
026    
027    import java.util.Locale;
028    import java.util.Map;
029    
030    /**
031     * Provides the SOAP utility for the
032     * {@link com.liferay.portlet.asset.service.AssetVocabularyServiceUtil} service utility. The
033     * static methods of this class calls the same methods of the service utility.
034     * However, the signatures are different because it is difficult for SOAP to
035     * support certain types.
036     *
037     * <p>
038     * ServiceBuilder follows certain rules in translating the methods. For example,
039     * if the method in the service utility returns a {@link java.util.List}, that
040     * is translated to an array of {@link com.liferay.portlet.asset.model.AssetVocabularySoap}.
041     * If the method in the service utility returns a
042     * {@link com.liferay.portlet.asset.model.AssetVocabulary}, that is translated to a
043     * {@link com.liferay.portlet.asset.model.AssetVocabularySoap}. Methods that SOAP cannot
044     * safely wire are skipped.
045     * </p>
046     *
047     * <p>
048     * The benefits of using the SOAP utility is that it is cross platform
049     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
050     * even Perl, to call the generated services. One drawback of SOAP is that it is
051     * slow because it needs to serialize all calls into a text format (XML).
052     * </p>
053     *
054     * <p>
055     * You can see a list of services at http://localhost:8080/api/axis. Set the
056     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
057     * security.
058     * </p>
059     *
060     * <p>
061     * The SOAP utility is only generated for remote services.
062     * </p>
063     *
064     * @author Brian Wing Shun Chan
065     * @see AssetVocabularyServiceHttp
066     * @see com.liferay.portlet.asset.model.AssetVocabularySoap
067     * @see com.liferay.portlet.asset.service.AssetVocabularyServiceUtil
068     * @generated
069     */
070    @ProviderType
071    public class AssetVocabularyServiceSoap {
072            /**
073            * @deprecated As of 6.1.0 {@link #addVocabulary(String, Map, Map, String,
074            ServiceContext)}
075            */
076            @Deprecated
077            public static com.liferay.portlet.asset.model.AssetVocabularySoap addVocabulary(
078                    java.lang.String[] titleMapLanguageIds,
079                    java.lang.String[] titleMapValues,
080                    java.lang.String[] descriptionMapLanguageIds,
081                    java.lang.String[] descriptionMapValues, java.lang.String settings,
082                    com.liferay.portal.service.ServiceContext serviceContext)
083                    throws RemoteException {
084                    try {
085                            Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
086                                            titleMapValues);
087                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
088                                            descriptionMapValues);
089    
090                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.addVocabulary(titleMap,
091                                            descriptionMap, settings, serviceContext);
092    
093                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
094                    }
095                    catch (Exception e) {
096                            _log.error(e, e);
097    
098                            throw new RemoteException(e.getMessage());
099                    }
100            }
101    
102            public static com.liferay.portlet.asset.model.AssetVocabularySoap addVocabulary(
103                    java.lang.String title, java.lang.String[] titleMapLanguageIds,
104                    java.lang.String[] titleMapValues,
105                    java.lang.String[] descriptionMapLanguageIds,
106                    java.lang.String[] descriptionMapValues, java.lang.String settings,
107                    com.liferay.portal.service.ServiceContext serviceContext)
108                    throws RemoteException {
109                    try {
110                            Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
111                                            titleMapValues);
112                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
113                                            descriptionMapValues);
114    
115                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.addVocabulary(title,
116                                            titleMap, descriptionMap, settings, serviceContext);
117    
118                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
119                    }
120                    catch (Exception e) {
121                            _log.error(e, e);
122    
123                            throw new RemoteException(e.getMessage());
124                    }
125            }
126    
127            public static com.liferay.portlet.asset.model.AssetVocabularySoap addVocabulary(
128                    java.lang.String title,
129                    com.liferay.portal.service.ServiceContext serviceContext)
130                    throws RemoteException {
131                    try {
132                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.addVocabulary(title,
133                                            serviceContext);
134    
135                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
136                    }
137                    catch (Exception e) {
138                            _log.error(e, e);
139    
140                            throw new RemoteException(e.getMessage());
141                    }
142            }
143    
144            /**
145            * @deprecated As of 6.2.0, Replaced by {@link #deleteVocabularies(long[],
146            ServiceContext)}
147            */
148            @Deprecated
149            public static void deleteVocabularies(long[] vocabularyIds)
150                    throws RemoteException {
151                    try {
152                            AssetVocabularyServiceUtil.deleteVocabularies(vocabularyIds);
153                    }
154                    catch (Exception e) {
155                            _log.error(e, e);
156    
157                            throw new RemoteException(e.getMessage());
158                    }
159            }
160    
161            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] deleteVocabularies(
162                    long[] vocabularyIds,
163                    com.liferay.portal.service.ServiceContext serviceContext)
164                    throws RemoteException {
165                    try {
166                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
167                                    AssetVocabularyServiceUtil.deleteVocabularies(vocabularyIds,
168                                            serviceContext);
169    
170                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
171                    }
172                    catch (Exception e) {
173                            _log.error(e, e);
174    
175                            throw new RemoteException(e.getMessage());
176                    }
177            }
178    
179            public static void deleteVocabulary(long vocabularyId)
180                    throws RemoteException {
181                    try {
182                            AssetVocabularyServiceUtil.deleteVocabulary(vocabularyId);
183                    }
184                    catch (Exception e) {
185                            _log.error(e, e);
186    
187                            throw new RemoteException(e.getMessage());
188                    }
189            }
190    
191            public static com.liferay.portlet.asset.model.AssetVocabularySoap fetchVocabulary(
192                    long vocabularyId) throws RemoteException {
193                    try {
194                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.fetchVocabulary(vocabularyId);
195    
196                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
197                    }
198                    catch (Exception e) {
199                            _log.error(e, e);
200    
201                            throw new RemoteException(e.getMessage());
202                    }
203            }
204    
205            /**
206            * @deprecated As of 7.0.0, with no direct replacement
207            */
208            @Deprecated
209            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getCompanyVocabularies(
210                    long companyId) throws RemoteException {
211                    try {
212                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
213                                    AssetVocabularyServiceUtil.getCompanyVocabularies(companyId);
214    
215                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
216                    }
217                    catch (Exception e) {
218                            _log.error(e, e);
219    
220                            throw new RemoteException(e.getMessage());
221                    }
222            }
223    
224            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupsVocabularies(
225                    long[] groupIds) throws RemoteException {
226                    try {
227                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
228                                    AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds);
229    
230                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
231                    }
232                    catch (Exception e) {
233                            _log.error(e, e);
234    
235                            throw new RemoteException(e.getMessage());
236                    }
237            }
238    
239            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupsVocabularies(
240                    long[] groupIds, java.lang.String className) throws RemoteException {
241                    try {
242                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
243                                    AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds,
244                                            className);
245    
246                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
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.AssetVocabularySoap[] getGroupsVocabularies(
256                    long[] groupIds, java.lang.String className, long classTypePK)
257                    throws RemoteException {
258                    try {
259                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
260                                    AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds,
261                                            className, classTypePK);
262    
263                            return com.liferay.portlet.asset.model.AssetVocabularySoap.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.AssetVocabularySoap[] getGroupVocabularies(
273                    long groupId) throws RemoteException {
274                    try {
275                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
276                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId);
277    
278                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
279                    }
280                    catch (Exception e) {
281                            _log.error(e, e);
282    
283                            throw new RemoteException(e.getMessage());
284                    }
285            }
286    
287            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
288                    long groupId, boolean createDefaultVocabulary)
289                    throws RemoteException {
290                    try {
291                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
292                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId,
293                                            createDefaultVocabulary);
294    
295                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
296                    }
297                    catch (Exception e) {
298                            _log.error(e, e);
299    
300                            throw new RemoteException(e.getMessage());
301                    }
302            }
303    
304            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
305                    long groupId, boolean createDefaultVocabulary, int start, int end,
306                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
307                    throws RemoteException {
308                    try {
309                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
310                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId,
311                                            createDefaultVocabulary, start, end, obc);
312    
313                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
314                    }
315                    catch (Exception e) {
316                            _log.error(e, e);
317    
318                            throw new RemoteException(e.getMessage());
319                    }
320            }
321    
322            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
323                    long groupId, int start, int end,
324                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
325                    throws RemoteException {
326                    try {
327                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
328                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId, start,
329                                            end, obc);
330    
331                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
332                    }
333                    catch (Exception e) {
334                            _log.error(e, e);
335    
336                            throw new RemoteException(e.getMessage());
337                    }
338            }
339    
340            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
341                    long groupId, java.lang.String name, int start, int end,
342                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
343                    throws RemoteException {
344                    try {
345                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
346                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId, name,
347                                            start, end, obc);
348    
349                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
350                    }
351                    catch (Exception e) {
352                            _log.error(e, e);
353    
354                            throw new RemoteException(e.getMessage());
355                    }
356            }
357    
358            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
359                    long[] groupIds) throws RemoteException {
360                    try {
361                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
362                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupIds);
363    
364                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
365                    }
366                    catch (Exception e) {
367                            _log.error(e, e);
368    
369                            throw new RemoteException(e.getMessage());
370                    }
371            }
372    
373            public static int getGroupVocabulariesCount(long groupId)
374                    throws RemoteException {
375                    try {
376                            int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupId);
377    
378                            return returnValue;
379                    }
380                    catch (Exception e) {
381                            _log.error(e, e);
382    
383                            throw new RemoteException(e.getMessage());
384                    }
385            }
386    
387            public static int getGroupVocabulariesCount(long groupId,
388                    java.lang.String name) throws RemoteException {
389                    try {
390                            int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupId,
391                                            name);
392    
393                            return returnValue;
394                    }
395                    catch (Exception e) {
396                            _log.error(e, e);
397    
398                            throw new RemoteException(e.getMessage());
399                    }
400            }
401    
402            public static int getGroupVocabulariesCount(long[] groupIds)
403                    throws RemoteException {
404                    try {
405                            int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupIds);
406    
407                            return returnValue;
408                    }
409                    catch (Exception e) {
410                            _log.error(e, e);
411    
412                            throw new RemoteException(e.getMessage());
413                    }
414            }
415    
416            public static com.liferay.portlet.asset.model.AssetVocabularyDisplay getGroupVocabulariesDisplay(
417                    long groupId, java.lang.String name, int start, int end,
418                    boolean addDefaultVocabulary,
419                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
420                    throws RemoteException {
421                    try {
422                            com.liferay.portlet.asset.model.AssetVocabularyDisplay returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesDisplay(groupId,
423                                            name, start, end, addDefaultVocabulary, obc);
424    
425                            return returnValue;
426                    }
427                    catch (Exception e) {
428                            _log.error(e, e);
429    
430                            throw new RemoteException(e.getMessage());
431                    }
432            }
433    
434            public static com.liferay.portlet.asset.model.AssetVocabularyDisplay getGroupVocabulariesDisplay(
435                    long groupId, java.lang.String name, int start, int end,
436                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
437                    throws RemoteException {
438                    try {
439                            com.liferay.portlet.asset.model.AssetVocabularyDisplay returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesDisplay(groupId,
440                                            name, start, end, obc);
441    
442                            return returnValue;
443                    }
444                    catch (Exception e) {
445                            _log.error(e, e);
446    
447                            throw new RemoteException(e.getMessage());
448                    }
449            }
450    
451            /**
452            * @deprecated As of 6.2.0, with no direct replacement
453            */
454            @Deprecated
455            public static java.lang.String getJSONGroupVocabularies(long groupId,
456                    java.lang.String name, int start, int end,
457                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
458                    throws RemoteException {
459                    try {
460                            com.liferay.portal.kernel.json.JSONObject returnValue = AssetVocabularyServiceUtil.getJSONGroupVocabularies(groupId,
461                                            name, start, end, obc);
462    
463                            return returnValue.toString();
464                    }
465                    catch (Exception e) {
466                            _log.error(e, e);
467    
468                            throw new RemoteException(e.getMessage());
469                    }
470            }
471    
472            /**
473            * @deprecated As of 7.0.0, replaced by {@link
474            #AssetUtil.filterVocabularyIds(PermissionChecker, long[])}
475            */
476            @Deprecated
477            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getVocabularies(
478                    long[] vocabularyIds) throws RemoteException {
479                    try {
480                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
481                                    AssetVocabularyServiceUtil.getVocabularies(vocabularyIds);
482    
483                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
484                    }
485                    catch (Exception e) {
486                            _log.error(e, e);
487    
488                            throw new RemoteException(e.getMessage());
489                    }
490            }
491    
492            public static com.liferay.portlet.asset.model.AssetVocabularySoap getVocabulary(
493                    long vocabularyId) throws RemoteException {
494                    try {
495                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.getVocabulary(vocabularyId);
496    
497                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
498                    }
499                    catch (Exception e) {
500                            _log.error(e, e);
501    
502                            throw new RemoteException(e.getMessage());
503                    }
504            }
505    
506            public static com.liferay.portlet.asset.model.AssetVocabularyDisplay searchVocabulariesDisplay(
507                    long groupId, java.lang.String title, int start, int end,
508                    boolean addDefaultVocabulary) throws RemoteException {
509                    try {
510                            com.liferay.portlet.asset.model.AssetVocabularyDisplay returnValue = AssetVocabularyServiceUtil.searchVocabulariesDisplay(groupId,
511                                            title, start, end, addDefaultVocabulary);
512    
513                            return returnValue;
514                    }
515                    catch (Exception e) {
516                            _log.error(e, e);
517    
518                            throw new RemoteException(e.getMessage());
519                    }
520            }
521    
522            /**
523            * @deprecated As of 6.1.0, {@link #updateVocabulary(long, String, Map, Map,
524            String, ServiceContext)}
525            */
526            @Deprecated
527            public static com.liferay.portlet.asset.model.AssetVocabularySoap updateVocabulary(
528                    long vocabularyId, java.lang.String[] titleMapLanguageIds,
529                    java.lang.String[] titleMapValues,
530                    java.lang.String[] descriptionMapLanguageIds,
531                    java.lang.String[] descriptionMapValues, java.lang.String settings,
532                    com.liferay.portal.service.ServiceContext serviceContext)
533                    throws RemoteException {
534                    try {
535                            Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
536                                            titleMapValues);
537                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
538                                            descriptionMapValues);
539    
540                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.updateVocabulary(vocabularyId,
541                                            titleMap, descriptionMap, settings, serviceContext);
542    
543                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
544                    }
545                    catch (Exception e) {
546                            _log.error(e, e);
547    
548                            throw new RemoteException(e.getMessage());
549                    }
550            }
551    
552            public static com.liferay.portlet.asset.model.AssetVocabularySoap updateVocabulary(
553                    long vocabularyId, java.lang.String title,
554                    java.lang.String[] titleMapLanguageIds,
555                    java.lang.String[] titleMapValues,
556                    java.lang.String[] descriptionMapLanguageIds,
557                    java.lang.String[] descriptionMapValues, java.lang.String settings,
558                    com.liferay.portal.service.ServiceContext serviceContext)
559                    throws RemoteException {
560                    try {
561                            Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
562                                            titleMapValues);
563                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
564                                            descriptionMapValues);
565    
566                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.updateVocabulary(vocabularyId,
567                                            title, titleMap, descriptionMap, settings, serviceContext);
568    
569                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
570                    }
571                    catch (Exception e) {
572                            _log.error(e, e);
573    
574                            throw new RemoteException(e.getMessage());
575                    }
576            }
577    
578            private static Log _log = LogFactoryUtil.getLog(AssetVocabularyServiceSoap.class);
579    }