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            /**
192            * @deprecated As of 7.0.0, with no direct replacement
193            */
194            @Deprecated
195            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getCompanyVocabularies(
196                    long companyId) throws RemoteException {
197                    try {
198                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
199                                    AssetVocabularyServiceUtil.getCompanyVocabularies(companyId);
200    
201                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
202                    }
203                    catch (Exception e) {
204                            _log.error(e, e);
205    
206                            throw new RemoteException(e.getMessage());
207                    }
208            }
209    
210            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupsVocabularies(
211                    long[] groupIds) throws RemoteException {
212                    try {
213                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
214                                    AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds);
215    
216                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
217                    }
218                    catch (Exception e) {
219                            _log.error(e, e);
220    
221                            throw new RemoteException(e.getMessage());
222                    }
223            }
224    
225            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupsVocabularies(
226                    long[] groupIds, java.lang.String className) throws RemoteException {
227                    try {
228                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
229                                    AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds,
230                                            className);
231    
232                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
233                    }
234                    catch (Exception e) {
235                            _log.error(e, e);
236    
237                            throw new RemoteException(e.getMessage());
238                    }
239            }
240    
241            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupsVocabularies(
242                    long[] groupIds, java.lang.String className, long classTypePK)
243                    throws RemoteException {
244                    try {
245                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
246                                    AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds,
247                                            className, classTypePK);
248    
249                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
250                    }
251                    catch (Exception e) {
252                            _log.error(e, e);
253    
254                            throw new RemoteException(e.getMessage());
255                    }
256            }
257    
258            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
259                    long groupId) throws RemoteException {
260                    try {
261                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
262                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId);
263    
264                            return com.liferay.portlet.asset.model.AssetVocabularySoap.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.AssetVocabularySoap[] getGroupVocabularies(
274                    long groupId, boolean createDefaultVocabulary)
275                    throws RemoteException {
276                    try {
277                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
278                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId,
279                                            createDefaultVocabulary);
280    
281                            return com.liferay.portlet.asset.model.AssetVocabularySoap.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.AssetVocabularySoap[] getGroupVocabularies(
291                    long groupId, boolean createDefaultVocabulary, int start, int end,
292                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
293                    throws RemoteException {
294                    try {
295                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
296                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId,
297                                            createDefaultVocabulary, start, end, obc);
298    
299                            return com.liferay.portlet.asset.model.AssetVocabularySoap.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 com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
309                    long groupId, int start, int end,
310                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
311                    throws RemoteException {
312                    try {
313                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
314                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId, start,
315                                            end, obc);
316    
317                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
318                    }
319                    catch (Exception e) {
320                            _log.error(e, e);
321    
322                            throw new RemoteException(e.getMessage());
323                    }
324            }
325    
326            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
327                    long groupId, java.lang.String name, int start, int end,
328                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
329                    throws RemoteException {
330                    try {
331                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
332                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId, name,
333                                            start, end, obc);
334    
335                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
336                    }
337                    catch (Exception e) {
338                            _log.error(e, e);
339    
340                            throw new RemoteException(e.getMessage());
341                    }
342            }
343    
344            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
345                    long[] groupIds) throws RemoteException {
346                    try {
347                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
348                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupIds);
349    
350                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
351                    }
352                    catch (Exception e) {
353                            _log.error(e, e);
354    
355                            throw new RemoteException(e.getMessage());
356                    }
357            }
358    
359            public static int getGroupVocabulariesCount(long groupId)
360                    throws RemoteException {
361                    try {
362                            int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupId);
363    
364                            return 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                    java.lang.String name) throws RemoteException {
375                    try {
376                            int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupId,
377                                            name);
378    
379                            return returnValue;
380                    }
381                    catch (Exception e) {
382                            _log.error(e, e);
383    
384                            throw new RemoteException(e.getMessage());
385                    }
386            }
387    
388            public static int getGroupVocabulariesCount(long[] groupIds)
389                    throws RemoteException {
390                    try {
391                            int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupIds);
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 com.liferay.portlet.asset.model.AssetVocabularyDisplay getGroupVocabulariesDisplay(
403                    long groupId, java.lang.String name, int start, int end,
404                    boolean addDefaultVocabulary,
405                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
406                    throws RemoteException {
407                    try {
408                            com.liferay.portlet.asset.model.AssetVocabularyDisplay returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesDisplay(groupId,
409                                            name, start, end, addDefaultVocabulary, obc);
410    
411                            return returnValue;
412                    }
413                    catch (Exception e) {
414                            _log.error(e, e);
415    
416                            throw new RemoteException(e.getMessage());
417                    }
418            }
419    
420            public static com.liferay.portlet.asset.model.AssetVocabularyDisplay getGroupVocabulariesDisplay(
421                    long groupId, java.lang.String name, int start, int end,
422                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
423                    throws RemoteException {
424                    try {
425                            com.liferay.portlet.asset.model.AssetVocabularyDisplay returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesDisplay(groupId,
426                                            name, start, end, obc);
427    
428                            return returnValue;
429                    }
430                    catch (Exception e) {
431                            _log.error(e, e);
432    
433                            throw new RemoteException(e.getMessage());
434                    }
435            }
436    
437            /**
438            * @deprecated As of 6.2.0, with no direct replacement
439            */
440            @Deprecated
441            public static java.lang.String getJSONGroupVocabularies(long groupId,
442                    java.lang.String name, int start, int end,
443                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
444                    throws RemoteException {
445                    try {
446                            com.liferay.portal.kernel.json.JSONObject returnValue = AssetVocabularyServiceUtil.getJSONGroupVocabularies(groupId,
447                                            name, start, end, obc);
448    
449                            return returnValue.toString();
450                    }
451                    catch (Exception e) {
452                            _log.error(e, e);
453    
454                            throw new RemoteException(e.getMessage());
455                    }
456            }
457    
458            /**
459            * @deprecated As of 7.0.0, replaced by {@link
460            #AssetUtil.filterVocabularyIds(PermissionChecker, long[])}
461            */
462            @Deprecated
463            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getVocabularies(
464                    long[] vocabularyIds) throws RemoteException {
465                    try {
466                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
467                                    AssetVocabularyServiceUtil.getVocabularies(vocabularyIds);
468    
469                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
470                    }
471                    catch (Exception e) {
472                            _log.error(e, e);
473    
474                            throw new RemoteException(e.getMessage());
475                    }
476            }
477    
478            public static com.liferay.portlet.asset.model.AssetVocabularySoap getVocabulary(
479                    long vocabularyId) throws RemoteException {
480                    try {
481                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.getVocabulary(vocabularyId);
482    
483                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(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.AssetVocabularyDisplay searchVocabulariesDisplay(
493                    long groupId, java.lang.String title, int start, int end,
494                    boolean addDefaultVocabulary) throws RemoteException {
495                    try {
496                            com.liferay.portlet.asset.model.AssetVocabularyDisplay returnValue = AssetVocabularyServiceUtil.searchVocabulariesDisplay(groupId,
497                                            title, start, end, addDefaultVocabulary);
498    
499                            return returnValue;
500                    }
501                    catch (Exception e) {
502                            _log.error(e, e);
503    
504                            throw new RemoteException(e.getMessage());
505                    }
506            }
507    
508            /**
509            * @deprecated As of 6.1.0, {@link #updateVocabulary(long, String, Map, Map,
510            String, ServiceContext)}
511            */
512            @Deprecated
513            public static com.liferay.portlet.asset.model.AssetVocabularySoap updateVocabulary(
514                    long vocabularyId, java.lang.String[] titleMapLanguageIds,
515                    java.lang.String[] titleMapValues,
516                    java.lang.String[] descriptionMapLanguageIds,
517                    java.lang.String[] descriptionMapValues, java.lang.String settings,
518                    com.liferay.portal.service.ServiceContext serviceContext)
519                    throws RemoteException {
520                    try {
521                            Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
522                                            titleMapValues);
523                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
524                                            descriptionMapValues);
525    
526                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.updateVocabulary(vocabularyId,
527                                            titleMap, descriptionMap, settings, serviceContext);
528    
529                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
530                    }
531                    catch (Exception e) {
532                            _log.error(e, e);
533    
534                            throw new RemoteException(e.getMessage());
535                    }
536            }
537    
538            public static com.liferay.portlet.asset.model.AssetVocabularySoap updateVocabulary(
539                    long vocabularyId, java.lang.String title,
540                    java.lang.String[] titleMapLanguageIds,
541                    java.lang.String[] titleMapValues,
542                    java.lang.String[] descriptionMapLanguageIds,
543                    java.lang.String[] descriptionMapValues, java.lang.String settings,
544                    com.liferay.portal.service.ServiceContext serviceContext)
545                    throws RemoteException {
546                    try {
547                            Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
548                                            titleMapValues);
549                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
550                                            descriptionMapValues);
551    
552                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.updateVocabulary(vocabularyId,
553                                            title, titleMap, descriptionMap, settings, serviceContext);
554    
555                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
556                    }
557                    catch (Exception e) {
558                            _log.error(e, e);
559    
560                            throw new RemoteException(e.getMessage());
561                    }
562            }
563    
564            private static Log _log = LogFactoryUtil.getLog(AssetVocabularyServiceSoap.class);
565    }