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.MethodHandler;
022    import com.liferay.portal.kernel.util.MethodKey;
023    import com.liferay.portal.security.auth.HttpPrincipal;
024    import com.liferay.portal.service.LayoutSetPrototypeServiceUtil;
025    
026    /**
027     * Provides the HTTP utility for the
028     * {@link com.liferay.portal.service.LayoutSetPrototypeServiceUtil} service utility. The
029     * static methods of this class calls the same methods of the service utility.
030     * However, the signatures are different because it requires an additional
031     * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
032     *
033     * <p>
034     * The benefits of using the HTTP utility is that it is fast and allows for
035     * tunneling without the cost of serializing to text. The drawback is that it
036     * only works with Java.
037     * </p>
038     *
039     * <p>
040     * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
041     * configure security.
042     * </p>
043     *
044     * <p>
045     * The HTTP utility is only generated for remote services.
046     * </p>
047     *
048     * @author Brian Wing Shun Chan
049     * @see LayoutSetPrototypeServiceSoap
050     * @see com.liferay.portal.security.auth.HttpPrincipal
051     * @see com.liferay.portal.service.LayoutSetPrototypeServiceUtil
052     * @generated
053     */
054    @ProviderType
055    public class LayoutSetPrototypeServiceHttp {
056            public static com.liferay.portal.model.LayoutSetPrototype addLayoutSetPrototype(
057                    HttpPrincipal httpPrincipal,
058                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
059                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
060                    boolean active, boolean layoutsUpdateable,
061                    com.liferay.portal.service.ServiceContext serviceContext)
062                    throws com.liferay.portal.kernel.exception.PortalException {
063                    try {
064                            MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
065                                            "addLayoutSetPrototype",
066                                            _addLayoutSetPrototypeParameterTypes0);
067    
068                            MethodHandler methodHandler = new MethodHandler(methodKey, nameMap,
069                                            descriptionMap, active, layoutsUpdateable, serviceContext);
070    
071                            Object returnObj = null;
072    
073                            try {
074                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
075                            }
076                            catch (Exception e) {
077                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
078                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
079                                    }
080    
081                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
082                            }
083    
084                            return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
085                    }
086                    catch (com.liferay.portal.kernel.exception.SystemException se) {
087                            _log.error(se, se);
088    
089                            throw se;
090                    }
091            }
092    
093            public static com.liferay.portal.model.LayoutSetPrototype addLayoutSetPrototype(
094                    HttpPrincipal httpPrincipal,
095                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
096                    java.lang.String description, boolean active,
097                    boolean layoutsUpdateable,
098                    com.liferay.portal.service.ServiceContext serviceContext)
099                    throws com.liferay.portal.kernel.exception.PortalException {
100                    try {
101                            MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
102                                            "addLayoutSetPrototype",
103                                            _addLayoutSetPrototypeParameterTypes1);
104    
105                            MethodHandler methodHandler = new MethodHandler(methodKey, nameMap,
106                                            description, active, layoutsUpdateable, serviceContext);
107    
108                            Object returnObj = null;
109    
110                            try {
111                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
112                            }
113                            catch (Exception e) {
114                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
115                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
116                                    }
117    
118                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
119                            }
120    
121                            return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
122                    }
123                    catch (com.liferay.portal.kernel.exception.SystemException se) {
124                            _log.error(se, se);
125    
126                            throw se;
127                    }
128            }
129    
130            public static void deleteLayoutSetPrototype(HttpPrincipal httpPrincipal,
131                    long layoutSetPrototypeId)
132                    throws com.liferay.portal.kernel.exception.PortalException {
133                    try {
134                            MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
135                                            "deleteLayoutSetPrototype",
136                                            _deleteLayoutSetPrototypeParameterTypes2);
137    
138                            MethodHandler methodHandler = new MethodHandler(methodKey,
139                                            layoutSetPrototypeId);
140    
141                            try {
142                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
143                            }
144                            catch (Exception e) {
145                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
146                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
147                                    }
148    
149                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
150                            }
151                    }
152                    catch (com.liferay.portal.kernel.exception.SystemException se) {
153                            _log.error(se, se);
154    
155                            throw se;
156                    }
157            }
158    
159            public static com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototype(
160                    HttpPrincipal httpPrincipal, long layoutSetPrototypeId)
161                    throws com.liferay.portal.kernel.exception.PortalException {
162                    try {
163                            MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
164                                            "getLayoutSetPrototype",
165                                            _getLayoutSetPrototypeParameterTypes3);
166    
167                            MethodHandler methodHandler = new MethodHandler(methodKey,
168                                            layoutSetPrototypeId);
169    
170                            Object returnObj = null;
171    
172                            try {
173                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
174                            }
175                            catch (Exception e) {
176                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
177                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
178                                    }
179    
180                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
181                            }
182    
183                            return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
184                    }
185                    catch (com.liferay.portal.kernel.exception.SystemException se) {
186                            _log.error(se, se);
187    
188                            throw se;
189                    }
190            }
191    
192            public static java.util.List<com.liferay.portal.model.LayoutSetPrototype> search(
193                    HttpPrincipal httpPrincipal, long companyId, java.lang.Boolean active,
194                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutSetPrototype> obc)
195                    throws com.liferay.portal.kernel.exception.PortalException {
196                    try {
197                            MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
198                                            "search", _searchParameterTypes4);
199    
200                            MethodHandler methodHandler = new MethodHandler(methodKey,
201                                            companyId, active, obc);
202    
203                            Object returnObj = null;
204    
205                            try {
206                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
207                            }
208                            catch (Exception e) {
209                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
210                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
211                                    }
212    
213                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
214                            }
215    
216                            return (java.util.List<com.liferay.portal.model.LayoutSetPrototype>)returnObj;
217                    }
218                    catch (com.liferay.portal.kernel.exception.SystemException se) {
219                            _log.error(se, se);
220    
221                            throw se;
222                    }
223            }
224    
225            public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
226                    HttpPrincipal httpPrincipal, long layoutSetPrototypeId,
227                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
228                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
229                    boolean active, boolean layoutsUpdateable,
230                    com.liferay.portal.service.ServiceContext serviceContext)
231                    throws com.liferay.portal.kernel.exception.PortalException {
232                    try {
233                            MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
234                                            "updateLayoutSetPrototype",
235                                            _updateLayoutSetPrototypeParameterTypes5);
236    
237                            MethodHandler methodHandler = new MethodHandler(methodKey,
238                                            layoutSetPrototypeId, nameMap, descriptionMap, active,
239                                            layoutsUpdateable, serviceContext);
240    
241                            Object returnObj = null;
242    
243                            try {
244                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
245                            }
246                            catch (Exception e) {
247                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
248                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
249                                    }
250    
251                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
252                            }
253    
254                            return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
255                    }
256                    catch (com.liferay.portal.kernel.exception.SystemException se) {
257                            _log.error(se, se);
258    
259                            throw se;
260                    }
261            }
262    
263            public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
264                    HttpPrincipal httpPrincipal, long layoutSetPrototypeId,
265                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
266                    java.lang.String description, boolean active,
267                    boolean layoutsUpdateable,
268                    com.liferay.portal.service.ServiceContext serviceContext)
269                    throws com.liferay.portal.kernel.exception.PortalException {
270                    try {
271                            MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
272                                            "updateLayoutSetPrototype",
273                                            _updateLayoutSetPrototypeParameterTypes6);
274    
275                            MethodHandler methodHandler = new MethodHandler(methodKey,
276                                            layoutSetPrototypeId, nameMap, description, active,
277                                            layoutsUpdateable, serviceContext);
278    
279                            Object returnObj = null;
280    
281                            try {
282                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
283                            }
284                            catch (Exception e) {
285                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
286                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
287                                    }
288    
289                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
290                            }
291    
292                            return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
293                    }
294                    catch (com.liferay.portal.kernel.exception.SystemException se) {
295                            _log.error(se, se);
296    
297                            throw se;
298                    }
299            }
300    
301            public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
302                    HttpPrincipal httpPrincipal, long layoutSetPrototypeId,
303                    java.lang.String settings)
304                    throws com.liferay.portal.kernel.exception.PortalException {
305                    try {
306                            MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
307                                            "updateLayoutSetPrototype",
308                                            _updateLayoutSetPrototypeParameterTypes7);
309    
310                            MethodHandler methodHandler = new MethodHandler(methodKey,
311                                            layoutSetPrototypeId, settings);
312    
313                            Object returnObj = null;
314    
315                            try {
316                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
317                            }
318                            catch (Exception e) {
319                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
320                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
321                                    }
322    
323                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
324                            }
325    
326                            return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
327                    }
328                    catch (com.liferay.portal.kernel.exception.SystemException se) {
329                            _log.error(se, se);
330    
331                            throw se;
332                    }
333            }
334    
335            private static Log _log = LogFactoryUtil.getLog(LayoutSetPrototypeServiceHttp.class);
336            private static final Class<?>[] _addLayoutSetPrototypeParameterTypes0 = new Class[] {
337                            java.util.Map.class, java.util.Map.class, boolean.class,
338                            boolean.class, com.liferay.portal.service.ServiceContext.class
339                    };
340            private static final Class<?>[] _addLayoutSetPrototypeParameterTypes1 = new Class[] {
341                            java.util.Map.class, java.lang.String.class, boolean.class,
342                            boolean.class, com.liferay.portal.service.ServiceContext.class
343                    };
344            private static final Class<?>[] _deleteLayoutSetPrototypeParameterTypes2 = new Class[] {
345                            long.class
346                    };
347            private static final Class<?>[] _getLayoutSetPrototypeParameterTypes3 = new Class[] {
348                            long.class
349                    };
350            private static final Class<?>[] _searchParameterTypes4 = new Class[] {
351                            long.class, java.lang.Boolean.class,
352                            com.liferay.portal.kernel.util.OrderByComparator.class
353                    };
354            private static final Class<?>[] _updateLayoutSetPrototypeParameterTypes5 = new Class[] {
355                            long.class, java.util.Map.class, java.util.Map.class, boolean.class,
356                            boolean.class, com.liferay.portal.service.ServiceContext.class
357                    };
358            private static final Class<?>[] _updateLayoutSetPrototypeParameterTypes6 = new Class[] {
359                            long.class, java.util.Map.class, java.lang.String.class,
360                            boolean.class, boolean.class,
361                            com.liferay.portal.service.ServiceContext.class
362                    };
363            private static final Class<?>[] _updateLayoutSetPrototypeParameterTypes7 = new Class[] {
364                            long.class, java.lang.String.class
365                    };
366    }