001    /**
002     * Copyright (c) 2000-present 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.portal.service.http;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.log.Log;
020    import com.liferay.portal.kernel.log.LogFactoryUtil;
021    import com.liferay.portal.kernel.util.LocalizationUtil;
022    import com.liferay.portal.service.LayoutSetPrototypeServiceUtil;
023    
024    import java.rmi.RemoteException;
025    
026    import java.util.Locale;
027    import java.util.Map;
028    
029    /**
030     * Provides the SOAP utility for the
031     * {@link LayoutSetPrototypeServiceUtil} 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     *
036     * <p>
037     * ServiceBuilder follows certain rules in translating the methods. For example,
038     * if the method in the service utility returns a {@link java.util.List}, that
039     * is translated to an array of {@link com.liferay.portal.model.LayoutSetPrototypeSoap}.
040     * If the method in the service utility returns a
041     * {@link com.liferay.portal.model.LayoutSetPrototype}, that is translated to a
042     * {@link com.liferay.portal.model.LayoutSetPrototypeSoap}. Methods that SOAP cannot
043     * safely wire are skipped.
044     * </p>
045     *
046     * <p>
047     * The benefits of using the SOAP utility is that it is cross platform
048     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
049     * even Perl, to call the generated services. One drawback of SOAP is that it is
050     * slow because it needs to serialize all calls into a text format (XML).
051     * </p>
052     *
053     * <p>
054     * You can see a list of services at http://localhost:8080/api/axis. Set the
055     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
056     * security.
057     * </p>
058     *
059     * <p>
060     * The SOAP utility is only generated for remote services.
061     * </p>
062     *
063     * @author Brian Wing Shun Chan
064     * @see LayoutSetPrototypeServiceHttp
065     * @see com.liferay.portal.model.LayoutSetPrototypeSoap
066     * @see LayoutSetPrototypeServiceUtil
067     * @generated
068     */
069    @ProviderType
070    public class LayoutSetPrototypeServiceSoap {
071            public static com.liferay.portal.model.LayoutSetPrototypeSoap addLayoutSetPrototype(
072                    java.lang.String[] nameMapLanguageIds,
073                    java.lang.String[] nameMapValues,
074                    java.lang.String[] descriptionMapLanguageIds,
075                    java.lang.String[] descriptionMapValues, boolean active,
076                    boolean layoutsUpdateable,
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.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.addLayoutSetPrototype(nameMap,
086                                            descriptionMap, active, layoutsUpdateable, serviceContext);
087    
088                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
089                    }
090                    catch (Exception e) {
091                            _log.error(e, e);
092    
093                            throw new RemoteException(e.getMessage());
094                    }
095            }
096    
097            /**
098            * @deprecated As of 7.0.0, replaced by {@link #addLayoutSetPrototype(Map,
099            Map, boolean, boolean, ServiceContext)}
100            */
101            @Deprecated
102            public static com.liferay.portal.model.LayoutSetPrototypeSoap addLayoutSetPrototype(
103                    java.lang.String[] nameMapLanguageIds,
104                    java.lang.String[] nameMapValues, java.lang.String description,
105                    boolean active, boolean layoutsUpdateable,
106                    com.liferay.portal.service.ServiceContext serviceContext)
107                    throws RemoteException {
108                    try {
109                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
110                                            nameMapValues);
111    
112                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.addLayoutSetPrototype(nameMap,
113                                            description, active, layoutsUpdateable, serviceContext);
114    
115                            return com.liferay.portal.model.LayoutSetPrototypeSoap.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 void deleteLayoutSetPrototype(long layoutSetPrototypeId)
125                    throws RemoteException {
126                    try {
127                            LayoutSetPrototypeServiceUtil.deleteLayoutSetPrototype(layoutSetPrototypeId);
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.portal.model.LayoutSetPrototypeSoap fetchLayoutSetPrototype(
137                    long layoutSetPrototypeId) throws RemoteException {
138                    try {
139                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.fetchLayoutSetPrototype(layoutSetPrototypeId);
140    
141                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
142                    }
143                    catch (Exception e) {
144                            _log.error(e, e);
145    
146                            throw new RemoteException(e.getMessage());
147                    }
148            }
149    
150            public static com.liferay.portal.model.LayoutSetPrototypeSoap getLayoutSetPrototype(
151                    long layoutSetPrototypeId) throws RemoteException {
152                    try {
153                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.getLayoutSetPrototype(layoutSetPrototypeId);
154    
155                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
156                    }
157                    catch (Exception e) {
158                            _log.error(e, e);
159    
160                            throw new RemoteException(e.getMessage());
161                    }
162            }
163    
164            public static com.liferay.portal.model.LayoutSetPrototypeSoap[] search(
165                    long companyId, java.lang.Boolean active,
166                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutSetPrototype> obc)
167                    throws RemoteException {
168                    try {
169                            java.util.List<com.liferay.portal.model.LayoutSetPrototype> returnValue =
170                                    LayoutSetPrototypeServiceUtil.search(companyId, active, obc);
171    
172                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModels(returnValue);
173                    }
174                    catch (Exception e) {
175                            _log.error(e, e);
176    
177                            throw new RemoteException(e.getMessage());
178                    }
179            }
180    
181            public static com.liferay.portal.model.LayoutSetPrototypeSoap updateLayoutSetPrototype(
182                    long layoutSetPrototypeId, java.lang.String[] nameMapLanguageIds,
183                    java.lang.String[] nameMapValues,
184                    java.lang.String[] descriptionMapLanguageIds,
185                    java.lang.String[] descriptionMapValues, boolean active,
186                    boolean layoutsUpdateable,
187                    com.liferay.portal.service.ServiceContext serviceContext)
188                    throws RemoteException {
189                    try {
190                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
191                                            nameMapValues);
192                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
193                                            descriptionMapValues);
194    
195                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.updateLayoutSetPrototype(layoutSetPrototypeId,
196                                            nameMap, descriptionMap, active, layoutsUpdateable,
197                                            serviceContext);
198    
199                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
200                    }
201                    catch (Exception e) {
202                            _log.error(e, e);
203    
204                            throw new RemoteException(e.getMessage());
205                    }
206            }
207    
208            /**
209            * @deprecated As of 7.0.0, replaced by {@link
210            #updateLayoutSetPrototype(long, Map, Map, boolean, boolean,
211            ServiceContext)}
212            */
213            @Deprecated
214            public static com.liferay.portal.model.LayoutSetPrototypeSoap updateLayoutSetPrototype(
215                    long layoutSetPrototypeId, java.lang.String[] nameMapLanguageIds,
216                    java.lang.String[] nameMapValues, java.lang.String description,
217                    boolean active, boolean layoutsUpdateable,
218                    com.liferay.portal.service.ServiceContext serviceContext)
219                    throws RemoteException {
220                    try {
221                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
222                                            nameMapValues);
223    
224                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.updateLayoutSetPrototype(layoutSetPrototypeId,
225                                            nameMap, description, active, layoutsUpdateable,
226                                            serviceContext);
227    
228                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
229                    }
230                    catch (Exception e) {
231                            _log.error(e, e);
232    
233                            throw new RemoteException(e.getMessage());
234                    }
235            }
236    
237            public static com.liferay.portal.model.LayoutSetPrototypeSoap updateLayoutSetPrototype(
238                    long layoutSetPrototypeId, java.lang.String settings)
239                    throws RemoteException {
240                    try {
241                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.updateLayoutSetPrototype(layoutSetPrototypeId,
242                                            settings);
243    
244                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
245                    }
246                    catch (Exception e) {
247                            _log.error(e, e);
248    
249                            throw new RemoteException(e.getMessage());
250                    }
251            }
252    
253            private static Log _log = LogFactoryUtil.getLog(LayoutSetPrototypeServiceSoap.class);
254    }