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    
020    import com.liferay.portlet.asset.service.AssetTagServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    /**
025     * <p>
026     * This class provides a SOAP utility for the
027     * {@link com.liferay.portlet.asset.service.AssetTagServiceUtil} service utility. The
028     * static methods of this class calls the same methods of the service utility.
029     * However, the signatures are different because it is difficult for SOAP to
030     * support certain types.
031     * </p>
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
052     * http://localhost:8080/api/secure/axis. Set the property
053     * <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
054     * security.
055     * </p>
056     *
057     * <p>
058     * The SOAP utility is only generated for remote services.
059     * </p>
060     *
061     * @author    Brian Wing Shun Chan
062     * @see       AssetTagServiceHttp
063     * @see       com.liferay.portlet.asset.model.AssetTagSoap
064     * @see       com.liferay.portlet.asset.service.AssetTagServiceUtil
065     * @generated
066     */
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 java.lang.String getJSONGroupTags(long groupId,
168                    java.lang.String name, int start, int end) throws RemoteException {
169                    try {
170                            com.liferay.portal.kernel.json.JSONObject returnValue = AssetTagServiceUtil.getJSONGroupTags(groupId,
171                                            name, start, end);
172    
173                            return returnValue.toString();
174                    }
175                    catch (Exception e) {
176                            _log.error(e, e);
177    
178                            throw new RemoteException(e.getMessage());
179                    }
180            }
181    
182            public static com.liferay.portlet.asset.model.AssetTagSoap getTag(
183                    long tagId) throws RemoteException {
184                    try {
185                            com.liferay.portlet.asset.model.AssetTag returnValue = AssetTagServiceUtil.getTag(tagId);
186    
187                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModel(returnValue);
188                    }
189                    catch (Exception e) {
190                            _log.error(e, e);
191    
192                            throw new RemoteException(e.getMessage());
193                    }
194            }
195    
196            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
197                    long groupId, long classNameId, java.lang.String name)
198                    throws RemoteException {
199                    try {
200                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
201                                    AssetTagServiceUtil.getTags(groupId, classNameId, name);
202    
203                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
204                    }
205                    catch (Exception e) {
206                            _log.error(e, e);
207    
208                            throw new RemoteException(e.getMessage());
209                    }
210            }
211    
212            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
213                    long groupId, long classNameId, java.lang.String name, int start,
214                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
215                    throws RemoteException {
216                    try {
217                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
218                                    AssetTagServiceUtil.getTags(groupId, classNameId, name, start,
219                                            end, obc);
220    
221                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
222                    }
223                    catch (Exception e) {
224                            _log.error(e, e);
225    
226                            throw new RemoteException(e.getMessage());
227                    }
228            }
229    
230            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
231                    long groupId, java.lang.String name, java.lang.String[] tagProperties,
232                    int start, int end) throws RemoteException {
233                    try {
234                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
235                                    AssetTagServiceUtil.getTags(groupId, name, tagProperties,
236                                            start, end);
237    
238                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
239                    }
240                    catch (Exception e) {
241                            _log.error(e, e);
242    
243                            throw new RemoteException(e.getMessage());
244                    }
245            }
246    
247            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
248                    java.lang.String className, long classPK) throws RemoteException {
249                    try {
250                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
251                                    AssetTagServiceUtil.getTags(className, classPK);
252    
253                            return com.liferay.portlet.asset.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 int getTagsCount(long groupId, long classNameId,
263                    java.lang.String name) throws RemoteException {
264                    try {
265                            int returnValue = AssetTagServiceUtil.getTagsCount(groupId,
266                                            classNameId, name);
267    
268                            return returnValue;
269                    }
270                    catch (Exception e) {
271                            _log.error(e, e);
272    
273                            throw new RemoteException(e.getMessage());
274                    }
275            }
276    
277            public static int getTagsCount(long groupId, java.lang.String name)
278                    throws RemoteException {
279                    try {
280                            int returnValue = AssetTagServiceUtil.getTagsCount(groupId, name);
281    
282                            return returnValue;
283                    }
284                    catch (Exception e) {
285                            _log.error(e, e);
286    
287                            throw new RemoteException(e.getMessage());
288                    }
289            }
290    
291            public static int getTagsCount(long groupId, java.lang.String name,
292                    java.lang.String[] tagProperties) throws RemoteException {
293                    try {
294                            int returnValue = AssetTagServiceUtil.getTagsCount(groupId, name,
295                                            tagProperties);
296    
297                            return returnValue;
298                    }
299                    catch (Exception e) {
300                            _log.error(e, e);
301    
302                            throw new RemoteException(e.getMessage());
303                    }
304            }
305    
306            public static void mergeTags(long fromTagId, long toTagId,
307                    boolean overrideProperties) throws RemoteException {
308                    try {
309                            AssetTagServiceUtil.mergeTags(fromTagId, toTagId, overrideProperties);
310                    }
311                    catch (Exception e) {
312                            _log.error(e, e);
313    
314                            throw new RemoteException(e.getMessage());
315                    }
316            }
317    
318            public static void mergeTags(long[] fromTagIds, long toTagId,
319                    boolean overrideProperties) throws RemoteException {
320                    try {
321                            AssetTagServiceUtil.mergeTags(fromTagIds, toTagId,
322                                    overrideProperties);
323                    }
324                    catch (Exception e) {
325                            _log.error(e, e);
326    
327                            throw new RemoteException(e.getMessage());
328                    }
329            }
330    
331            public static java.lang.String search(long groupId, java.lang.String name,
332                    java.lang.String[] tagProperties, int start, int end)
333                    throws RemoteException {
334                    try {
335                            com.liferay.portal.kernel.json.JSONArray returnValue = AssetTagServiceUtil.search(groupId,
336                                            name, tagProperties, start, end);
337    
338                            return returnValue.toString();
339                    }
340                    catch (Exception e) {
341                            _log.error(e, e);
342    
343                            throw new RemoteException(e.getMessage());
344                    }
345            }
346    
347            public static com.liferay.portlet.asset.model.AssetTagSoap updateTag(
348                    long tagId, java.lang.String name, java.lang.String[] tagProperties,
349                    com.liferay.portal.service.ServiceContext serviceContext)
350                    throws RemoteException {
351                    try {
352                            com.liferay.portlet.asset.model.AssetTag returnValue = AssetTagServiceUtil.updateTag(tagId,
353                                            name, tagProperties, serviceContext);
354    
355                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModel(returnValue);
356                    }
357                    catch (Exception e) {
358                            _log.error(e, e);
359    
360                            throw new RemoteException(e.getMessage());
361                    }
362            }
363    
364            private static Log _log = LogFactoryUtil.getLog(AssetTagServiceSoap.class);
365    }