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.asset.kernel.service.AssetTagServiceUtil;
020    
021    import com.liferay.portal.kernel.log.Log;
022    import com.liferay.portal.kernel.log.LogFactoryUtil;
023    
024    import java.rmi.RemoteException;
025    
026    /**
027     * Provides the SOAP utility for the
028     * {@link 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.asset.kernel.model.AssetTagSoap}.
037     * If the method in the service utility returns a
038     * {@link com.liferay.asset.kernel.model.AssetTag}, that is translated to a
039     * {@link com.liferay.asset.kernel.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.asset.kernel.model.AssetTagSoap
063     * @see AssetTagServiceUtil
064     * @generated
065     */
066    @ProviderType
067    public class AssetTagServiceSoap {
068            public static com.liferay.asset.kernel.model.AssetTagSoap addTag(
069                    long groupId, java.lang.String name,
070                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
071                    throws RemoteException {
072                    try {
073                            com.liferay.asset.kernel.model.AssetTag returnValue = AssetTagServiceUtil.addTag(groupId,
074                                            name, serviceContext);
075    
076                            return com.liferay.asset.kernel.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.asset.kernel.model.AssetTagSoap[] getGroupsTags(
108                    long[] groupIds) throws RemoteException {
109                    try {
110                            java.util.List<com.liferay.asset.kernel.model.AssetTag> returnValue = AssetTagServiceUtil.getGroupsTags(groupIds);
111    
112                            return com.liferay.asset.kernel.model.AssetTagSoap.toSoapModels(returnValue);
113                    }
114                    catch (Exception e) {
115                            _log.error(e, e);
116    
117                            throw new RemoteException(e.getMessage());
118                    }
119            }
120    
121            public static com.liferay.asset.kernel.model.AssetTagSoap[] getGroupTags(
122                    long groupId) throws RemoteException {
123                    try {
124                            java.util.List<com.liferay.asset.kernel.model.AssetTag> returnValue = AssetTagServiceUtil.getGroupTags(groupId);
125    
126                            return com.liferay.asset.kernel.model.AssetTagSoap.toSoapModels(returnValue);
127                    }
128                    catch (Exception e) {
129                            _log.error(e, e);
130    
131                            throw new RemoteException(e.getMessage());
132                    }
133            }
134    
135            public static com.liferay.asset.kernel.model.AssetTagSoap[] getGroupTags(
136                    long groupId, int start, int end,
137                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetTag> obc)
138                    throws RemoteException {
139                    try {
140                            java.util.List<com.liferay.asset.kernel.model.AssetTag> returnValue = AssetTagServiceUtil.getGroupTags(groupId,
141                                            start, end, obc);
142    
143                            return com.liferay.asset.kernel.model.AssetTagSoap.toSoapModels(returnValue);
144                    }
145                    catch (Exception e) {
146                            _log.error(e, e);
147    
148                            throw new RemoteException(e.getMessage());
149                    }
150            }
151    
152            public static int getGroupTagsCount(long groupId) throws RemoteException {
153                    try {
154                            int returnValue = AssetTagServiceUtil.getGroupTagsCount(groupId);
155    
156                            return returnValue;
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.asset.kernel.model.AssetTagDisplay getGroupTagsDisplay(
166                    long groupId, java.lang.String name, int start, int end)
167                    throws RemoteException {
168                    try {
169                            com.liferay.asset.kernel.model.AssetTagDisplay returnValue = AssetTagServiceUtil.getGroupTagsDisplay(groupId,
170                                            name, start, end);
171    
172                            return returnValue;
173                    }
174                    catch (Exception e) {
175                            _log.error(e, e);
176    
177                            throw new RemoteException(e.getMessage());
178                    }
179            }
180    
181            public static com.liferay.asset.kernel.model.AssetTagSoap getTag(long tagId)
182                    throws RemoteException {
183                    try {
184                            com.liferay.asset.kernel.model.AssetTag returnValue = AssetTagServiceUtil.getTag(tagId);
185    
186                            return com.liferay.asset.kernel.model.AssetTagSoap.toSoapModel(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.asset.kernel.model.AssetTagSoap[] getTags(
196                    long groupId, long classNameId, java.lang.String name)
197                    throws RemoteException {
198                    try {
199                            java.util.List<com.liferay.asset.kernel.model.AssetTag> returnValue = AssetTagServiceUtil.getTags(groupId,
200                                            classNameId, name);
201    
202                            return com.liferay.asset.kernel.model.AssetTagSoap.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.asset.kernel.model.AssetTagSoap[] getTags(
212                    long groupId, long classNameId, java.lang.String name, int start,
213                    int end,
214                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetTag> obc)
215                    throws RemoteException {
216                    try {
217                            java.util.List<com.liferay.asset.kernel.model.AssetTag> returnValue = AssetTagServiceUtil.getTags(groupId,
218                                            classNameId, name, start, end, obc);
219    
220                            return com.liferay.asset.kernel.model.AssetTagSoap.toSoapModels(returnValue);
221                    }
222                    catch (Exception e) {
223                            _log.error(e, e);
224    
225                            throw new RemoteException(e.getMessage());
226                    }
227            }
228    
229            public static com.liferay.asset.kernel.model.AssetTagSoap[] getTags(
230                    long groupId, java.lang.String name, int start, int end)
231                    throws RemoteException {
232                    try {
233                            java.util.List<com.liferay.asset.kernel.model.AssetTag> returnValue = AssetTagServiceUtil.getTags(groupId,
234                                            name, start, end);
235    
236                            return com.liferay.asset.kernel.model.AssetTagSoap.toSoapModels(returnValue);
237                    }
238                    catch (Exception e) {
239                            _log.error(e, e);
240    
241                            throw new RemoteException(e.getMessage());
242                    }
243            }
244    
245            public static com.liferay.asset.kernel.model.AssetTagSoap[] getTags(
246                    long groupId, java.lang.String name, int start, int end,
247                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetTag> obc)
248                    throws RemoteException {
249                    try {
250                            java.util.List<com.liferay.asset.kernel.model.AssetTag> returnValue = AssetTagServiceUtil.getTags(groupId,
251                                            name, start, end, obc);
252    
253                            return com.liferay.asset.kernel.model.AssetTagSoap.toSoapModels(returnValue);
254                    }
255                    catch (Exception e) {
256                            _log.error(e, e);
257    
258                            throw new RemoteException(e.getMessage());
259                    }
260            }
261    
262            public static com.liferay.asset.kernel.model.AssetTagSoap[] getTags(
263                    long[] groupIds, java.lang.String name, int start, int end)
264                    throws RemoteException {
265                    try {
266                            java.util.List<com.liferay.asset.kernel.model.AssetTag> returnValue = AssetTagServiceUtil.getTags(groupIds,
267                                            name, start, end);
268    
269                            return com.liferay.asset.kernel.model.AssetTagSoap.toSoapModels(returnValue);
270                    }
271                    catch (Exception e) {
272                            _log.error(e, e);
273    
274                            throw new RemoteException(e.getMessage());
275                    }
276            }
277    
278            public static com.liferay.asset.kernel.model.AssetTagSoap[] getTags(
279                    long[] groupIds, java.lang.String name, int start, int end,
280                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetTag> obc)
281                    throws RemoteException {
282                    try {
283                            java.util.List<com.liferay.asset.kernel.model.AssetTag> returnValue = AssetTagServiceUtil.getTags(groupIds,
284                                            name, start, end, obc);
285    
286                            return com.liferay.asset.kernel.model.AssetTagSoap.toSoapModels(returnValue);
287                    }
288                    catch (Exception e) {
289                            _log.error(e, e);
290    
291                            throw new RemoteException(e.getMessage());
292                    }
293            }
294    
295            public static com.liferay.asset.kernel.model.AssetTagSoap[] getTags(
296                    java.lang.String className, long classPK) throws RemoteException {
297                    try {
298                            java.util.List<com.liferay.asset.kernel.model.AssetTag> returnValue = AssetTagServiceUtil.getTags(className,
299                                            classPK);
300    
301                            return com.liferay.asset.kernel.model.AssetTagSoap.toSoapModels(returnValue);
302                    }
303                    catch (Exception e) {
304                            _log.error(e, e);
305    
306                            throw new RemoteException(e.getMessage());
307                    }
308            }
309    
310            public static int getTagsCount(long groupId, java.lang.String name)
311                    throws RemoteException {
312                    try {
313                            int returnValue = AssetTagServiceUtil.getTagsCount(groupId, name);
314    
315                            return returnValue;
316                    }
317                    catch (Exception e) {
318                            _log.error(e, e);
319    
320                            throw new RemoteException(e.getMessage());
321                    }
322            }
323    
324            public static int getVisibleAssetsTagsCount(long groupId, long classNameId,
325                    java.lang.String name) throws RemoteException {
326                    try {
327                            int returnValue = AssetTagServiceUtil.getVisibleAssetsTagsCount(groupId,
328                                            classNameId, name);
329    
330                            return returnValue;
331                    }
332                    catch (Exception e) {
333                            _log.error(e, e);
334    
335                            throw new RemoteException(e.getMessage());
336                    }
337            }
338    
339            public static int getVisibleAssetsTagsCount(long groupId,
340                    java.lang.String name) throws RemoteException {
341                    try {
342                            int returnValue = AssetTagServiceUtil.getVisibleAssetsTagsCount(groupId,
343                                            name);
344    
345                            return returnValue;
346                    }
347                    catch (Exception e) {
348                            _log.error(e, e);
349    
350                            throw new RemoteException(e.getMessage());
351                    }
352            }
353    
354            public static void mergeTags(long fromTagId, long toTagId)
355                    throws RemoteException {
356                    try {
357                            AssetTagServiceUtil.mergeTags(fromTagId, toTagId);
358                    }
359                    catch (Exception e) {
360                            _log.error(e, e);
361    
362                            throw new RemoteException(e.getMessage());
363                    }
364            }
365    
366            public static void mergeTags(long[] fromTagIds, long toTagId)
367                    throws RemoteException {
368                    try {
369                            AssetTagServiceUtil.mergeTags(fromTagIds, toTagId);
370                    }
371                    catch (Exception e) {
372                            _log.error(e, e);
373    
374                            throw new RemoteException(e.getMessage());
375                    }
376            }
377    
378            public static java.lang.String search(long groupId, java.lang.String name,
379                    int start, int end) throws RemoteException {
380                    try {
381                            com.liferay.portal.kernel.json.JSONArray returnValue = AssetTagServiceUtil.search(groupId,
382                                            name, start, end);
383    
384                            return returnValue.toString();
385                    }
386                    catch (Exception e) {
387                            _log.error(e, e);
388    
389                            throw new RemoteException(e.getMessage());
390                    }
391            }
392    
393            public static java.lang.String search(long[] groupIds,
394                    java.lang.String name, int start, int end) throws RemoteException {
395                    try {
396                            com.liferay.portal.kernel.json.JSONArray returnValue = AssetTagServiceUtil.search(groupIds,
397                                            name, start, end);
398    
399                            return returnValue.toString();
400                    }
401                    catch (Exception e) {
402                            _log.error(e, e);
403    
404                            throw new RemoteException(e.getMessage());
405                    }
406            }
407    
408            public static com.liferay.asset.kernel.model.AssetTagSoap updateTag(
409                    long tagId, java.lang.String name,
410                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
411                    throws RemoteException {
412                    try {
413                            com.liferay.asset.kernel.model.AssetTag returnValue = AssetTagServiceUtil.updateTag(tagId,
414                                            name, serviceContext);
415    
416                            return com.liferay.asset.kernel.model.AssetTagSoap.toSoapModel(returnValue);
417                    }
418                    catch (Exception e) {
419                            _log.error(e, e);
420    
421                            throw new RemoteException(e.getMessage());
422                    }
423            }
424    
425            private static Log _log = LogFactoryUtil.getLog(AssetTagServiceSoap.class);
426    }