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 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    public class AssetTagServiceSoap {
067            public static com.liferay.portlet.asset.model.AssetTagSoap addTag(
068                    java.lang.String name, java.lang.String[] tagProperties,
069                    com.liferay.portal.service.ServiceContext serviceContext)
070                    throws RemoteException {
071                    try {
072                            com.liferay.portlet.asset.model.AssetTag returnValue = AssetTagServiceUtil.addTag(name,
073                                            tagProperties, serviceContext);
074    
075                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModel(returnValue);
076                    }
077                    catch (Exception e) {
078                            _log.error(e, e);
079    
080                            throw new RemoteException(e.getMessage());
081                    }
082            }
083    
084            public static void deleteTag(long tagId) throws RemoteException {
085                    try {
086                            AssetTagServiceUtil.deleteTag(tagId);
087                    }
088                    catch (Exception e) {
089                            _log.error(e, e);
090    
091                            throw new RemoteException(e.getMessage());
092                    }
093            }
094    
095            public static void deleteTags(long[] tagIds) throws RemoteException {
096                    try {
097                            AssetTagServiceUtil.deleteTags(tagIds);
098                    }
099                    catch (Exception e) {
100                            _log.error(e, e);
101    
102                            throw new RemoteException(e.getMessage());
103                    }
104            }
105    
106            public static com.liferay.portlet.asset.model.AssetTagSoap[] getGroupsTags(
107                    long[] groupIds) throws RemoteException {
108                    try {
109                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
110                                    AssetTagServiceUtil.getGroupsTags(groupIds);
111    
112                            return com.liferay.portlet.asset.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.portlet.asset.model.AssetTagSoap[] getGroupTags(
122                    long groupId) throws RemoteException {
123                    try {
124                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
125                                    AssetTagServiceUtil.getGroupTags(groupId);
126    
127                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
128                    }
129                    catch (Exception e) {
130                            _log.error(e, e);
131    
132                            throw new RemoteException(e.getMessage());
133                    }
134            }
135    
136            public static com.liferay.portlet.asset.model.AssetTagSoap[] getGroupTags(
137                    long groupId, int start, int end,
138                    com.liferay.portal.kernel.util.OrderByComparator obc)
139                    throws RemoteException {
140                    try {
141                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
142                                    AssetTagServiceUtil.getGroupTags(groupId, start, end, obc);
143    
144                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
145                    }
146                    catch (Exception e) {
147                            _log.error(e, e);
148    
149                            throw new RemoteException(e.getMessage());
150                    }
151            }
152    
153            public static int getGroupTagsCount(long groupId) throws RemoteException {
154                    try {
155                            int returnValue = AssetTagServiceUtil.getGroupTagsCount(groupId);
156    
157                            return returnValue;
158                    }
159                    catch (Exception e) {
160                            _log.error(e, e);
161    
162                            throw new RemoteException(e.getMessage());
163                    }
164            }
165    
166            public static com.liferay.portlet.asset.model.AssetTagDisplay getGroupTagsDisplay(
167                    long groupId, java.lang.String name, int start, int end)
168                    throws RemoteException {
169                    try {
170                            com.liferay.portlet.asset.model.AssetTagDisplay returnValue = AssetTagServiceUtil.getGroupTagsDisplay(groupId,
171                                            name, start, end);
172    
173                            return returnValue;
174                    }
175                    catch (Exception e) {
176                            _log.error(e, e);
177    
178                            throw new RemoteException(e.getMessage());
179                    }
180            }
181    
182            /**
183            * @deprecated As of 6.2.0, replaced by {@link #getGroupTagsDisplay(long,
184            String, int, int)}
185            */
186            public static java.lang.String getJSONGroupTags(long groupId,
187                    java.lang.String name, int start, int end) throws RemoteException {
188                    try {
189                            com.liferay.portal.kernel.json.JSONObject returnValue = AssetTagServiceUtil.getJSONGroupTags(groupId,
190                                            name, start, end);
191    
192                            return returnValue.toString();
193                    }
194                    catch (Exception e) {
195                            _log.error(e, e);
196    
197                            throw new RemoteException(e.getMessage());
198                    }
199            }
200    
201            public static com.liferay.portlet.asset.model.AssetTagSoap getTag(
202                    long tagId) throws RemoteException {
203                    try {
204                            com.liferay.portlet.asset.model.AssetTag returnValue = AssetTagServiceUtil.getTag(tagId);
205    
206                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModel(returnValue);
207                    }
208                    catch (Exception e) {
209                            _log.error(e, e);
210    
211                            throw new RemoteException(e.getMessage());
212                    }
213            }
214    
215            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
216                    long groupId, long classNameId, java.lang.String name)
217                    throws RemoteException {
218                    try {
219                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
220                                    AssetTagServiceUtil.getTags(groupId, classNameId, name);
221    
222                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
223                    }
224                    catch (Exception e) {
225                            _log.error(e, e);
226    
227                            throw new RemoteException(e.getMessage());
228                    }
229            }
230    
231            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
232                    long groupId, long classNameId, java.lang.String name, int start,
233                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
234                    throws RemoteException {
235                    try {
236                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
237                                    AssetTagServiceUtil.getTags(groupId, classNameId, name, start,
238                                            end, obc);
239    
240                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
241                    }
242                    catch (Exception e) {
243                            _log.error(e, e);
244    
245                            throw new RemoteException(e.getMessage());
246                    }
247            }
248    
249            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
250                    long groupId, java.lang.String name, java.lang.String[] tagProperties,
251                    int start, int end) throws RemoteException {
252                    try {
253                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
254                                    AssetTagServiceUtil.getTags(groupId, name, tagProperties,
255                                            start, end);
256    
257                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
258                    }
259                    catch (Exception e) {
260                            _log.error(e, e);
261    
262                            throw new RemoteException(e.getMessage());
263                    }
264            }
265    
266            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
267                    long[] groupIds, java.lang.String name,
268                    java.lang.String[] tagProperties, int start, int end)
269                    throws RemoteException {
270                    try {
271                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
272                                    AssetTagServiceUtil.getTags(groupIds, name, tagProperties,
273                                            start, end);
274    
275                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
276                    }
277                    catch (Exception e) {
278                            _log.error(e, e);
279    
280                            throw new RemoteException(e.getMessage());
281                    }
282            }
283    
284            public static com.liferay.portlet.asset.model.AssetTagSoap[] getTags(
285                    java.lang.String className, long classPK) throws RemoteException {
286                    try {
287                            java.util.List<com.liferay.portlet.asset.model.AssetTag> returnValue =
288                                    AssetTagServiceUtil.getTags(className, classPK);
289    
290                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModels(returnValue);
291                    }
292                    catch (Exception e) {
293                            _log.error(e, e);
294    
295                            throw new RemoteException(e.getMessage());
296                    }
297            }
298    
299            public static int getTagsCount(long groupId, long classNameId,
300                    java.lang.String name) throws RemoteException {
301                    try {
302                            int returnValue = AssetTagServiceUtil.getTagsCount(groupId,
303                                            classNameId, name);
304    
305                            return returnValue;
306                    }
307                    catch (Exception e) {
308                            _log.error(e, e);
309    
310                            throw new RemoteException(e.getMessage());
311                    }
312            }
313    
314            public static int getTagsCount(long groupId, java.lang.String name)
315                    throws RemoteException {
316                    try {
317                            int returnValue = AssetTagServiceUtil.getTagsCount(groupId, name);
318    
319                            return returnValue;
320                    }
321                    catch (Exception e) {
322                            _log.error(e, e);
323    
324                            throw new RemoteException(e.getMessage());
325                    }
326            }
327    
328            public static int getTagsCount(long groupId, java.lang.String name,
329                    java.lang.String[] tagProperties) throws RemoteException {
330                    try {
331                            int returnValue = AssetTagServiceUtil.getTagsCount(groupId, name,
332                                            tagProperties);
333    
334                            return returnValue;
335                    }
336                    catch (Exception e) {
337                            _log.error(e, e);
338    
339                            throw new RemoteException(e.getMessage());
340                    }
341            }
342    
343            public static void mergeTags(long fromTagId, long toTagId,
344                    boolean overrideProperties) throws RemoteException {
345                    try {
346                            AssetTagServiceUtil.mergeTags(fromTagId, toTagId, overrideProperties);
347                    }
348                    catch (Exception e) {
349                            _log.error(e, e);
350    
351                            throw new RemoteException(e.getMessage());
352                    }
353            }
354    
355            public static void mergeTags(long[] fromTagIds, long toTagId,
356                    boolean overrideProperties) throws RemoteException {
357                    try {
358                            AssetTagServiceUtil.mergeTags(fromTagIds, toTagId,
359                                    overrideProperties);
360                    }
361                    catch (Exception e) {
362                            _log.error(e, e);
363    
364                            throw new RemoteException(e.getMessage());
365                    }
366            }
367    
368            public static java.lang.String search(long groupId, java.lang.String name,
369                    java.lang.String[] tagProperties, int start, int end)
370                    throws RemoteException {
371                    try {
372                            com.liferay.portal.kernel.json.JSONArray returnValue = AssetTagServiceUtil.search(groupId,
373                                            name, tagProperties, start, end);
374    
375                            return returnValue.toString();
376                    }
377                    catch (Exception e) {
378                            _log.error(e, e);
379    
380                            throw new RemoteException(e.getMessage());
381                    }
382            }
383    
384            public static java.lang.String search(long[] groupIds,
385                    java.lang.String name, java.lang.String[] tagProperties, int start,
386                    int end) throws RemoteException {
387                    try {
388                            com.liferay.portal.kernel.json.JSONArray returnValue = AssetTagServiceUtil.search(groupIds,
389                                            name, tagProperties, start, end);
390    
391                            return returnValue.toString();
392                    }
393                    catch (Exception e) {
394                            _log.error(e, e);
395    
396                            throw new RemoteException(e.getMessage());
397                    }
398            }
399    
400            public static com.liferay.portlet.asset.model.AssetTagSoap updateTag(
401                    long tagId, java.lang.String name, java.lang.String[] tagProperties,
402                    com.liferay.portal.service.ServiceContext serviceContext)
403                    throws RemoteException {
404                    try {
405                            com.liferay.portlet.asset.model.AssetTag returnValue = AssetTagServiceUtil.updateTag(tagId,
406                                            name, tagProperties, serviceContext);
407    
408                            return com.liferay.portlet.asset.model.AssetTagSoap.toSoapModel(returnValue);
409                    }
410                    catch (Exception e) {
411                            _log.error(e, e);
412    
413                            throw new RemoteException(e.getMessage());
414                    }
415            }
416    
417            private static Log _log = LogFactoryUtil.getLog(AssetTagServiceSoap.class);
418    }