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 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, java.lang.String description,
074                    boolean active, boolean layoutsUpdateable,
075                    com.liferay.portal.service.ServiceContext serviceContext)
076                    throws RemoteException {
077                    try {
078                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
079                                            nameMapValues);
080    
081                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.addLayoutSetPrototype(nameMap,
082                                            description, active, layoutsUpdateable, serviceContext);
083    
084                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
085                    }
086                    catch (Exception e) {
087                            _log.error(e, e);
088    
089                            throw new RemoteException(e.getMessage());
090                    }
091            }
092    
093            public static void deleteLayoutSetPrototype(long layoutSetPrototypeId)
094                    throws RemoteException {
095                    try {
096                            LayoutSetPrototypeServiceUtil.deleteLayoutSetPrototype(layoutSetPrototypeId);
097                    }
098                    catch (Exception e) {
099                            _log.error(e, e);
100    
101                            throw new RemoteException(e.getMessage());
102                    }
103            }
104    
105            public static com.liferay.portal.model.LayoutSetPrototypeSoap getLayoutSetPrototype(
106                    long layoutSetPrototypeId) throws RemoteException {
107                    try {
108                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.getLayoutSetPrototype(layoutSetPrototypeId);
109    
110                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
111                    }
112                    catch (Exception e) {
113                            _log.error(e, e);
114    
115                            throw new RemoteException(e.getMessage());
116                    }
117            }
118    
119            public static com.liferay.portal.model.LayoutSetPrototypeSoap[] search(
120                    long companyId, java.lang.Boolean active,
121                    com.liferay.portal.kernel.util.OrderByComparator obc)
122                    throws RemoteException {
123                    try {
124                            java.util.List<com.liferay.portal.model.LayoutSetPrototype> returnValue =
125                                    LayoutSetPrototypeServiceUtil.search(companyId, active, obc);
126    
127                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModels(returnValue);
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 updateLayoutSetPrototype(
137                    long layoutSetPrototypeId, java.lang.String[] nameMapLanguageIds,
138                    java.lang.String[] nameMapValues, java.lang.String description,
139                    boolean active, boolean layoutsUpdateable,
140                    com.liferay.portal.service.ServiceContext serviceContext)
141                    throws RemoteException {
142                    try {
143                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
144                                            nameMapValues);
145    
146                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.updateLayoutSetPrototype(layoutSetPrototypeId,
147                                            nameMap, description, active, layoutsUpdateable,
148                                            serviceContext);
149    
150                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
151                    }
152                    catch (Exception e) {
153                            _log.error(e, e);
154    
155                            throw new RemoteException(e.getMessage());
156                    }
157            }
158    
159            public static com.liferay.portal.model.LayoutSetPrototypeSoap updateLayoutSetPrototype(
160                    long layoutSetPrototypeId, java.lang.String settings)
161                    throws RemoteException {
162                    try {
163                            com.liferay.portal.model.LayoutSetPrototype returnValue = LayoutSetPrototypeServiceUtil.updateLayoutSetPrototype(layoutSetPrototypeId,
164                                            settings);
165    
166                            return com.liferay.portal.model.LayoutSetPrototypeSoap.toSoapModel(returnValue);
167                    }
168                    catch (Exception e) {
169                            _log.error(e, e);
170    
171                            throw new RemoteException(e.getMessage());
172                    }
173            }
174    
175            private static Log _log = LogFactoryUtil.getLog(LayoutSetPrototypeServiceSoap.class);
176    }