001    /**
002     * Copyright (c) 2000-2013 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     * Provides the SOAP utility for the
029     * {@link com.liferay.portal.service.LayoutSetPrototypeServiceUtil} service utility. The
030     * static methods of this class calls the same methods of the service utility.
031     * However, the signatures are different because it is difficult for SOAP to
032     * support certain types.
033     *
034     * <p>
035     * ServiceBuilder follows certain rules in translating the methods. For example,
036     * if the method in the service utility returns a {@link java.util.List}, that
037     * is translated to an array of {@link com.liferay.portal.model.LayoutSetPrototypeSoap}.
038     * If the method in the service utility returns a
039     * {@link com.liferay.portal.model.LayoutSetPrototype}, that is translated to a
040     * {@link com.liferay.portal.model.LayoutSetPrototypeSoap}. Methods that SOAP cannot
041     * safely wire are skipped.
042     * </p>
043     *
044     * <p>
045     * The benefits of using the SOAP utility is that it is cross platform
046     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
047     * even Perl, to call the generated services. One drawback of SOAP is that it is
048     * slow because it needs to serialize all calls into a text format (XML).
049     * </p>
050     *
051     * <p>
052     * You can see a list of services at http://localhost:8080/api/axis. Set the
053     * property <b>axis.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 LayoutSetPrototypeServiceHttp
063     * @see com.liferay.portal.model.LayoutSetPrototypeSoap
064     * @see com.liferay.portal.service.LayoutSetPrototypeServiceUtil
065     * @generated
066     */
067    public class LayoutSetPrototypeServiceSoap {
068            public static com.liferay.portal.model.LayoutSetPrototypeSoap addLayoutSetPrototype(
069                    java.lang.String[] nameMapLanguageIds,
070                    java.lang.String[] nameMapValues, java.lang.String description,
071                    boolean active, boolean layoutsUpdateable,
072                    com.liferay.portal.service.ServiceContext serviceContext)
073                    throws RemoteException {
074                    try {
075                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
076                                            nameMapValues);
077    
078                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.addLayoutSetPrototype(nameMap,
079                                            description, active, layoutsUpdateable, serviceContext);
080    
081                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
082                    }
083                    catch (Exception e) {
084                            _log.error(e, e);
085    
086                            throw new RemoteException(e.getMessage());
087                    }
088            }
089    
090            public static void deleteLayoutSetPrototype(long layoutSetPrototypeId)
091                    throws RemoteException {
092                    try {
093                            LayoutSetPrototypeServiceUtil.deleteLayoutSetPrototype(layoutSetPrototypeId);
094                    }
095                    catch (Exception e) {
096                            _log.error(e, e);
097    
098                            throw new RemoteException(e.getMessage());
099                    }
100            }
101    
102            public static com.liferay.portal.model.LayoutSetPrototypeSoap getLayoutSetPrototype(
103                    long layoutSetPrototypeId) throws RemoteException {
104                    try {
105                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.getLayoutSetPrototype(layoutSetPrototypeId);
106    
107                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
108                    }
109                    catch (Exception e) {
110                            _log.error(e, e);
111    
112                            throw new RemoteException(e.getMessage());
113                    }
114            }
115    
116            public static com.liferay.portal.model.LayoutSetPrototypeSoap[] search(
117                    long companyId, java.lang.Boolean active,
118                    com.liferay.portal.kernel.util.OrderByComparator obc)
119                    throws RemoteException {
120                    try {
121                            java.util.List<com.liferay.portal.model.LayoutSetPrototype> returnValue =
122                                    LayoutSetPrototypeServiceUtil.search(companyId, active, obc);
123    
124                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModels(returnValue);
125                    }
126                    catch (Exception e) {
127                            _log.error(e, e);
128    
129                            throw new RemoteException(e.getMessage());
130                    }
131            }
132    
133            public static com.liferay.portal.model.LayoutSetPrototypeSoap updateLayoutSetPrototype(
134                    long layoutSetPrototypeId, java.lang.String[] nameMapLanguageIds,
135                    java.lang.String[] nameMapValues, java.lang.String description,
136                    boolean active, boolean layoutsUpdateable,
137                    com.liferay.portal.service.ServiceContext serviceContext)
138                    throws RemoteException {
139                    try {
140                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
141                                            nameMapValues);
142    
143                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.updateLayoutSetPrototype(layoutSetPrototypeId,
144                                            nameMap, description, active, layoutsUpdateable,
145                                            serviceContext);
146    
147                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
148                    }
149                    catch (Exception e) {
150                            _log.error(e, e);
151    
152                            throw new RemoteException(e.getMessage());
153                    }
154            }
155    
156            public static com.liferay.portal.model.LayoutSetPrototypeSoap updateLayoutSetPrototype(
157                    long layoutSetPrototypeId, java.lang.String settings)
158                    throws RemoteException {
159                    try {
160                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.updateLayoutSetPrototype(layoutSetPrototypeId,
161                                            settings);
162    
163                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
164                    }
165                    catch (Exception e) {
166                            _log.error(e, e);
167    
168                            throw new RemoteException(e.getMessage());
169                    }
170            }
171    
172            private static Log _log = LogFactoryUtil.getLog(LayoutSetPrototypeServiceSoap.class);
173    }