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