001    /**
002     * Copyright (c) 2000-2011 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.AssetVocabularyServiceUtil;
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.AssetVocabularyServiceUtil} 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.AssetVocabularySoap}.
037     * If the method in the service utility returns a
038     * {@link com.liferay.portlet.asset.model.AssetVocabulary}, that is translated to a
039     * {@link com.liferay.portlet.asset.model.AssetVocabularySoap}. 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       AssetVocabularyServiceHttp
063     * @see       com.liferay.portlet.asset.model.AssetVocabularySoap
064     * @see       com.liferay.portlet.asset.service.AssetVocabularyServiceUtil
065     * @generated
066     */
067    public class AssetVocabularyServiceSoap {
068            public static void deleteVocabularies(long[] vocabularyIds)
069                    throws RemoteException {
070                    try {
071                            AssetVocabularyServiceUtil.deleteVocabularies(vocabularyIds);
072                    }
073                    catch (Exception e) {
074                            _log.error(e, e);
075    
076                            throw new RemoteException(e.getMessage());
077                    }
078            }
079    
080            public static void deleteVocabulary(long vocabularyId)
081                    throws RemoteException {
082                    try {
083                            AssetVocabularyServiceUtil.deleteVocabulary(vocabularyId);
084                    }
085                    catch (Exception e) {
086                            _log.error(e, e);
087    
088                            throw new RemoteException(e.getMessage());
089                    }
090            }
091    
092            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getCompanyVocabularies(
093                    long companyId) throws RemoteException {
094                    try {
095                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
096                                    AssetVocabularyServiceUtil.getCompanyVocabularies(companyId);
097    
098                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
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.AssetVocabularySoap[] getGroupsVocabularies(
108                    long[] groupIds) throws RemoteException {
109                    try {
110                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
111                                    AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds);
112    
113                            return com.liferay.portlet.asset.model.AssetVocabularySoap.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.AssetVocabularySoap[] getGroupsVocabularies(
123                    long[] groupIds, java.lang.String className) throws RemoteException {
124                    try {
125                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
126                                    AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds,
127                                            className);
128    
129                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
130                    }
131                    catch (Exception e) {
132                            _log.error(e, e);
133    
134                            throw new RemoteException(e.getMessage());
135                    }
136            }
137    
138            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
139                    long groupId) throws RemoteException {
140                    try {
141                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
142                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId);
143    
144                            return com.liferay.portlet.asset.model.AssetVocabularySoap.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 com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
154                    long groupId, int start, int end,
155                    com.liferay.portal.kernel.util.OrderByComparator obc)
156                    throws RemoteException {
157                    try {
158                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
159                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId, start,
160                                            end, obc);
161    
162                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
163                    }
164                    catch (Exception e) {
165                            _log.error(e, e);
166    
167                            throw new RemoteException(e.getMessage());
168                    }
169            }
170    
171            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies(
172                    long groupId, java.lang.String name, int start, int end,
173                    com.liferay.portal.kernel.util.OrderByComparator obc)
174                    throws RemoteException {
175                    try {
176                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
177                                    AssetVocabularyServiceUtil.getGroupVocabularies(groupId, name,
178                                            start, end, obc);
179    
180                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue);
181                    }
182                    catch (Exception e) {
183                            _log.error(e, e);
184    
185                            throw new RemoteException(e.getMessage());
186                    }
187            }
188    
189            public static int getGroupVocabulariesCount(long groupId)
190                    throws RemoteException {
191                    try {
192                            int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupId);
193    
194                            return returnValue;
195                    }
196                    catch (Exception e) {
197                            _log.error(e, e);
198    
199                            throw new RemoteException(e.getMessage());
200                    }
201            }
202    
203            public static int getGroupVocabulariesCount(long groupId,
204                    java.lang.String name) throws RemoteException {
205                    try {
206                            int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupId,
207                                            name);
208    
209                            return returnValue;
210                    }
211                    catch (Exception e) {
212                            _log.error(e, e);
213    
214                            throw new RemoteException(e.getMessage());
215                    }
216            }
217    
218            public static java.lang.String getJSONGroupVocabularies(long groupId,
219                    java.lang.String name, int start, int end,
220                    com.liferay.portal.kernel.util.OrderByComparator obc)
221                    throws RemoteException {
222                    try {
223                            com.liferay.portal.kernel.json.JSONObject returnValue = AssetVocabularyServiceUtil.getJSONGroupVocabularies(groupId,
224                                            name, start, end, obc);
225    
226                            return returnValue.toString();
227                    }
228                    catch (Exception e) {
229                            _log.error(e, e);
230    
231                            throw new RemoteException(e.getMessage());
232                    }
233            }
234    
235            public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getVocabularies(
236                    long[] vocabularyIds) throws RemoteException {
237                    try {
238                            java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> returnValue =
239                                    AssetVocabularyServiceUtil.getVocabularies(vocabularyIds);
240    
241                            return com.liferay.portlet.asset.model.AssetVocabularySoap.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.AssetVocabularySoap getVocabulary(
251                    long vocabularyId) throws RemoteException {
252                    try {
253                            com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.getVocabulary(vocabularyId);
254    
255                            return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue);
256                    }
257                    catch (Exception e) {
258                            _log.error(e, e);
259    
260                            throw new RemoteException(e.getMessage());
261                    }
262            }
263    
264            private static Log _log = LogFactoryUtil.getLog(AssetVocabularyServiceSoap.class);
265    }