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 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                    long[] groupIds, java.lang.String name,
249                    java.lang.String[] tagProperties, int start, int end)
250                    throws RemoteException {
251                    try {
252                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
253                                    AssetTagServiceUtil.getTags(groupIds, name, tagProperties,
254                                            start, end);
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                    java.lang.String className, long classPK) throws RemoteException {
267                    try {
268                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
269                                    AssetTagServiceUtil.getTags(className, classPK);
270    
271                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
272                    }
273                    catch (Exception e) {
274                            _log.error(e, e);
275    
276                            throw new RemoteException(e.getMessage());
277                    }
278            }
279    
280            public static int getTagsCount(long groupId, long classNameId,
281                    java.lang.String name) throws RemoteException {
282                    try {
283                            int returnValue = AssetTagServiceUtil.getTagsCount(groupId,
284                                            classNameId, name);
285    
286                            return returnValue;
287                    }
288                    catch (Exception e) {
289                            _log.error(e, e);
290    
291                            throw new RemoteException(e.getMessage());
292                    }
293            }
294    
295            public static int getTagsCount(long groupId, java.lang.String name)
296                    throws RemoteException {
297                    try {
298                            int returnValue = AssetTagServiceUtil.getTagsCount(groupId, name);
299    
300                            return returnValue;
301                    }
302                    catch (Exception e) {
303                            _log.error(e, e);
304    
305                            throw new RemoteException(e.getMessage());
306                    }
307            }
308    
309            public static int getTagsCount(long groupId, java.lang.String name,
310                    java.lang.String[] tagProperties) throws RemoteException {
311                    try {
312                            int returnValue = AssetTagServiceUtil.getTagsCount(groupId, name,
313                                            tagProperties);
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 void mergeTags(long fromTagId, long toTagId,
325                    boolean overrideProperties) throws RemoteException {
326                    try {
327                            AssetTagServiceUtil.mergeTags(fromTagId, toTagId, overrideProperties);
328                    }
329                    catch (Exception e) {
330                            _log.error(e, e);
331    
332                            throw new RemoteException(e.getMessage());
333                    }
334            }
335    
336            public static void mergeTags(long[] fromTagIds, long toTagId,
337                    boolean overrideProperties) throws RemoteException {
338                    try {
339                            AssetTagServiceUtil.mergeTags(fromTagIds, toTagId,
340                                    overrideProperties);
341                    }
342                    catch (Exception e) {
343                            _log.error(e, e);
344    
345                            throw new RemoteException(e.getMessage());
346                    }
347            }
348    
349            public static java.lang.String search(long groupId, java.lang.String name,
350                    java.lang.String[] tagProperties, int start, int end)
351                    throws RemoteException {
352                    try {
353                            com.liferay.portal.kernel.json.JSONArray returnValue = AssetTagServiceUtil.search(groupId,
354                                            name, tagProperties, start, end);
355    
356                            return returnValue.toString();
357                    }
358                    catch (Exception e) {
359                            _log.error(e, e);
360    
361                            throw new RemoteException(e.getMessage());
362                    }
363            }
364    
365            public static java.lang.String search(long[] groupIds,
366                    java.lang.String name, java.lang.String[] tagProperties, int start,
367                    int end) throws RemoteException {
368                    try {
369                            com.liferay.portal.kernel.json.JSONArray returnValue = AssetTagServiceUtil.search(groupIds,
370                                            name, tagProperties, start, end);
371    
372                            return returnValue.toString();
373                    }
374                    catch (Exception e) {
375                            _log.error(e, e);
376    
377                            throw new RemoteException(e.getMessage());
378                    }
379            }
380    
381            public static com.liferay.portlet.asset.model.AssetTagSoap updateTag(
382                    long tagId, java.lang.String name, java.lang.String[] tagProperties,
383                    com.liferay.portal.service.ServiceContext serviceContext)
384                    throws RemoteException {
385                    try {
386                            com.liferay.portlet.asset.model.AssetTag returnValue = AssetTagServiceUtil.updateTag(tagId,
387                                            name, tagProperties, serviceContext);
388    
389                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModel(returnValue);
390                    }
391                    catch (Exception e) {
392                            _log.error(e, e);
393    
394                            throw new RemoteException(e.getMessage());
395                    }
396            }
397    
398            private static Log _log = LogFactoryUtil.getLog(AssetTagServiceSoap.class);
399    }