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.dynamicdatalists.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.LocalizationUtil;
020    
021    import com.liferay.portlet.dynamicdatalists.service.DDLRecordSetServiceUtil;
022    
023    import java.rmi.RemoteException;
024    
025    import java.util.Locale;
026    import java.util.Map;
027    
028    /**
029     * <p>
030     * This class provides a SOAP utility for the
031     * {@link com.liferay.portlet.dynamicdatalists.service.DDLRecordSetServiceUtil} service utility. The
032     * static methods of this class calls the same methods of the service utility.
033     * However, the signatures are different because it is difficult for SOAP to
034     * support certain types.
035     * </p>
036     *
037     * <p>
038     * ServiceBuilder follows certain rules in translating the methods. For example,
039     * if the method in the service utility returns a {@link java.util.List}, that
040     * is translated to an array of {@link com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap}.
041     * If the method in the service utility returns a
042     * {@link com.liferay.portlet.dynamicdatalists.model.DDLRecordSet}, that is translated to a
043     * {@link com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap}. Methods that SOAP cannot
044     * safely wire are skipped.
045     * </p>
046     *
047     * <p>
048     * The benefits of using the SOAP utility is that it is cross platform
049     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
050     * even Perl, to call the generated services. One drawback of SOAP is that it is
051     * slow because it needs to serialize all calls into a text format (XML).
052     * </p>
053     *
054     * <p>
055     * You can see a list of services at http://localhost:8080/api/axis. Set the
056     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
057     * security.
058     * </p>
059     *
060     * <p>
061     * The SOAP utility is only generated for remote services.
062     * </p>
063     *
064     * @author    Brian Wing Shun Chan
065     * @see       DDLRecordSetServiceHttp
066     * @see       com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap
067     * @see       com.liferay.portlet.dynamicdatalists.service.DDLRecordSetServiceUtil
068     * @generated
069     */
070    public class DDLRecordSetServiceSoap {
071            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap addRecordSet(
072                    long groupId, long ddmStructureId, java.lang.String recordSetKey,
073                    java.lang.String[] nameMapLanguageIds,
074                    java.lang.String[] nameMapValues,
075                    java.lang.String[] descriptionMapLanguageIds,
076                    java.lang.String[] descriptionMapValues, int minDisplayRows, int scope,
077                    com.liferay.portal.service.ServiceContext serviceContext)
078                    throws RemoteException {
079                    try {
080                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
081                                            nameMapValues);
082                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
083                                            descriptionMapValues);
084    
085                            com.liferay.portlet.dynamicdatalists.model.DDLRecordSet returnValue = DDLRecordSetServiceUtil.addRecordSet(groupId,
086                                            ddmStructureId, recordSetKey, nameMap, descriptionMap,
087                                            minDisplayRows, scope, serviceContext);
088    
089                            return com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap.toSoapModel(returnValue);
090                    }
091                    catch (Exception e) {
092                            _log.error(e, e);
093    
094                            throw new RemoteException(e.getMessage());
095                    }
096            }
097    
098            public static void deleteRecordSet(long recordSetId)
099                    throws RemoteException {
100                    try {
101                            DDLRecordSetServiceUtil.deleteRecordSet(recordSetId);
102                    }
103                    catch (Exception e) {
104                            _log.error(e, e);
105    
106                            throw new RemoteException(e.getMessage());
107                    }
108            }
109    
110            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap getRecordSet(
111                    long recordSetId) throws RemoteException {
112                    try {
113                            com.liferay.portlet.dynamicdatalists.model.DDLRecordSet returnValue = DDLRecordSetServiceUtil.getRecordSet(recordSetId);
114    
115                            return com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap.toSoapModel(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.dynamicdatalists.model.DDLRecordSetSoap updateMinDisplayRows(
125                    long recordSetId, int minDisplayRows,
126                    com.liferay.portal.service.ServiceContext serviceContext)
127                    throws RemoteException {
128                    try {
129                            com.liferay.portlet.dynamicdatalists.model.DDLRecordSet returnValue = DDLRecordSetServiceUtil.updateMinDisplayRows(recordSetId,
130                                            minDisplayRows, serviceContext);
131    
132                            return com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap.toSoapModel(returnValue);
133                    }
134                    catch (Exception e) {
135                            _log.error(e, e);
136    
137                            throw new RemoteException(e.getMessage());
138                    }
139            }
140    
141            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap updateRecordSet(
142                    long recordSetId, long ddmStructureId,
143                    java.lang.String[] nameMapLanguageIds,
144                    java.lang.String[] nameMapValues,
145                    java.lang.String[] descriptionMapLanguageIds,
146                    java.lang.String[] descriptionMapValues, int minDisplayRows,
147                    com.liferay.portal.service.ServiceContext serviceContext)
148                    throws RemoteException {
149                    try {
150                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
151                                            nameMapValues);
152                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
153                                            descriptionMapValues);
154    
155                            com.liferay.portlet.dynamicdatalists.model.DDLRecordSet returnValue = DDLRecordSetServiceUtil.updateRecordSet(recordSetId,
156                                            ddmStructureId, nameMap, descriptionMap, minDisplayRows,
157                                            serviceContext);
158    
159                            return com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap.toSoapModel(returnValue);
160                    }
161                    catch (Exception e) {
162                            _log.error(e, e);
163    
164                            throw new RemoteException(e.getMessage());
165                    }
166            }
167    
168            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap updateRecordSet(
169                    long groupId, long ddmStructureId, java.lang.String recordSetKey,
170                    java.lang.String[] nameMapLanguageIds,
171                    java.lang.String[] nameMapValues,
172                    java.lang.String[] descriptionMapLanguageIds,
173                    java.lang.String[] descriptionMapValues, int minDisplayRows,
174                    com.liferay.portal.service.ServiceContext serviceContext)
175                    throws RemoteException {
176                    try {
177                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
178                                            nameMapValues);
179                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
180                                            descriptionMapValues);
181    
182                            com.liferay.portlet.dynamicdatalists.model.DDLRecordSet returnValue = DDLRecordSetServiceUtil.updateRecordSet(groupId,
183                                            ddmStructureId, recordSetKey, nameMap, descriptionMap,
184                                            minDisplayRows, serviceContext);
185    
186                            return com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap.toSoapModel(returnValue);
187                    }
188                    catch (Exception e) {
189                            _log.error(e, e);
190    
191                            throw new RemoteException(e.getMessage());
192                    }
193            }
194    
195            private static Log _log = LogFactoryUtil.getLog(DDLRecordSetServiceSoap.class);
196    }