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 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 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 HttpPrincipal
051     * @see 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 fetchLayoutSetPrototype(
160                    HttpPrincipal httpPrincipal, long layoutSetPrototypeId)
161                    throws com.liferay.portal.kernel.exception.PortalException {
162                    try {
163                            MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
164                                            "fetchLayoutSetPrototype",
165                                            _fetchLayoutSetPrototypeParameterTypes3);
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 com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototype(
193                    HttpPrincipal httpPrincipal, long layoutSetPrototypeId)
194                    throws com.liferay.portal.kernel.exception.PortalException {
195                    try {
196                            MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
197                                            "getLayoutSetPrototype",
198                                            _getLayoutSetPrototypeParameterTypes4);
199    
200                            MethodHandler methodHandler = new MethodHandler(methodKey,
201                                            layoutSetPrototypeId);
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 (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 java.util.List<com.liferay.portal.model.LayoutSetPrototype> search(
226                    HttpPrincipal httpPrincipal, long companyId, java.lang.Boolean active,
227                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutSetPrototype> obc)
228                    throws com.liferay.portal.kernel.exception.PortalException {
229                    try {
230                            MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
231                                            "search", _searchParameterTypes5);
232    
233                            MethodHandler methodHandler = new MethodHandler(methodKey,
234                                            companyId, active, obc);
235    
236                            Object returnObj = null;
237    
238                            try {
239                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
240                            }
241                            catch (Exception e) {
242                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
243                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
244                                    }
245    
246                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
247                            }
248    
249                            return (java.util.List<com.liferay.portal.model.LayoutSetPrototype>)returnObj;
250                    }
251                    catch (com.liferay.portal.kernel.exception.SystemException se) {
252                            _log.error(se, se);
253    
254                            throw se;
255                    }
256            }
257    
258            public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
259                    HttpPrincipal httpPrincipal, long layoutSetPrototypeId,
260                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
261                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
262                    boolean active, boolean layoutsUpdateable,
263                    com.liferay.portal.service.ServiceContext serviceContext)
264                    throws com.liferay.portal.kernel.exception.PortalException {
265                    try {
266                            MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
267                                            "updateLayoutSetPrototype",
268                                            _updateLayoutSetPrototypeParameterTypes6);
269    
270                            MethodHandler methodHandler = new MethodHandler(methodKey,
271                                            layoutSetPrototypeId, nameMap, descriptionMap, active,
272                                            layoutsUpdateable, serviceContext);
273    
274                            Object returnObj = null;
275    
276                            try {
277                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
278                            }
279                            catch (Exception e) {
280                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
281                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
282                                    }
283    
284                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
285                            }
286    
287                            return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
288                    }
289                    catch (com.liferay.portal.kernel.exception.SystemException se) {
290                            _log.error(se, se);
291    
292                            throw se;
293                    }
294            }
295    
296            public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
297                    HttpPrincipal httpPrincipal, long layoutSetPrototypeId,
298                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
299                    java.lang.String description, boolean active,
300                    boolean layoutsUpdateable,
301                    com.liferay.portal.service.ServiceContext serviceContext)
302                    throws com.liferay.portal.kernel.exception.PortalException {
303                    try {
304                            MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
305                                            "updateLayoutSetPrototype",
306                                            _updateLayoutSetPrototypeParameterTypes7);
307    
308                            MethodHandler methodHandler = new MethodHandler(methodKey,
309                                            layoutSetPrototypeId, nameMap, description, active,
310                                            layoutsUpdateable, serviceContext);
311    
312                            Object returnObj = null;
313    
314                            try {
315                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
316                            }
317                            catch (Exception e) {
318                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
319                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
320                                    }
321    
322                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
323                            }
324    
325                            return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
326                    }
327                    catch (com.liferay.portal.kernel.exception.SystemException se) {
328                            _log.error(se, se);
329    
330                            throw se;
331                    }
332            }
333    
334            public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
335                    HttpPrincipal httpPrincipal, long layoutSetPrototypeId,
336                    java.lang.String settings)
337                    throws com.liferay.portal.kernel.exception.PortalException {
338                    try {
339                            MethodKey methodKey = new MethodKey(LayoutSetPrototypeServiceUtil.class,
340                                            "updateLayoutSetPrototype",
341                                            _updateLayoutSetPrototypeParameterTypes8);
342    
343                            MethodHandler methodHandler = new MethodHandler(methodKey,
344                                            layoutSetPrototypeId, settings);
345    
346                            Object returnObj = null;
347    
348                            try {
349                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
350                            }
351                            catch (Exception e) {
352                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
353                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
354                                    }
355    
356                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
357                            }
358    
359                            return (com.liferay.portal.model.LayoutSetPrototype)returnObj;
360                    }
361                    catch (com.liferay.portal.kernel.exception.SystemException se) {
362                            _log.error(se, se);
363    
364                            throw se;
365                    }
366            }
367    
368            private static Log _log = LogFactoryUtil.getLog(LayoutSetPrototypeServiceHttp.class);
369            private static final Class<?>[] _addLayoutSetPrototypeParameterTypes0 = new Class[] {
370                            java.util.Map.class, java.util.Map.class, boolean.class,
371                            boolean.class, com.liferay.portal.service.ServiceContext.class
372                    };
373            private static final Class<?>[] _addLayoutSetPrototypeParameterTypes1 = new Class[] {
374                            java.util.Map.class, java.lang.String.class, boolean.class,
375                            boolean.class, com.liferay.portal.service.ServiceContext.class
376                    };
377            private static final Class<?>[] _deleteLayoutSetPrototypeParameterTypes2 = new Class[] {
378                            long.class
379                    };
380            private static final Class<?>[] _fetchLayoutSetPrototypeParameterTypes3 = new Class[] {
381                            long.class
382                    };
383            private static final Class<?>[] _getLayoutSetPrototypeParameterTypes4 = new Class[] {
384                            long.class
385                    };
386            private static final Class<?>[] _searchParameterTypes5 = new Class[] {
387                            long.class, java.lang.Boolean.class,
388                            com.liferay.portal.kernel.util.OrderByComparator.class
389                    };
390            private static final Class<?>[] _updateLayoutSetPrototypeParameterTypes6 = new Class[] {
391                            long.class, java.util.Map.class, java.util.Map.class, boolean.class,
392                            boolean.class, com.liferay.portal.service.ServiceContext.class
393                    };
394            private static final Class<?>[] _updateLayoutSetPrototypeParameterTypes7 = new Class[] {
395                            long.class, java.util.Map.class, java.lang.String.class,
396                            boolean.class, boolean.class,
397                            com.liferay.portal.service.ServiceContext.class
398                    };
399            private static final Class<?>[] _updateLayoutSetPrototypeParameterTypes8 = new Class[] {
400                            long.class, java.lang.String.class
401                    };
402    }