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 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 AssetTagServiceUtil
064     * @generated
065     */
066    @ProviderType
067    public class AssetTagServiceSoap {
068            public static com.liferay.portlet.asset.model.AssetTagSoap addTag(
069                    long groupId, java.lang.String name,
070                    com.liferay.portal.service.ServiceContext serviceContext)
071                    throws RemoteException {
072                    try {
073                            com.liferay.portlet.asset.model.AssetTag returnValue = AssetTagServiceUtil.addTag(groupId,
074                                            name, 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            public static com.liferay.portlet.asset.model.AssetTagSoap getTag(
184                    long tagId) throws RemoteException {
185                    try {
186                            com.liferay.portlet.asset.model.AssetTag returnValue = AssetTagServiceUtil.getTag(tagId);
187    
188                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModel(returnValue);
189                    }
190                    catch (Exception e) {
191                            _log.error(e, e);
192    
193                            throw new RemoteException(e.getMessage());
194                    }
195            }
196    
197            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
198                    long groupId, long classNameId, java.lang.String name)
199                    throws RemoteException {
200                    try {
201                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
202                                    AssetTagServiceUtil.getTags(groupId, classNameId, name);
203    
204                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
205                    }
206                    catch (Exception e) {
207                            _log.error(e, e);
208    
209                            throw new RemoteException(e.getMessage());
210                    }
211            }
212    
213            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
214                    long groupId, long classNameId, java.lang.String name, int start,
215                    int end,
216                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetTag> obc)
217                    throws RemoteException {
218                    try {
219                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
220                                    AssetTagServiceUtil.getTags(groupId, classNameId, name, start,
221                                            end, obc);
222    
223                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
224                    }
225                    catch (Exception e) {
226                            _log.error(e, e);
227    
228                            throw new RemoteException(e.getMessage());
229                    }
230            }
231    
232            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
233                    long groupId, java.lang.String name, int start, int end)
234                    throws RemoteException {
235                    try {
236                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
237                                    AssetTagServiceUtil.getTags(groupId, name, start, end);
238    
239                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
240                    }
241                    catch (Exception e) {
242                            _log.error(e, e);
243    
244                            throw new RemoteException(e.getMessage());
245                    }
246            }
247    
248            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
249                    long groupId, java.lang.String name, int start, int end,
250                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetTag> obc)
251                    throws RemoteException {
252                    try {
253                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
254                                    AssetTagServiceUtil.getTags(groupId, name, start, end, obc);
255    
256                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
257                    }
258                    catch (Exception e) {
259                            _log.error(e, e);
260    
261                            throw new RemoteException(e.getMessage());
262                    }
263            }
264    
265            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
266                    long[] groupIds, java.lang.String name, int start, int end)
267                    throws RemoteException {
268                    try {
269                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
270                                    AssetTagServiceUtil.getTags(groupIds, name, start, end);
271    
272                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
273                    }
274                    catch (Exception e) {
275                            _log.error(e, e);
276    
277                            throw new RemoteException(e.getMessage());
278                    }
279            }
280    
281            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
282                    long[] groupIds, java.lang.String name, int start, int end,
283                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetTag> obc)
284                    throws RemoteException {
285                    try {
286                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
287                                    AssetTagServiceUtil.getTags(groupIds, name, start, end, obc);
288    
289                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
290                    }
291                    catch (Exception e) {
292                            _log.error(e, e);
293    
294                            throw new RemoteException(e.getMessage());
295                    }
296            }
297    
298            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
299                    java.lang.String className, long classPK) throws RemoteException {
300                    try {
301                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
302                                    AssetTagServiceUtil.getTags(className, classPK);
303    
304                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
305                    }
306                    catch (Exception e) {
307                            _log.error(e, e);
308    
309                            throw new RemoteException(e.getMessage());
310                    }
311            }
312    
313            public static int getTagsCount(long groupId, java.lang.String name)
314                    throws RemoteException {
315                    try {
316                            int returnValue = AssetTagServiceUtil.getTagsCount(groupId, name);
317    
318                            return returnValue;
319                    }
320                    catch (Exception e) {
321                            _log.error(e, e);
322    
323                            throw new RemoteException(e.getMessage());
324                    }
325            }
326    
327            public static int getVisibleAssetsTagsCount(long groupId, long classNameId,
328                    java.lang.String name) throws RemoteException {
329                    try {
330                            int returnValue = AssetTagServiceUtil.getVisibleAssetsTagsCount(groupId,
331                                            classNameId, name);
332    
333                            return returnValue;
334                    }
335                    catch (Exception e) {
336                            _log.error(e, e);
337    
338                            throw new RemoteException(e.getMessage());
339                    }
340            }
341    
342            public static int getVisibleAssetsTagsCount(long groupId,
343                    java.lang.String name) throws RemoteException {
344                    try {
345                            int returnValue = AssetTagServiceUtil.getVisibleAssetsTagsCount(groupId,
346                                            name);
347    
348                            return returnValue;
349                    }
350                    catch (Exception e) {
351                            _log.error(e, e);
352    
353                            throw new RemoteException(e.getMessage());
354                    }
355            }
356    
357            public static void mergeTags(long fromTagId, long toTagId)
358                    throws RemoteException {
359                    try {
360                            AssetTagServiceUtil.mergeTags(fromTagId, toTagId);
361                    }
362                    catch (Exception e) {
363                            _log.error(e, e);
364    
365                            throw new RemoteException(e.getMessage());
366                    }
367            }
368    
369            public static void mergeTags(long[] fromTagIds, long toTagId)
370                    throws RemoteException {
371                    try {
372                            AssetTagServiceUtil.mergeTags(fromTagIds, toTagId);
373                    }
374                    catch (Exception e) {
375                            _log.error(e, e);
376    
377                            throw new RemoteException(e.getMessage());
378                    }
379            }
380    
381            public static java.lang.String search(long groupId, java.lang.String name,
382                    int start, int end) throws RemoteException {
383                    try {
384                            com.liferay.portal.kernel.json.JSONArray returnValue = AssetTagServiceUtil.search(groupId,
385                                            name, start, end);
386    
387                            return returnValue.toString();
388                    }
389                    catch (Exception e) {
390                            _log.error(e, e);
391    
392                            throw new RemoteException(e.getMessage());
393                    }
394            }
395    
396            public static java.lang.String search(long[] groupIds,
397                    java.lang.String name, int start, int end) throws RemoteException {
398                    try {
399                            com.liferay.portal.kernel.json.JSONArray returnValue = AssetTagServiceUtil.search(groupIds,
400                                            name, start, end);
401    
402                            return returnValue.toString();
403                    }
404                    catch (Exception e) {
405                            _log.error(e, e);
406    
407                            throw new RemoteException(e.getMessage());
408                    }
409            }
410    
411            public static com.liferay.portlet.asset.model.AssetTagSoap updateTag(
412                    long tagId, java.lang.String name,
413                    com.liferay.portal.service.ServiceContext serviceContext)
414                    throws RemoteException {
415                    try {
416                            com.liferay.portlet.asset.model.AssetTag returnValue = AssetTagServiceUtil.updateTag(tagId,
417                                            name, serviceContext);
418    
419                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModel(returnValue);
420                    }
421                    catch (Exception e) {
422                            _log.error(e, e);
423    
424                            throw new RemoteException(e.getMessage());
425                    }
426            }
427    
428            private static Log _log = LogFactoryUtil.getLog(AssetTagServiceSoap.class);
429    }