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.portal.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    import com.liferay.portal.service.LayoutSetPrototypeServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    import java.util.Locale;
025    import java.util.Map;
026    
027    /**
028     * <p>
029     * This class provides a SOAP utility for the
030     * {@link com.liferay.portal.service.LayoutSetPrototypeServiceUtil} service utility. The
031     * static methods of this class calls the same methods of the service utility.
032     * However, the signatures are different because it is difficult for SOAP to
033     * support certain types.
034     * </p>
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    public class LayoutSetPrototypeServiceSoap {
070            public static com.liferay.portal.model.LayoutSetPrototypeSoap addLayoutSetPrototype(
071                    java.lang.String[] nameMapLanguageIds,
072                    java.lang.String[] nameMapValues, java.lang.String description,
073                    boolean active, boolean layoutsUpdateable,
074                    com.liferay.portal.service.ServiceContext serviceContext)
075                    throws RemoteException {
076                    try {
077                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
078                                            nameMapValues);
079    
080                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.addLayoutSetPrototype(nameMap,
081                                            description, active, layoutsUpdateable, serviceContext);
082    
083                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
084                    }
085                    catch (Exception e) {
086                            _log.error(e, e);
087    
088                            throw new RemoteException(e.getMessage());
089                    }
090            }
091    
092            public static void deleteLayoutSetPrototype(long layoutSetPrototypeId)
093                    throws RemoteException {
094                    try {
095                            LayoutSetPrototypeServiceUtil.deleteLayoutSetPrototype(layoutSetPrototypeId);
096                    }
097                    catch (Exception e) {
098                            _log.error(e, e);
099    
100                            throw new RemoteException(e.getMessage());
101                    }
102            }
103    
104            public static com.liferay.portal.model.LayoutSetPrototypeSoap getLayoutSetPrototype(
105                    long layoutSetPrototypeId) throws RemoteException {
106                    try {
107                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.getLayoutSetPrototype(layoutSetPrototypeId);
108    
109                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
110                    }
111                    catch (Exception e) {
112                            _log.error(e, e);
113    
114                            throw new RemoteException(e.getMessage());
115                    }
116            }
117    
118            public static com.liferay.portal.model.LayoutSetPrototypeSoap[] search(
119                    long companyId, java.lang.Boolean active,
120                    com.liferay.portal.kernel.util.OrderByComparator obc)
121                    throws RemoteException {
122                    try {
123                            java.util.List<com.liferay.portal.model.LayoutSetPrototype> returnValue =
124                                    LayoutSetPrototypeServiceUtil.search(companyId, active, obc);
125    
126                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModels(returnValue);
127                    }
128                    catch (Exception e) {
129                            _log.error(e, e);
130    
131                            throw new RemoteException(e.getMessage());
132                    }
133            }
134    
135            public static com.liferay.portal.model.LayoutSetPrototypeSoap updateLayoutSetPrototype(
136                    long layoutSetPrototypeId, java.lang.String[] nameMapLanguageIds,
137                    java.lang.String[] nameMapValues, java.lang.String description,
138                    boolean active, boolean layoutsUpdateable,
139                    com.liferay.portal.service.ServiceContext serviceContext)
140                    throws RemoteException {
141                    try {
142                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
143                                            nameMapValues);
144    
145                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.updateLayoutSetPrototype(layoutSetPrototypeId,
146                                            nameMap, description, active, layoutsUpdateable,
147                                            serviceContext);
148    
149                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
150                    }
151                    catch (Exception e) {
152                            _log.error(e, e);
153    
154                            throw new RemoteException(e.getMessage());
155                    }
156            }
157    
158            public static com.liferay.portal.model.LayoutSetPrototypeSoap updateLayoutSetPrototype(
159                    long layoutSetPrototypeId, java.lang.String settings)
160                    throws RemoteException {
161                    try {
162                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.updateLayoutSetPrototype(layoutSetPrototypeId,
163                                            settings);
164    
165                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
166                    }
167                    catch (Exception e) {
168                            _log.error(e, e);
169    
170                            throw new RemoteException(e.getMessage());
171                    }
172            }
173    
174            private static Log _log = LogFactoryUtil.getLog(LayoutSetPrototypeServiceSoap.class);
175    }