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 com.liferay.portal.service.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 com.liferay.portal.service.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 getLayoutSetPrototype(
137                    long layoutSetPrototypeId) throws RemoteException {
138                    try {
139                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.getLayoutSetPrototype(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[] search(
151                    long companyId, java.lang.Boolean active,
152                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutSetPrototype> obc)
153                    throws RemoteException {
154                    try {
155                            java.util.List<com.liferay.portal.model.LayoutSetPrototype> returnValue =
156                                    LayoutSetPrototypeServiceUtil.search(companyId, active, obc);
157    
158                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModels(returnValue);
159                    }
160                    catch (Exception e) {
161                            _log.error(e, e);
162    
163                            throw new RemoteException(e.getMessage());
164                    }
165            }
166    
167            public static com.liferay.portal.model.LayoutSetPrototypeSoap updateLayoutSetPrototype(
168                    long layoutSetPrototypeId, java.lang.String[] nameMapLanguageIds,
169                    java.lang.String[] nameMapValues,
170                    java.lang.String[] descriptionMapLanguageIds,
171                    java.lang.String[] descriptionMapValues, boolean active,
172                    boolean layoutsUpdateable,
173                    com.liferay.portal.service.ServiceContext serviceContext)
174                    throws RemoteException {
175                    try {
176                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
177                                            nameMapValues);
178                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
179                                            descriptionMapValues);
180    
181                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.updateLayoutSetPrototype(layoutSetPrototypeId,
182                                            nameMap, descriptionMap, active, layoutsUpdateable,
183                                            serviceContext);
184    
185                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
186                    }
187                    catch (Exception e) {
188                            _log.error(e, e);
189    
190                            throw new RemoteException(e.getMessage());
191                    }
192            }
193    
194            /**
195            * @deprecated As of 7.0.0, replaced by {@link
196            #updateLayoutSetPrototype(long, Map, Map, boolean, boolean,
197            ServiceContext)}
198            */
199            @Deprecated
200            public static com.liferay.portal.model.LayoutSetPrototypeSoap updateLayoutSetPrototype(
201                    long layoutSetPrototypeId, java.lang.String[] nameMapLanguageIds,
202                    java.lang.String[] nameMapValues, java.lang.String description,
203                    boolean active, boolean layoutsUpdateable,
204                    com.liferay.portal.service.ServiceContext serviceContext)
205                    throws RemoteException {
206                    try {
207                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
208                                            nameMapValues);
209    
210                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.updateLayoutSetPrototype(layoutSetPrototypeId,
211                                            nameMap, description, active, layoutsUpdateable,
212                                            serviceContext);
213    
214                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
215                    }
216                    catch (Exception e) {
217                            _log.error(e, e);
218    
219                            throw new RemoteException(e.getMessage());
220                    }
221            }
222    
223            public static com.liferay.portal.model.LayoutSetPrototypeSoap updateLayoutSetPrototype(
224                    long layoutSetPrototypeId, java.lang.String settings)
225                    throws RemoteException {
226                    try {
227                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.updateLayoutSetPrototype(layoutSetPrototypeId,
228                                            settings);
229    
230                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
231                    }
232                    catch (Exception e) {
233                            _log.error(e, e);
234    
235                            throw new RemoteException(e.getMessage());
236                    }
237            }
238    
239            private static Log _log = LogFactoryUtil.getLog(LayoutSetPrototypeServiceSoap.class);
240    }