001    /**
002     * Copyright (c) 2000-2012 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 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.AssetVocabularyServiceUtil;
022    
023    import java.rmi.RemoteException;
024    
025    import java.util.Locale;
026    import java.util.Map;
027    
028    /**
029     * <p>
030     * This class provides a SOAP utility for the
031     * {@link com.liferay.portlet.asset.service.AssetVocabularyServiceUtil} service utility. The
032     * static methods of this class calls the same methods of the service utility.
033     * However, the signatures are different because it is difficult for SOAP to
034     * support certain types.
035     * </p>
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    public class AssetVocabularyServiceSoap {
071            /**
072            * @deprecated
073            */
074            public static com.liferay.portlet.asset.model.AssetVocabularySoap addVocabulary(
075                    java.lang.String[] titleMapLanguageIds,
076                    java.lang.String[] titleMapValues,
077                    java.lang.String[] descriptionMapLanguageIds,
078                    java.lang.String[] descriptionMapValues, java.lang.String settings,
079                    com.liferay.portal.service.ServiceContext serviceContext)
080                    throws RemoteException {
081                    try {
082                            Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
083                                            titleMapValues);
084                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
085                                            descriptionMapValues);
086    
087                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.addVocabulary(titleMap,
088                                            descriptionMap, settings, serviceContext);
089    
090                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
091                    }
092                    catch (Exception e) {
093                            _log.error(e, e);
094    
095                            throw new RemoteException(e.getMessage());
096                    }
097            }
098    
099            public static com.liferay.portlet.asset.model.AssetVocabularySoap addVocabulary(
100                    java.lang.String title, java.lang.String[] titleMapLanguageIds,
101                    java.lang.String[] titleMapValues,
102                    java.lang.String[] descriptionMapLanguageIds,
103                    java.lang.String[] descriptionMapValues, java.lang.String settings,
104                    com.liferay.portal.service.ServiceContext serviceContext)
105                    throws RemoteException {
106                    try {
107                            Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
108                                            titleMapValues);
109                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
110                                            descriptionMapValues);
111    
112                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.addVocabulary(title,
113                                            titleMap, descriptionMap, settings, serviceContext);
114    
115                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
116                    }
117                    catch (Exception e) {
118                            _log.error(e, e);
119    
120                            throw new RemoteException(e.getMessage());
121                    }
122            }
123    
124            public static com.liferay.portlet.asset.model.AssetVocabularySoap addVocabulary(
125                    java.lang.String title,
126                    com.liferay.portal.service.ServiceContext serviceContext)
127                    throws RemoteException {
128                    try {
129                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.addVocabulary(title,
130                                            serviceContext);
131    
132                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
133                    }
134                    catch (Exception e) {
135                            _log.error(e, e);
136    
137                            throw new RemoteException(e.getMessage());
138                    }
139            }
140    
141            public static void deleteVocabularies(long[] vocabularyIds)
142                    throws RemoteException {
143                    try {
144                            AssetVocabularyServiceUtil.deleteVocabularies(vocabularyIds);
145                    }
146                    catch (Exception e) {
147                            _log.error(e, e);
148    
149                            throw new RemoteException(e.getMessage());
150                    }
151            }
152    
153            public static void deleteVocabulary(long vocabularyId)
154                    throws RemoteException {
155                    try {
156                            AssetVocabularyServiceUtil.deleteVocabulary(vocabularyId);
157                    }
158                    catch (Exception e) {
159                            _log.error(e, e);
160    
161                            throw new RemoteException(e.getMessage());
162                    }
163            }
164    
165            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getCompanyVocabularies(
166                    long companyId) throws RemoteException {
167                    try {
168                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
169                                    AssetVocabularyServiceUtil.getCompanyVocabularies(companyId);
170    
171                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
172                    }
173                    catch (Exception e) {
174                            _log.error(e, e);
175    
176                            throw new RemoteException(e.getMessage());
177                    }
178            }
179    
180            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupsVocabularies(
181                    long[] groupIds) throws RemoteException {
182                    try {
183                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
184                                    AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds);
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, java.lang.String className) throws RemoteException {
197                    try {
198                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
199                                    AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds,
200                                            className);
201    
202                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
203                    }
204                    catch (Exception e) {
205                            _log.error(e, e);
206    
207                            throw new RemoteException(e.getMessage());
208                    }
209            }
210    
211            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
212                    long groupId) throws RemoteException {
213                    try {
214                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
215                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId);
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[] getGroupVocabularies(
227                    long groupId, boolean createDefaultVocabulary)
228                    throws RemoteException {
229                    try {
230                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
231                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId,
232                                            createDefaultVocabulary);
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, int start, int end,
245                    com.liferay.portal.kernel.util.OrderByComparator obc)
246                    throws RemoteException {
247                    try {
248                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
249                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId, start,
250                                            end, obc);
251    
252                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
253                    }
254                    catch (Exception e) {
255                            _log.error(e, e);
256    
257                            throw new RemoteException(e.getMessage());
258                    }
259            }
260    
261            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
262                    long groupId, java.lang.String name, int start, int end,
263                    com.liferay.portal.kernel.util.OrderByComparator obc)
264                    throws RemoteException {
265                    try {
266                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
267                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId, name,
268                                            start, end, obc);
269    
270                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
271                    }
272                    catch (Exception e) {
273                            _log.error(e, e);
274    
275                            throw new RemoteException(e.getMessage());
276                    }
277            }
278    
279            public static int getGroupVocabulariesCount(long groupId)
280                    throws RemoteException {
281                    try {
282                            int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupId);
283    
284                            return returnValue;
285                    }
286                    catch (Exception e) {
287                            _log.error(e, e);
288    
289                            throw new RemoteException(e.getMessage());
290                    }
291            }
292    
293            public static int getGroupVocabulariesCount(long groupId,
294                    java.lang.String name) throws RemoteException {
295                    try {
296                            int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupId,
297                                            name);
298    
299                            return returnValue;
300                    }
301                    catch (Exception e) {
302                            _log.error(e, e);
303    
304                            throw new RemoteException(e.getMessage());
305                    }
306            }
307    
308            public static java.lang.String getJSONGroupVocabularies(long groupId,
309                    java.lang.String name, int start, int end,
310                    com.liferay.portal.kernel.util.OrderByComparator obc)
311                    throws RemoteException {
312                    try {
313                            com.liferay.portal.kernel.json.JSONObject returnValue = AssetVocabularyServiceUtil.getJSONGroupVocabularies(groupId,
314                                            name, start, end, obc);
315    
316                            return returnValue.toString();
317                    }
318                    catch (Exception e) {
319                            _log.error(e, e);
320    
321                            throw new RemoteException(e.getMessage());
322                    }
323            }
324    
325            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getVocabularies(
326                    long[] vocabularyIds) throws RemoteException {
327                    try {
328                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
329                                    AssetVocabularyServiceUtil.getVocabularies(vocabularyIds);
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 getVocabulary(
341                    long vocabularyId) throws RemoteException {
342                    try {
343                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.getVocabulary(vocabularyId);
344    
345                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
346                    }
347                    catch (Exception e) {
348                            _log.error(e, e);
349    
350                            throw new RemoteException(e.getMessage());
351                    }
352            }
353    
354            /**
355            * @deprecated
356            */
357            public static com.liferay.portlet.asset.model.AssetVocabularySoap updateVocabulary(
358                    long vocabularyId, java.lang.String[] titleMapLanguageIds,
359                    java.lang.String[] titleMapValues,
360                    java.lang.String[] descriptionMapLanguageIds,
361                    java.lang.String[] descriptionMapValues, java.lang.String settings,
362                    com.liferay.portal.service.ServiceContext serviceContext)
363                    throws RemoteException {
364                    try {
365                            Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
366                                            titleMapValues);
367                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
368                                            descriptionMapValues);
369    
370                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.updateVocabulary(vocabularyId,
371                                            titleMap, descriptionMap, settings, serviceContext);
372    
373                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
374                    }
375                    catch (Exception e) {
376                            _log.error(e, e);
377    
378                            throw new RemoteException(e.getMessage());
379                    }
380            }
381    
382            public static com.liferay.portlet.asset.model.AssetVocabularySoap updateVocabulary(
383                    long vocabularyId, java.lang.String title,
384                    java.lang.String[] titleMapLanguageIds,
385                    java.lang.String[] titleMapValues,
386                    java.lang.String[] descriptionMapLanguageIds,
387                    java.lang.String[] descriptionMapValues, java.lang.String settings,
388                    com.liferay.portal.service.ServiceContext serviceContext)
389                    throws RemoteException {
390                    try {
391                            Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds,
392                                            titleMapValues);
393                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
394                                            descriptionMapValues);
395    
396                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.updateVocabulary(vocabularyId,
397                                            title, titleMap, descriptionMap, settings, serviceContext);
398    
399                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
400                    }
401                    catch (Exception e) {
402                            _log.error(e, e);
403    
404                            throw new RemoteException(e.getMessage());
405                    }
406            }
407    
408            private static Log _log = LogFactoryUtil.getLog(AssetVocabularyServiceSoap.class);
409    }