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    
022    import com.liferay.portlet.asset.service.AssetTagServiceUtil;
023    
024    import java.rmi.RemoteException;
025    
026    /**
027     * Provides the SOAP utility for the
028     * {@link com.liferay.portlet.asset.service.AssetTagServiceUtil} service utility. The
029     * static methods of this class calls the same methods of the service utility.
030     * However, the signatures are different because it is difficult for SOAP to
031     * support certain types.
032     *
033     * <p>
034     * ServiceBuilder follows certain rules in translating the methods. For example,
035     * if the method in the service utility returns a {@link java.util.List}, that
036     * is translated to an array of {@link com.liferay.portlet.asset.model.AssetTagSoap}.
037     * If the method in the service utility returns a
038     * {@link com.liferay.portlet.asset.model.AssetTag}, that is translated to a
039     * {@link com.liferay.portlet.asset.model.AssetTagSoap}. Methods that SOAP cannot
040     * safely wire are skipped.
041     * </p>
042     *
043     * <p>
044     * The benefits of using the SOAP utility is that it is cross platform
045     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
046     * even Perl, to call the generated services. One drawback of SOAP is that it is
047     * slow because it needs to serialize all calls into a text format (XML).
048     * </p>
049     *
050     * <p>
051     * You can see a list of services at http://localhost:8080/api/axis. Set the
052     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
053     * security.
054     * </p>
055     *
056     * <p>
057     * The SOAP utility is only generated for remote services.
058     * </p>
059     *
060     * @author Brian Wing Shun Chan
061     * @see AssetTagServiceHttp
062     * @see com.liferay.portlet.asset.model.AssetTagSoap
063     * @see com.liferay.portlet.asset.service.AssetTagServiceUtil
064     * @generated
065     */
066    @ProviderType
067    public class AssetTagServiceSoap {
068            public static com.liferay.portlet.asset.model.AssetTagSoap addTag(
069                    java.lang.String name, java.lang.String[] tagProperties,
070                    com.liferay.portal.service.ServiceContext serviceContext)
071                    throws RemoteException {
072                    try {
073                            com.liferay.portlet.asset.model.AssetTag returnValue = AssetTagServiceUtil.addTag(name,
074                                            tagProperties, serviceContext);
075    
076                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModel(returnValue);
077                    }
078                    catch (Exception e) {
079                            _log.error(e, e);
080    
081                            throw new RemoteException(e.getMessage());
082                    }
083            }
084    
085            public static void deleteTag(long tagId) throws RemoteException {
086                    try {
087                            AssetTagServiceUtil.deleteTag(tagId);
088                    }
089                    catch (Exception e) {
090                            _log.error(e, e);
091    
092                            throw new RemoteException(e.getMessage());
093                    }
094            }
095    
096            public static void deleteTags(long[] tagIds) throws RemoteException {
097                    try {
098                            AssetTagServiceUtil.deleteTags(tagIds);
099                    }
100                    catch (Exception e) {
101                            _log.error(e, e);
102    
103                            throw new RemoteException(e.getMessage());
104                    }
105            }
106    
107            public static com.liferay.portlet.asset.model.AssetTagSoap[] getGroupsTags(
108                    long[] groupIds) throws RemoteException {
109                    try {
110                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
111                                    AssetTagServiceUtil.getGroupsTags(groupIds);
112    
113                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
114                    }
115                    catch (Exception e) {
116                            _log.error(e, e);
117    
118                            throw new RemoteException(e.getMessage());
119                    }
120            }
121    
122            public static com.liferay.portlet.asset.model.AssetTagSoap[] getGroupTags(
123                    long groupId) throws RemoteException {
124                    try {
125                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
126                                    AssetTagServiceUtil.getGroupTags(groupId);
127    
128                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
129                    }
130                    catch (Exception e) {
131                            _log.error(e, e);
132    
133                            throw new RemoteException(e.getMessage());
134                    }
135            }
136    
137            public static com.liferay.portlet.asset.model.AssetTagSoap[] getGroupTags(
138                    long groupId, int start, int end,
139                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetTag> obc)
140                    throws RemoteException {
141                    try {
142                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
143                                    AssetTagServiceUtil.getGroupTags(groupId, start, end, obc);
144    
145                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
146                    }
147                    catch (Exception e) {
148                            _log.error(e, e);
149    
150                            throw new RemoteException(e.getMessage());
151                    }
152            }
153    
154            public static int getGroupTagsCount(long groupId) throws RemoteException {
155                    try {
156                            int returnValue = AssetTagServiceUtil.getGroupTagsCount(groupId);
157    
158                            return returnValue;
159                    }
160                    catch (Exception e) {
161                            _log.error(e, e);
162    
163                            throw new RemoteException(e.getMessage());
164                    }
165            }
166    
167            public static com.liferay.portlet.asset.model.AssetTagDisplay getGroupTagsDisplay(
168                    long groupId, java.lang.String name, int start, int end)
169                    throws RemoteException {
170                    try {
171                            com.liferay.portlet.asset.model.AssetTagDisplay returnValue = AssetTagServiceUtil.getGroupTagsDisplay(groupId,
172                                            name, start, end);
173    
174                            return returnValue;
175                    }
176                    catch (Exception e) {
177                            _log.error(e, e);
178    
179                            throw new RemoteException(e.getMessage());
180                    }
181            }
182    
183            /**
184            * @deprecated As of 6.2.0, replaced by {@link #getGroupTagsDisplay(long,
185            String, int, int)}
186            */
187            @Deprecated
188            public static java.lang.String getJSONGroupTags(long groupId,
189                    java.lang.String name, int start, int end) throws RemoteException {
190                    try {
191                            com.liferay.portal.kernel.json.JSONObject returnValue = AssetTagServiceUtil.getJSONGroupTags(groupId,
192                                            name, start, end);
193    
194                            return returnValue.toString();
195                    }
196                    catch (Exception e) {
197                            _log.error(e, e);
198    
199                            throw new RemoteException(e.getMessage());
200                    }
201            }
202    
203            public static com.liferay.portlet.asset.model.AssetTagSoap getTag(
204                    long tagId) throws RemoteException {
205                    try {
206                            com.liferay.portlet.asset.model.AssetTag returnValue = AssetTagServiceUtil.getTag(tagId);
207    
208                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModel(returnValue);
209                    }
210                    catch (Exception e) {
211                            _log.error(e, e);
212    
213                            throw new RemoteException(e.getMessage());
214                    }
215            }
216    
217            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
218                    long groupId, long classNameId, java.lang.String name)
219                    throws RemoteException {
220                    try {
221                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
222                                    AssetTagServiceUtil.getTags(groupId, classNameId, name);
223    
224                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
225                    }
226                    catch (Exception e) {
227                            _log.error(e, e);
228    
229                            throw new RemoteException(e.getMessage());
230                    }
231            }
232    
233            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
234                    long groupId, long classNameId, java.lang.String name, int start,
235                    int end,
236                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetTag> obc)
237                    throws RemoteException {
238                    try {
239                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
240                                    AssetTagServiceUtil.getTags(groupId, classNameId, name, start,
241                                            end, obc);
242    
243                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
244                    }
245                    catch (Exception e) {
246                            _log.error(e, e);
247    
248                            throw new RemoteException(e.getMessage());
249                    }
250            }
251    
252            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
253                    long groupId, java.lang.String name, java.lang.String[] tagProperties,
254                    int start, int end) throws RemoteException {
255                    try {
256                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
257                                    AssetTagServiceUtil.getTags(groupId, name, tagProperties,
258                                            start, end);
259    
260                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
261                    }
262                    catch (Exception e) {
263                            _log.error(e, e);
264    
265                            throw new RemoteException(e.getMessage());
266                    }
267            }
268    
269            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
270                    long[] groupIds, java.lang.String name,
271                    java.lang.String[] tagProperties, int start, int end)
272                    throws RemoteException {
273                    try {
274                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
275                                    AssetTagServiceUtil.getTags(groupIds, name, tagProperties,
276                                            start, end);
277    
278                            return com.liferay.portlet.asset.model.AssetTagSoap.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.AssetTagSoap[] getTags(
288                    java.lang.String className, long classPK) throws RemoteException {
289                    try {
290                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
291                                    AssetTagServiceUtil.getTags(className, classPK);
292    
293                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
294                    }
295                    catch (Exception e) {
296                            _log.error(e, e);
297    
298                            throw new RemoteException(e.getMessage());
299                    }
300            }
301    
302            public static int getTagsCount(long groupId, long classNameId,
303                    java.lang.String name) throws RemoteException {
304                    try {
305                            int returnValue = AssetTagServiceUtil.getTagsCount(groupId,
306                                            classNameId, name);
307    
308                            return returnValue;
309                    }
310                    catch (Exception e) {
311                            _log.error(e, e);
312    
313                            throw new RemoteException(e.getMessage());
314                    }
315            }
316    
317            public static int getTagsCount(long groupId, java.lang.String name)
318                    throws RemoteException {
319                    try {
320                            int returnValue = AssetTagServiceUtil.getTagsCount(groupId, name);
321    
322                            return returnValue;
323                    }
324                    catch (Exception e) {
325                            _log.error(e, e);
326    
327                            throw new RemoteException(e.getMessage());
328                    }
329            }
330    
331            public static int getTagsCount(long groupId, java.lang.String name,
332                    java.lang.String[] tagProperties) throws RemoteException {
333                    try {
334                            int returnValue = AssetTagServiceUtil.getTagsCount(groupId, name,
335                                            tagProperties);
336    
337                            return returnValue;
338                    }
339                    catch (Exception e) {
340                            _log.error(e, e);
341    
342                            throw new RemoteException(e.getMessage());
343                    }
344            }
345    
346            public static void mergeTags(long fromTagId, long toTagId,
347                    boolean overrideProperties) throws RemoteException {
348                    try {
349                            AssetTagServiceUtil.mergeTags(fromTagId, toTagId, overrideProperties);
350                    }
351                    catch (Exception e) {
352                            _log.error(e, e);
353    
354                            throw new RemoteException(e.getMessage());
355                    }
356            }
357    
358            public static void mergeTags(long[] fromTagIds, long toTagId,
359                    boolean overrideProperties) throws RemoteException {
360                    try {
361                            AssetTagServiceUtil.mergeTags(fromTagIds, toTagId,
362                                    overrideProperties);
363                    }
364                    catch (Exception e) {
365                            _log.error(e, e);
366    
367                            throw new RemoteException(e.getMessage());
368                    }
369            }
370    
371            public static java.lang.String search(long groupId, java.lang.String name,
372                    java.lang.String[] tagProperties, int start, int end)
373                    throws RemoteException {
374                    try {
375                            com.liferay.portal.kernel.json.JSONArray returnValue = AssetTagServiceUtil.search(groupId,
376                                            name, tagProperties, start, end);
377    
378                            return returnValue.toString();
379                    }
380                    catch (Exception e) {
381                            _log.error(e, e);
382    
383                            throw new RemoteException(e.getMessage());
384                    }
385            }
386    
387            public static java.lang.String search(long[] groupIds,
388                    java.lang.String name, java.lang.String[] tagProperties, int start,
389                    int end) throws RemoteException {
390                    try {
391                            com.liferay.portal.kernel.json.JSONArray returnValue = AssetTagServiceUtil.search(groupIds,
392                                            name, tagProperties, start, end);
393    
394                            return returnValue.toString();
395                    }
396                    catch (Exception e) {
397                            _log.error(e, e);
398    
399                            throw new RemoteException(e.getMessage());
400                    }
401            }
402    
403            public static com.liferay.portlet.asset.model.AssetTagSoap updateTag(
404                    long tagId, java.lang.String name, java.lang.String[] tagProperties,
405                    com.liferay.portal.service.ServiceContext serviceContext)
406                    throws RemoteException {
407                    try {
408                            com.liferay.portlet.asset.model.AssetTag returnValue = AssetTagServiceUtil.updateTag(tagId,
409                                            name, tagProperties, serviceContext);
410    
411                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModel(returnValue);
412                    }
413                    catch (Exception e) {
414                            _log.error(e, e);
415    
416                            throw new RemoteException(e.getMessage());
417                    }
418            }
419    
420            private static Log _log = LogFactoryUtil.getLog(AssetTagServiceSoap.class);
421    }