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 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 AssetVocabularyServiceUtil
068     * @generated
069     */
070    @ProviderType
071    public class AssetVocabularyServiceSoap {
072            public static com.liferay.portlet.asset.model.AssetVocabularySoap addVocabulary(
073                    long groupId, java.lang.String title,
074                    java.lang.String[] titleMapLanguageIds,
075                    java.lang.String[] titleMapValues,
076                    java.lang.String[] descriptionMapLanguageIds,
077                    java.lang.String[] descriptionMapValues, java.lang.String settings,
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.AssetVocabulary returnValue = AssetVocabularyServiceUtil.addVocabulary(groupId,
087                                            title, titleMap, descriptionMap, settings, serviceContext);
088    
089                            return com.liferay.portlet.asset.model.AssetVocabularySoap.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.AssetVocabularySoap addVocabulary(
099                    long groupId, java.lang.String title,
100                    com.liferay.portal.service.ServiceContext serviceContext)
101                    throws RemoteException {
102                    try {
103                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.addVocabulary(groupId,
104                                            title, serviceContext);
105    
106                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
107                    }
108                    catch (Exception e) {
109                            _log.error(e, e);
110    
111                            throw new RemoteException(e.getMessage());
112                    }
113            }
114    
115            /**
116            * @deprecated As of 6.2.0, Replaced by {@link #deleteVocabularies(long[],
117            ServiceContext)}
118            */
119            @Deprecated
120            public static void deleteVocabularies(long[] vocabularyIds)
121                    throws RemoteException {
122                    try {
123                            AssetVocabularyServiceUtil.deleteVocabularies(vocabularyIds);
124                    }
125                    catch (Exception e) {
126                            _log.error(e, e);
127    
128                            throw new RemoteException(e.getMessage());
129                    }
130            }
131    
132            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] deleteVocabularies(
133                    long[] vocabularyIds,
134                    com.liferay.portal.service.ServiceContext serviceContext)
135                    throws RemoteException {
136                    try {
137                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
138                                    AssetVocabularyServiceUtil.deleteVocabularies(vocabularyIds,
139                                            serviceContext);
140    
141                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
142                    }
143                    catch (Exception e) {
144                            _log.error(e, e);
145    
146                            throw new RemoteException(e.getMessage());
147                    }
148            }
149    
150            public static void deleteVocabulary(long vocabularyId)
151                    throws RemoteException {
152                    try {
153                            AssetVocabularyServiceUtil.deleteVocabulary(vocabularyId);
154                    }
155                    catch (Exception e) {
156                            _log.error(e, e);
157    
158                            throw new RemoteException(e.getMessage());
159                    }
160            }
161    
162            public static com.liferay.portlet.asset.model.AssetVocabularySoap fetchVocabulary(
163                    long vocabularyId) throws RemoteException {
164                    try {
165                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.fetchVocabulary(vocabularyId);
166    
167                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
168                    }
169                    catch (Exception e) {
170                            _log.error(e, e);
171    
172                            throw new RemoteException(e.getMessage());
173                    }
174            }
175    
176            /**
177            * @deprecated As of 7.0.0, with no direct replacement
178            */
179            @Deprecated
180            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getCompanyVocabularies(
181                    long companyId) throws RemoteException {
182                    try {
183                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
184                                    AssetVocabularyServiceUtil.getCompanyVocabularies(companyId);
185    
186                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
187                    }
188                    catch (Exception e) {
189                            _log.error(e, e);
190    
191                            throw new RemoteException(e.getMessage());
192                    }
193            }
194    
195            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupsVocabularies(
196                    long[] groupIds) throws RemoteException {
197                    try {
198                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
199                                    AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds);
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, java.lang.String className) throws RemoteException {
212                    try {
213                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
214                                    AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds,
215                                            className);
216    
217                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
218                    }
219                    catch (Exception e) {
220                            _log.error(e, e);
221    
222                            throw new RemoteException(e.getMessage());
223                    }
224            }
225    
226            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupsVocabularies(
227                    long[] groupIds, java.lang.String className, long classTypePK)
228                    throws RemoteException {
229                    try {
230                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
231                                    AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds,
232                                            className, classTypePK);
233    
234                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
235                    }
236                    catch (Exception e) {
237                            _log.error(e, e);
238    
239                            throw new RemoteException(e.getMessage());
240                    }
241            }
242    
243            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
244                    long groupId) throws RemoteException {
245                    try {
246                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
247                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId);
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, boolean createDefaultVocabulary)
260                    throws RemoteException {
261                    try {
262                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
263                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId,
264                                            createDefaultVocabulary);
265    
266                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
267                    }
268                    catch (Exception e) {
269                            _log.error(e, e);
270    
271                            throw new RemoteException(e.getMessage());
272                    }
273            }
274    
275            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
276                    long groupId, boolean createDefaultVocabulary, int start, int end,
277                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
278                    throws RemoteException {
279                    try {
280                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
281                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId,
282                                            createDefaultVocabulary, start, end, obc);
283    
284                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
285                    }
286                    catch (Exception e) {
287                            _log.error(e, e);
288    
289                            throw new RemoteException(e.getMessage());
290                    }
291            }
292    
293            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
294                    long groupId, int start, int end,
295                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
296                    throws RemoteException {
297                    try {
298                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
299                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId, start,
300                                            end, obc);
301    
302                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
303                    }
304                    catch (Exception e) {
305                            _log.error(e, e);
306    
307                            throw new RemoteException(e.getMessage());
308                    }
309            }
310    
311            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
312                    long groupId, java.lang.String name, int start, int end,
313                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
314                    throws RemoteException {
315                    try {
316                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
317                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId, name,
318                                            start, end, obc);
319    
320                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
321                    }
322                    catch (Exception e) {
323                            _log.error(e, e);
324    
325                            throw new RemoteException(e.getMessage());
326                    }
327            }
328    
329            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
330                    long[] groupIds) throws RemoteException {
331                    try {
332                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
333                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupIds);
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 int getGroupVocabulariesCount(long groupId)
345                    throws RemoteException {
346                    try {
347                            int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupId);
348    
349                            return returnValue;
350                    }
351                    catch (Exception e) {
352                            _log.error(e, e);
353    
354                            throw new RemoteException(e.getMessage());
355                    }
356            }
357    
358            public static int getGroupVocabulariesCount(long groupId,
359                    java.lang.String name) throws RemoteException {
360                    try {
361                            int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupId,
362                                            name);
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[] groupIds)
374                    throws RemoteException {
375                    try {
376                            int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupIds);
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 com.liferay.portlet.asset.model.AssetVocabularyDisplay getGroupVocabulariesDisplay(
388                    long groupId, java.lang.String name, int start, int end,
389                    boolean addDefaultVocabulary,
390                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
391                    throws RemoteException {
392                    try {
393                            com.liferay.portlet.asset.model.AssetVocabularyDisplay returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesDisplay(groupId,
394                                            name, start, end, addDefaultVocabulary, obc);
395    
396                            return returnValue;
397                    }
398                    catch (Exception e) {
399                            _log.error(e, e);
400    
401                            throw new RemoteException(e.getMessage());
402                    }
403            }
404    
405            public static com.liferay.portlet.asset.model.AssetVocabularyDisplay getGroupVocabulariesDisplay(
406                    long groupId, java.lang.String name, int start, int end,
407                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
408                    throws RemoteException {
409                    try {
410                            com.liferay.portlet.asset.model.AssetVocabularyDisplay returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesDisplay(groupId,
411                                            name, start, end, obc);
412    
413                            return returnValue;
414                    }
415                    catch (Exception e) {
416                            _log.error(e, e);
417    
418                            throw new RemoteException(e.getMessage());
419                    }
420            }
421    
422            /**
423            * @deprecated As of 6.2.0, with no direct replacement
424            */
425            @Deprecated
426            public static java.lang.String getJSONGroupVocabularies(long groupId,
427                    java.lang.String name, int start, int end,
428                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
429                    throws RemoteException {
430                    try {
431                            com.liferay.portal.kernel.json.JSONObject returnValue = AssetVocabularyServiceUtil.getJSONGroupVocabularies(groupId,
432                                            name, start, end, obc);
433    
434                            return returnValue.toString();
435                    }
436                    catch (Exception e) {
437                            _log.error(e, e);
438    
439                            throw new RemoteException(e.getMessage());
440                    }
441            }
442    
443            /**
444            * @deprecated As of 7.0.0, replaced by {@link
445            AssetUtil#filterVocabularyIds(PermissionChecker, long[])}
446            */
447            @Deprecated
448            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getVocabularies(
449                    long[] vocabularyIds) throws RemoteException {
450                    try {
451                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
452                                    AssetVocabularyServiceUtil.getVocabularies(vocabularyIds);
453    
454                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
455                    }
456                    catch (Exception e) {
457                            _log.error(e, e);
458    
459                            throw new RemoteException(e.getMessage());
460                    }
461            }
462    
463            public static com.liferay.portlet.asset.model.AssetVocabularySoap getVocabulary(
464                    long vocabularyId) throws RemoteException {
465                    try {
466                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.getVocabulary(vocabularyId);
467    
468                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
469                    }
470                    catch (Exception e) {
471                            _log.error(e, e);
472    
473                            throw new RemoteException(e.getMessage());
474                    }
475            }
476    
477            public static com.liferay.portlet.asset.model.AssetVocabularyDisplay searchVocabulariesDisplay(
478                    long groupId, java.lang.String title, boolean addDefaultVocabulary,
479                    int start, int end) throws RemoteException {
480                    try {
481                            com.liferay.portlet.asset.model.AssetVocabularyDisplay returnValue = AssetVocabularyServiceUtil.searchVocabulariesDisplay(groupId,
482                                            title, addDefaultVocabulary, start, end);
483    
484                            return returnValue;
485                    }
486                    catch (Exception e) {
487                            _log.error(e, e);
488    
489                            throw new RemoteException(e.getMessage());
490                    }
491            }
492    
493            public static com.liferay.portlet.asset.model.AssetVocabularyDisplay searchVocabulariesDisplay(
494                    long groupId, java.lang.String title, boolean addDefaultVocabulary,
495                    int start, int end, com.liferay.portal.kernel.search.Sort sort)
496                    throws RemoteException {
497                    try {
498                            com.liferay.portlet.asset.model.AssetVocabularyDisplay returnValue = AssetVocabularyServiceUtil.searchVocabulariesDisplay(groupId,
499                                            title, addDefaultVocabulary, start, end, sort);
500    
501                            return returnValue;
502                    }
503                    catch (Exception e) {
504                            _log.error(e, e);
505    
506                            throw new RemoteException(e.getMessage());
507                    }
508            }
509    
510            public static com.liferay.portlet.asset.model.AssetVocabularySoap updateVocabulary(
511                    long vocabularyId, java.lang.String title,
512                    java.lang.String[] titleMapLanguageIds,
513                    java.lang.String[] titleMapValues,
514                    java.lang.String[] descriptionMapLanguageIds,
515                    java.lang.String[] descriptionMapValues, java.lang.String settings,
516                    com.liferay.portal.service.ServiceContext serviceContext)
517                    throws RemoteException {
518                    try {
519                            Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
520                                            titleMapValues);
521                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
522                                            descriptionMapValues);
523    
524                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.updateVocabulary(vocabularyId,
525                                            title, titleMap, descriptionMap, settings, serviceContext);
526    
527                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
528                    }
529                    catch (Exception e) {
530                            _log.error(e, e);
531    
532                            throw new RemoteException(e.getMessage());
533                    }
534            }
535    
536            private static Log _log = LogFactoryUtil.getLog(AssetVocabularyServiceSoap.class);
537    }