001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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.AssetCategoryServiceUtil;
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.AssetCategoryServiceUtil} 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.AssetCategorySoap}.
037     * If the method in the service utility returns a
038     * {@link com.liferay.portlet.asset.model.AssetCategory}, that is translated to a
039     * {@link com.liferay.portlet.asset.model.AssetCategorySoap}. 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/tunnel-web/secure/axis. Set the property
053     * <b>tunnel.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       AssetCategoryServiceHttp
063     * @see       com.liferay.portlet.asset.model.AssetCategorySoap
064     * @see       com.liferay.portlet.asset.service.AssetCategoryServiceUtil
065     * @generated
066     */
067    public class AssetCategoryServiceSoap {
068            public static void deleteCategory(long categoryId)
069                    throws RemoteException {
070                    try {
071                            AssetCategoryServiceUtil.deleteCategory(categoryId);
072                    }
073                    catch (Exception e) {
074                            _log.error(e, e);
075    
076                            throw new RemoteException(e.getMessage());
077                    }
078            }
079    
080            public static com.liferay.portlet.asset.model.AssetCategorySoap[] getCategories(
081                    java.lang.String className, long classPK) throws RemoteException {
082                    try {
083                            java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
084                                    AssetCategoryServiceUtil.getCategories(className, classPK);
085    
086                            return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
087                    }
088                    catch (Exception e) {
089                            _log.error(e, e);
090    
091                            throw new RemoteException(e.getMessage());
092                    }
093            }
094    
095            public static com.liferay.portlet.asset.model.AssetCategorySoap getCategory(
096                    long categoryId) throws RemoteException {
097                    try {
098                            com.liferay.portlet.asset.model.AssetCategory returnValue = AssetCategoryServiceUtil.getCategory(categoryId);
099    
100                            return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModel(returnValue);
101                    }
102                    catch (Exception e) {
103                            _log.error(e, e);
104    
105                            throw new RemoteException(e.getMessage());
106                    }
107            }
108    
109            public static com.liferay.portlet.asset.model.AssetCategorySoap[] getChildCategories(
110                    long parentCategoryId) throws RemoteException {
111                    try {
112                            java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
113                                    AssetCategoryServiceUtil.getChildCategories(parentCategoryId);
114    
115                            return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
116                    }
117                    catch (Exception e) {
118                            _log.error(e, e);
119    
120                            throw new RemoteException(e.getMessage());
121                    }
122            }
123    
124            public static com.liferay.portlet.asset.model.AssetCategorySoap[] getChildCategories(
125                    long parentCategoryId, int start, int end,
126                    com.liferay.portal.kernel.util.OrderByComparator obc)
127                    throws RemoteException {
128                    try {
129                            java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
130                                    AssetCategoryServiceUtil.getChildCategories(parentCategoryId,
131                                            start, end, obc);
132    
133                            return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
134                    }
135                    catch (Exception e) {
136                            _log.error(e, e);
137    
138                            throw new RemoteException(e.getMessage());
139                    }
140            }
141    
142            public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyCategories(
143                    long vocabularyId, int start, int end,
144                    com.liferay.portal.kernel.util.OrderByComparator obc)
145                    throws RemoteException {
146                    try {
147                            java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
148                                    AssetCategoryServiceUtil.getVocabularyCategories(vocabularyId,
149                                            start, end, obc);
150    
151                            return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
152                    }
153                    catch (Exception e) {
154                            _log.error(e, e);
155    
156                            throw new RemoteException(e.getMessage());
157                    }
158            }
159    
160            public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyCategories(
161                    long parentCategoryId, long vocabularyId, int start, int end,
162                    com.liferay.portal.kernel.util.OrderByComparator obc)
163                    throws RemoteException {
164                    try {
165                            java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
166                                    AssetCategoryServiceUtil.getVocabularyCategories(parentCategoryId,
167                                            vocabularyId, start, end, obc);
168    
169                            return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(returnValue);
170                    }
171                    catch (Exception e) {
172                            _log.error(e, e);
173    
174                            throw new RemoteException(e.getMessage());
175                    }
176            }
177    
178            public static com.liferay.portlet.asset.model.AssetCategorySoap[] getVocabularyRootCategories(
179                    long vocabularyId, int start, int end,
180                    com.liferay.portal.kernel.util.OrderByComparator obc)
181                    throws RemoteException {
182                    try {
183                            java.util.List<com.liferay.portlet.asset.model.AssetCategory> returnValue =
184                                    AssetCategoryServiceUtil.getVocabularyRootCategories(vocabularyId,
185                                            start, end, obc);
186    
187                            return com.liferay.portlet.asset.model.AssetCategorySoap.toSoapModels(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.portal.kernel.json.JSONArray search(
197                    long groupId, java.lang.String name,
198                    java.lang.String[] categoryProperties, int start, int end)
199                    throws RemoteException {
200                    try {
201                            com.liferay.portal.kernel.json.JSONArray returnValue = AssetCategoryServiceUtil.search(groupId,
202                                            name, categoryProperties, start, end);
203    
204                            return returnValue;
205                    }
206                    catch (Exception e) {
207                            _log.error(e, e);
208    
209                            throw new RemoteException(e.getMessage());
210                    }
211            }
212    
213            private static Log _log = LogFactoryUtil.getLog(AssetCategoryServiceSoap.class);
214    }