001    /**
002     * Copyright (c) 2000-2010 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.MethodHandler;
020    import com.liferay.portal.kernel.util.MethodKey;
021    import com.liferay.portal.security.auth.HttpPrincipal;
022    import com.liferay.portal.service.LayoutServiceUtil;
023    
024    /**
025     * <p>
026     * This class provides a HTTP utility for the
027     * {@link com.liferay.portal.service.LayoutServiceUtil} service utility. The
028     * static methods of this class calls the same methods of the service utility.
029     * However, the signatures are different because it requires an additional
030     * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
031     * </p>
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       LayoutServiceSoap
050     * @see       com.liferay.portal.security.auth.HttpPrincipal
051     * @see       com.liferay.portal.service.LayoutServiceUtil
052     * @generated
053     */
054    public class LayoutServiceHttp {
055            public static com.liferay.portal.model.Layout addLayout(
056                    HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
057                    long parentLayoutId,
058                    java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
059                    java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
060                    java.lang.String description, java.lang.String type, boolean hidden,
061                    java.lang.String friendlyURL,
062                    com.liferay.portal.service.ServiceContext serviceContext)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    try {
066                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
067                                            "addLayout", long.class, boolean.class, long.class,
068                                            java.util.Map.class, java.util.Map.class,
069                                            java.lang.String.class, java.lang.String.class,
070                                            boolean.class, java.lang.String.class,
071                                            com.liferay.portal.service.ServiceContext.class);
072    
073                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
074                                            privateLayout, parentLayoutId, localeNamesMap,
075                                            localeTitlesMap, description, type, hidden, friendlyURL,
076                                            serviceContext);
077    
078                            Object returnObj = null;
079    
080                            try {
081                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
082                            }
083                            catch (Exception e) {
084                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
085                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
086                                    }
087    
088                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
089                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
090                                    }
091    
092                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
093                            }
094    
095                            return (com.liferay.portal.model.Layout)returnObj;
096                    }
097                    catch (com.liferay.portal.kernel.exception.SystemException se) {
098                            _log.error(se, se);
099    
100                            throw se;
101                    }
102            }
103    
104            public static com.liferay.portal.model.Layout addLayout(
105                    HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
106                    long parentLayoutId, java.lang.String name, java.lang.String title,
107                    java.lang.String description, java.lang.String type, boolean hidden,
108                    java.lang.String friendlyURL,
109                    com.liferay.portal.service.ServiceContext serviceContext)
110                    throws com.liferay.portal.kernel.exception.PortalException,
111                            com.liferay.portal.kernel.exception.SystemException {
112                    try {
113                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
114                                            "addLayout", long.class, boolean.class, long.class,
115                                            java.lang.String.class, java.lang.String.class,
116                                            java.lang.String.class, java.lang.String.class,
117                                            boolean.class, java.lang.String.class,
118                                            com.liferay.portal.service.ServiceContext.class);
119    
120                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
121                                            privateLayout, parentLayoutId, name, title, description,
122                                            type, hidden, friendlyURL, serviceContext);
123    
124                            Object returnObj = null;
125    
126                            try {
127                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
128                            }
129                            catch (Exception e) {
130                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
131                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
132                                    }
133    
134                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
135                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
136                                    }
137    
138                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
139                            }
140    
141                            return (com.liferay.portal.model.Layout)returnObj;
142                    }
143                    catch (com.liferay.portal.kernel.exception.SystemException se) {
144                            _log.error(se, se);
145    
146                            throw se;
147                    }
148            }
149    
150            public static void deleteLayout(HttpPrincipal httpPrincipal, long plid)
151                    throws com.liferay.portal.kernel.exception.PortalException,
152                            com.liferay.portal.kernel.exception.SystemException {
153                    try {
154                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
155                                            "deleteLayout", long.class);
156    
157                            MethodHandler methodHandler = new MethodHandler(methodKey, plid);
158    
159                            try {
160                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
161                            }
162                            catch (Exception e) {
163                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
164                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
165                                    }
166    
167                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
168                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
169                                    }
170    
171                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
172                            }
173                    }
174                    catch (com.liferay.portal.kernel.exception.SystemException se) {
175                            _log.error(se, se);
176    
177                            throw se;
178                    }
179            }
180    
181            public static void deleteLayout(HttpPrincipal httpPrincipal, long groupId,
182                    boolean privateLayout, long layoutId)
183                    throws com.liferay.portal.kernel.exception.PortalException,
184                            com.liferay.portal.kernel.exception.SystemException {
185                    try {
186                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
187                                            "deleteLayout", long.class, boolean.class, long.class);
188    
189                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
190                                            privateLayout, layoutId);
191    
192                            try {
193                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
194                            }
195                            catch (Exception e) {
196                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
197                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
198                                    }
199    
200                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
201                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
202                                    }
203    
204                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
205                            }
206                    }
207                    catch (com.liferay.portal.kernel.exception.SystemException se) {
208                            _log.error(se, se);
209    
210                            throw se;
211                    }
212            }
213    
214            public static byte[] exportLayouts(HttpPrincipal httpPrincipal,
215                    long groupId, boolean privateLayout, long[] layoutIds,
216                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
217                    java.util.Date startDate, java.util.Date endDate)
218                    throws com.liferay.portal.kernel.exception.PortalException,
219                            com.liferay.portal.kernel.exception.SystemException {
220                    try {
221                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
222                                            "exportLayouts", long.class, boolean.class, long[].class,
223                                            java.util.Map.class, java.util.Date.class,
224                                            java.util.Date.class);
225    
226                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
227                                            privateLayout, layoutIds, parameterMap, startDate, endDate);
228    
229                            Object returnObj = null;
230    
231                            try {
232                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
233                            }
234                            catch (Exception e) {
235                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
236                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
237                                    }
238    
239                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
240                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
241                                    }
242    
243                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
244                            }
245    
246                            return (byte[])returnObj;
247                    }
248                    catch (com.liferay.portal.kernel.exception.SystemException se) {
249                            _log.error(se, se);
250    
251                            throw se;
252                    }
253            }
254    
255            public static byte[] exportLayouts(HttpPrincipal httpPrincipal,
256                    long groupId, boolean privateLayout,
257                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
258                    java.util.Date startDate, java.util.Date endDate)
259                    throws com.liferay.portal.kernel.exception.PortalException,
260                            com.liferay.portal.kernel.exception.SystemException {
261                    try {
262                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
263                                            "exportLayouts", long.class, boolean.class,
264                                            java.util.Map.class, java.util.Date.class,
265                                            java.util.Date.class);
266    
267                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
268                                            privateLayout, parameterMap, startDate, endDate);
269    
270                            Object returnObj = null;
271    
272                            try {
273                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
274                            }
275                            catch (Exception e) {
276                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
277                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
278                                    }
279    
280                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
281                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
282                                    }
283    
284                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
285                            }
286    
287                            return (byte[])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 java.io.File exportLayoutsAsFile(
297                    HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
298                    long[] layoutIds,
299                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
300                    java.util.Date startDate, java.util.Date endDate)
301                    throws com.liferay.portal.kernel.exception.PortalException,
302                            com.liferay.portal.kernel.exception.SystemException {
303                    try {
304                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
305                                            "exportLayoutsAsFile", long.class, boolean.class,
306                                            long[].class, java.util.Map.class, java.util.Date.class,
307                                            java.util.Date.class);
308    
309                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
310                                            privateLayout, layoutIds, parameterMap, startDate, endDate);
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                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
323                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
324                                    }
325    
326                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
327                            }
328    
329                            return (java.io.File)returnObj;
330                    }
331                    catch (com.liferay.portal.kernel.exception.SystemException se) {
332                            _log.error(se, se);
333    
334                            throw se;
335                    }
336            }
337    
338            public static byte[] exportPortletInfo(HttpPrincipal httpPrincipal,
339                    long plid, long groupId, java.lang.String portletId,
340                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
341                    java.util.Date startDate, java.util.Date endDate)
342                    throws com.liferay.portal.kernel.exception.PortalException,
343                            com.liferay.portal.kernel.exception.SystemException {
344                    try {
345                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
346                                            "exportPortletInfo", long.class, long.class,
347                                            java.lang.String.class, java.util.Map.class,
348                                            java.util.Date.class, java.util.Date.class);
349    
350                            MethodHandler methodHandler = new MethodHandler(methodKey, plid,
351                                            groupId, portletId, parameterMap, startDate, endDate);
352    
353                            Object returnObj = null;
354    
355                            try {
356                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
357                            }
358                            catch (Exception e) {
359                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
360                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
361                                    }
362    
363                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
364                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
365                                    }
366    
367                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
368                            }
369    
370                            return (byte[])returnObj;
371                    }
372                    catch (com.liferay.portal.kernel.exception.SystemException se) {
373                            _log.error(se, se);
374    
375                            throw se;
376                    }
377            }
378    
379            public static java.io.File exportPortletInfoAsFile(
380                    HttpPrincipal httpPrincipal, long plid, long groupId,
381                    java.lang.String portletId,
382                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
383                    java.util.Date startDate, java.util.Date endDate)
384                    throws com.liferay.portal.kernel.exception.PortalException,
385                            com.liferay.portal.kernel.exception.SystemException {
386                    try {
387                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
388                                            "exportPortletInfoAsFile", long.class, long.class,
389                                            java.lang.String.class, java.util.Map.class,
390                                            java.util.Date.class, java.util.Date.class);
391    
392                            MethodHandler methodHandler = new MethodHandler(methodKey, plid,
393                                            groupId, portletId, parameterMap, startDate, endDate);
394    
395                            Object returnObj = null;
396    
397                            try {
398                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
399                            }
400                            catch (Exception e) {
401                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
402                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
403                                    }
404    
405                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
406                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
407                                    }
408    
409                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
410                            }
411    
412                            return (java.io.File)returnObj;
413                    }
414                    catch (com.liferay.portal.kernel.exception.SystemException se) {
415                            _log.error(se, se);
416    
417                            throw se;
418                    }
419            }
420    
421            public static java.lang.String getLayoutName(HttpPrincipal httpPrincipal,
422                    long groupId, boolean privateLayout, long layoutId,
423                    java.lang.String languageId)
424                    throws com.liferay.portal.kernel.exception.PortalException,
425                            com.liferay.portal.kernel.exception.SystemException {
426                    try {
427                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
428                                            "getLayoutName", long.class, boolean.class, long.class,
429                                            java.lang.String.class);
430    
431                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
432                                            privateLayout, layoutId, languageId);
433    
434                            Object returnObj = null;
435    
436                            try {
437                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
438                            }
439                            catch (Exception e) {
440                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
441                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
442                                    }
443    
444                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
445                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
446                                    }
447    
448                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
449                            }
450    
451                            return (java.lang.String)returnObj;
452                    }
453                    catch (com.liferay.portal.kernel.exception.SystemException se) {
454                            _log.error(se, se);
455    
456                            throw se;
457                    }
458            }
459    
460            public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
461                    HttpPrincipal httpPrincipal, long companyId,
462                    java.lang.String portletId, java.lang.String preferencesKey,
463                    java.lang.String preferencesValue)
464                    throws com.liferay.portal.kernel.exception.SystemException {
465                    try {
466                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
467                                            "getLayoutReferences", long.class, java.lang.String.class,
468                                            java.lang.String.class, java.lang.String.class);
469    
470                            MethodHandler methodHandler = new MethodHandler(methodKey,
471                                            companyId, portletId, preferencesKey, preferencesValue);
472    
473                            Object returnObj = null;
474    
475                            try {
476                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
477                            }
478                            catch (Exception e) {
479                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
480                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
481                                    }
482    
483                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
484                            }
485    
486                            return (com.liferay.portal.model.LayoutReference[])returnObj;
487                    }
488                    catch (com.liferay.portal.kernel.exception.SystemException se) {
489                            _log.error(se, se);
490    
491                            throw se;
492                    }
493            }
494    
495            public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
496                    boolean privateLayout,
497                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
498                    byte[] bytes)
499                    throws com.liferay.portal.kernel.exception.PortalException,
500                            com.liferay.portal.kernel.exception.SystemException {
501                    try {
502                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
503                                            "importLayouts", long.class, boolean.class,
504                                            java.util.Map.class, byte[].class);
505    
506                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
507                                            privateLayout, parameterMap, bytes);
508    
509                            try {
510                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
511                            }
512                            catch (Exception e) {
513                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
514                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
515                                    }
516    
517                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
518                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
519                                    }
520    
521                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
522                            }
523                    }
524                    catch (com.liferay.portal.kernel.exception.SystemException se) {
525                            _log.error(se, se);
526    
527                            throw se;
528                    }
529            }
530    
531            public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
532                    boolean privateLayout,
533                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
534                    java.io.File file)
535                    throws com.liferay.portal.kernel.exception.PortalException,
536                            com.liferay.portal.kernel.exception.SystemException {
537                    try {
538                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
539                                            "importLayouts", long.class, boolean.class,
540                                            java.util.Map.class, java.io.File.class);
541    
542                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
543                                            privateLayout, parameterMap, file);
544    
545                            try {
546                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
547                            }
548                            catch (Exception e) {
549                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
550                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
551                                    }
552    
553                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
554                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
555                                    }
556    
557                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
558                            }
559                    }
560                    catch (com.liferay.portal.kernel.exception.SystemException se) {
561                            _log.error(se, se);
562    
563                            throw se;
564                    }
565            }
566    
567            public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
568                    boolean privateLayout,
569                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
570                    java.io.InputStream is)
571                    throws com.liferay.portal.kernel.exception.PortalException,
572                            com.liferay.portal.kernel.exception.SystemException {
573                    try {
574                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
575                                            "importLayouts", long.class, boolean.class,
576                                            java.util.Map.class, java.io.InputStream.class);
577    
578                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
579                                            privateLayout, parameterMap, is);
580    
581                            try {
582                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
583                            }
584                            catch (Exception e) {
585                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
586                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
587                                    }
588    
589                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
590                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
591                                    }
592    
593                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
594                            }
595                    }
596                    catch (com.liferay.portal.kernel.exception.SystemException se) {
597                            _log.error(se, se);
598    
599                            throw se;
600                    }
601            }
602    
603            public static void importPortletInfo(HttpPrincipal httpPrincipal,
604                    long plid, long groupId, java.lang.String portletId,
605                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
606                    java.io.File file)
607                    throws com.liferay.portal.kernel.exception.PortalException,
608                            com.liferay.portal.kernel.exception.SystemException {
609                    try {
610                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
611                                            "importPortletInfo", long.class, long.class,
612                                            java.lang.String.class, java.util.Map.class,
613                                            java.io.File.class);
614    
615                            MethodHandler methodHandler = new MethodHandler(methodKey, plid,
616                                            groupId, portletId, parameterMap, file);
617    
618                            try {
619                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
620                            }
621                            catch (Exception e) {
622                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
623                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
624                                    }
625    
626                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
627                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
628                                    }
629    
630                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
631                            }
632                    }
633                    catch (com.liferay.portal.kernel.exception.SystemException se) {
634                            _log.error(se, se);
635    
636                            throw se;
637                    }
638            }
639    
640            public static void importPortletInfo(HttpPrincipal httpPrincipal,
641                    long plid, long groupId, java.lang.String portletId,
642                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
643                    java.io.InputStream is)
644                    throws com.liferay.portal.kernel.exception.PortalException,
645                            com.liferay.portal.kernel.exception.SystemException {
646                    try {
647                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
648                                            "importPortletInfo", long.class, long.class,
649                                            java.lang.String.class, java.util.Map.class,
650                                            java.io.InputStream.class);
651    
652                            MethodHandler methodHandler = new MethodHandler(methodKey, plid,
653                                            groupId, portletId, parameterMap, is);
654    
655                            try {
656                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
657                            }
658                            catch (Exception e) {
659                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
660                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
661                                    }
662    
663                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
664                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
665                                    }
666    
667                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
668                            }
669                    }
670                    catch (com.liferay.portal.kernel.exception.SystemException se) {
671                            _log.error(se, se);
672    
673                            throw se;
674                    }
675            }
676    
677            public static void schedulePublishToLive(HttpPrincipal httpPrincipal,
678                    long sourceGroupId, long targetGroupId, boolean privateLayout,
679                    java.util.Map<java.lang.Long, java.lang.Boolean> layoutIdMap,
680                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
681                    java.lang.String scope, java.util.Date startDate,
682                    java.util.Date endDate, java.lang.String groupName,
683                    java.lang.String cronText, java.util.Date schedulerStartDate,
684                    java.util.Date schedulerEndDate, java.lang.String description)
685                    throws com.liferay.portal.kernel.exception.PortalException,
686                            com.liferay.portal.kernel.exception.SystemException {
687                    try {
688                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
689                                            "schedulePublishToLive", long.class, long.class,
690                                            boolean.class, java.util.Map.class, java.util.Map.class,
691                                            java.lang.String.class, java.util.Date.class,
692                                            java.util.Date.class, java.lang.String.class,
693                                            java.lang.String.class, java.util.Date.class,
694                                            java.util.Date.class, java.lang.String.class);
695    
696                            MethodHandler methodHandler = new MethodHandler(methodKey,
697                                            sourceGroupId, targetGroupId, privateLayout, layoutIdMap,
698                                            parameterMap, scope, startDate, endDate, groupName,
699                                            cronText, schedulerStartDate, schedulerEndDate, description);
700    
701                            try {
702                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
703                            }
704                            catch (Exception e) {
705                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
706                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
707                                    }
708    
709                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
710                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
711                                    }
712    
713                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
714                            }
715                    }
716                    catch (com.liferay.portal.kernel.exception.SystemException se) {
717                            _log.error(se, se);
718    
719                            throw se;
720                    }
721            }
722    
723            public static void schedulePublishToRemote(HttpPrincipal httpPrincipal,
724                    long sourceGroupId, boolean privateLayout,
725                    java.util.Map<java.lang.Long, java.lang.Boolean> layoutIdMap,
726                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
727                    java.lang.String remoteAddress, int remotePort,
728                    boolean secureConnection, long remoteGroupId,
729                    boolean remotePrivateLayout, java.util.Date startDate,
730                    java.util.Date endDate, java.lang.String groupName,
731                    java.lang.String cronText, java.util.Date schedulerStartDate,
732                    java.util.Date schedulerEndDate, java.lang.String description)
733                    throws com.liferay.portal.kernel.exception.PortalException,
734                            com.liferay.portal.kernel.exception.SystemException {
735                    try {
736                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
737                                            "schedulePublishToRemote", long.class, boolean.class,
738                                            java.util.Map.class, java.util.Map.class,
739                                            java.lang.String.class, int.class, boolean.class,
740                                            long.class, boolean.class, java.util.Date.class,
741                                            java.util.Date.class, java.lang.String.class,
742                                            java.lang.String.class, java.util.Date.class,
743                                            java.util.Date.class, java.lang.String.class);
744    
745                            MethodHandler methodHandler = new MethodHandler(methodKey,
746                                            sourceGroupId, privateLayout, layoutIdMap, parameterMap,
747                                            remoteAddress, remotePort, secureConnection, remoteGroupId,
748                                            remotePrivateLayout, startDate, endDate, groupName,
749                                            cronText, schedulerStartDate, schedulerEndDate, description);
750    
751                            try {
752                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
753                            }
754                            catch (Exception e) {
755                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
756                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
757                                    }
758    
759                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
760                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
761                                    }
762    
763                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
764                            }
765                    }
766                    catch (com.liferay.portal.kernel.exception.SystemException se) {
767                            _log.error(se, se);
768    
769                            throw se;
770                    }
771            }
772    
773            public static void setLayouts(HttpPrincipal httpPrincipal, long groupId,
774                    boolean privateLayout, long parentLayoutId, long[] layoutIds)
775                    throws com.liferay.portal.kernel.exception.PortalException,
776                            com.liferay.portal.kernel.exception.SystemException {
777                    try {
778                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
779                                            "setLayouts", long.class, boolean.class, long.class,
780                                            long[].class);
781    
782                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
783                                            privateLayout, parentLayoutId, layoutIds);
784    
785                            try {
786                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
787                            }
788                            catch (Exception e) {
789                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
790                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
791                                    }
792    
793                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
794                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
795                                    }
796    
797                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
798                            }
799                    }
800                    catch (com.liferay.portal.kernel.exception.SystemException se) {
801                            _log.error(se, se);
802    
803                            throw se;
804                    }
805            }
806    
807            public static void unschedulePublishToLive(HttpPrincipal httpPrincipal,
808                    long groupId, java.lang.String jobName, java.lang.String groupName)
809                    throws com.liferay.portal.kernel.exception.PortalException,
810                            com.liferay.portal.kernel.exception.SystemException {
811                    try {
812                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
813                                            "unschedulePublishToLive", long.class,
814                                            java.lang.String.class, java.lang.String.class);
815    
816                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
817                                            jobName, groupName);
818    
819                            try {
820                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
821                            }
822                            catch (Exception e) {
823                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
824                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
825                                    }
826    
827                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
828                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
829                                    }
830    
831                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
832                            }
833                    }
834                    catch (com.liferay.portal.kernel.exception.SystemException se) {
835                            _log.error(se, se);
836    
837                            throw se;
838                    }
839            }
840    
841            public static void unschedulePublishToRemote(HttpPrincipal httpPrincipal,
842                    long groupId, java.lang.String jobName, java.lang.String groupName)
843                    throws com.liferay.portal.kernel.exception.PortalException,
844                            com.liferay.portal.kernel.exception.SystemException {
845                    try {
846                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
847                                            "unschedulePublishToRemote", long.class,
848                                            java.lang.String.class, java.lang.String.class);
849    
850                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
851                                            jobName, groupName);
852    
853                            try {
854                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
855                            }
856                            catch (Exception e) {
857                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
858                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
859                                    }
860    
861                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
862                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
863                                    }
864    
865                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
866                            }
867                    }
868                    catch (com.liferay.portal.kernel.exception.SystemException se) {
869                            _log.error(se, se);
870    
871                            throw se;
872                    }
873            }
874    
875            public static com.liferay.portal.model.Layout updateLayout(
876                    HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
877                    long layoutId, long parentLayoutId,
878                    java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
879                    java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
880                    java.lang.String description, java.lang.String type, boolean hidden,
881                    java.lang.String friendlyURL, java.lang.Boolean iconImage,
882                    byte[] iconBytes,
883                    com.liferay.portal.service.ServiceContext serviceContext)
884                    throws com.liferay.portal.kernel.exception.PortalException,
885                            com.liferay.portal.kernel.exception.SystemException {
886                    try {
887                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
888                                            "updateLayout", long.class, boolean.class, long.class,
889                                            long.class, java.util.Map.class, java.util.Map.class,
890                                            java.lang.String.class, java.lang.String.class,
891                                            boolean.class, java.lang.String.class,
892                                            java.lang.Boolean.class, byte[].class,
893                                            com.liferay.portal.service.ServiceContext.class);
894    
895                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
896                                            privateLayout, layoutId, parentLayoutId, localeNamesMap,
897                                            localeTitlesMap, description, type, hidden, friendlyURL,
898                                            iconImage, iconBytes, serviceContext);
899    
900                            Object returnObj = null;
901    
902                            try {
903                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
904                            }
905                            catch (Exception e) {
906                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
907                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
908                                    }
909    
910                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
911                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
912                                    }
913    
914                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
915                            }
916    
917                            return (com.liferay.portal.model.Layout)returnObj;
918                    }
919                    catch (com.liferay.portal.kernel.exception.SystemException se) {
920                            _log.error(se, se);
921    
922                            throw se;
923                    }
924            }
925    
926            public static com.liferay.portal.model.Layout updateLayout(
927                    HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
928                    long layoutId, long parentLayoutId,
929                    java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
930                    java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
931                    java.lang.String description, java.lang.String type, boolean hidden,
932                    java.lang.String friendlyURL,
933                    com.liferay.portal.service.ServiceContext serviceContext)
934                    throws com.liferay.portal.kernel.exception.PortalException,
935                            com.liferay.portal.kernel.exception.SystemException {
936                    try {
937                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
938                                            "updateLayout", long.class, boolean.class, long.class,
939                                            long.class, java.util.Map.class, java.util.Map.class,
940                                            java.lang.String.class, java.lang.String.class,
941                                            boolean.class, java.lang.String.class,
942                                            com.liferay.portal.service.ServiceContext.class);
943    
944                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
945                                            privateLayout, layoutId, parentLayoutId, localeNamesMap,
946                                            localeTitlesMap, description, type, hidden, friendlyURL,
947                                            serviceContext);
948    
949                            Object returnObj = null;
950    
951                            try {
952                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
953                            }
954                            catch (Exception e) {
955                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
956                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
957                                    }
958    
959                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
960                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
961                                    }
962    
963                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
964                            }
965    
966                            return (com.liferay.portal.model.Layout)returnObj;
967                    }
968                    catch (com.liferay.portal.kernel.exception.SystemException se) {
969                            _log.error(se, se);
970    
971                            throw se;
972                    }
973            }
974    
975            public static com.liferay.portal.model.Layout updateLayout(
976                    HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
977                    long layoutId, java.lang.String typeSettings)
978                    throws com.liferay.portal.kernel.exception.PortalException,
979                            com.liferay.portal.kernel.exception.SystemException {
980                    try {
981                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
982                                            "updateLayout", long.class, boolean.class, long.class,
983                                            java.lang.String.class);
984    
985                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
986                                            privateLayout, layoutId, typeSettings);
987    
988                            Object returnObj = null;
989    
990                            try {
991                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
992                            }
993                            catch (Exception e) {
994                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
995                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
996                                    }
997    
998                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
999                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1000                                    }
1001    
1002                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1003                            }
1004    
1005                            return (com.liferay.portal.model.Layout)returnObj;
1006                    }
1007                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1008                            _log.error(se, se);
1009    
1010                            throw se;
1011                    }
1012            }
1013    
1014            public static com.liferay.portal.model.Layout updateLookAndFeel(
1015                    HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1016                    long layoutId, java.lang.String themeId,
1017                    java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme)
1018                    throws com.liferay.portal.kernel.exception.PortalException,
1019                            com.liferay.portal.kernel.exception.SystemException {
1020                    try {
1021                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
1022                                            "updateLookAndFeel", long.class, boolean.class, long.class,
1023                                            java.lang.String.class, java.lang.String.class,
1024                                            java.lang.String.class, boolean.class);
1025    
1026                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
1027                                            privateLayout, layoutId, themeId, colorSchemeId, css,
1028                                            wapTheme);
1029    
1030                            Object returnObj = null;
1031    
1032                            try {
1033                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1034                            }
1035                            catch (Exception e) {
1036                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1037                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1038                                    }
1039    
1040                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1041                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1042                                    }
1043    
1044                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1045                            }
1046    
1047                            return (com.liferay.portal.model.Layout)returnObj;
1048                    }
1049                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1050                            _log.error(se, se);
1051    
1052                            throw se;
1053                    }
1054            }
1055    
1056            public static com.liferay.portal.model.Layout updateName(
1057                    HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1058                    long layoutId, java.lang.String name, java.lang.String languageId)
1059                    throws com.liferay.portal.kernel.exception.PortalException,
1060                            com.liferay.portal.kernel.exception.SystemException {
1061                    try {
1062                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
1063                                            "updateName", long.class, boolean.class, long.class,
1064                                            java.lang.String.class, java.lang.String.class);
1065    
1066                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
1067                                            privateLayout, layoutId, name, languageId);
1068    
1069                            Object returnObj = null;
1070    
1071                            try {
1072                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1073                            }
1074                            catch (Exception e) {
1075                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1076                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1077                                    }
1078    
1079                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1080                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1081                                    }
1082    
1083                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1084                            }
1085    
1086                            return (com.liferay.portal.model.Layout)returnObj;
1087                    }
1088                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1089                            _log.error(se, se);
1090    
1091                            throw se;
1092                    }
1093            }
1094    
1095            public static com.liferay.portal.model.Layout updateName(
1096                    HttpPrincipal httpPrincipal, long plid, java.lang.String name,
1097                    java.lang.String languageId)
1098                    throws com.liferay.portal.kernel.exception.PortalException,
1099                            com.liferay.portal.kernel.exception.SystemException {
1100                    try {
1101                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
1102                                            "updateName", long.class, java.lang.String.class,
1103                                            java.lang.String.class);
1104    
1105                            MethodHandler methodHandler = new MethodHandler(methodKey, plid,
1106                                            name, languageId);
1107    
1108                            Object returnObj = null;
1109    
1110                            try {
1111                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1112                            }
1113                            catch (Exception e) {
1114                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1115                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1116                                    }
1117    
1118                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1119                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1120                                    }
1121    
1122                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1123                            }
1124    
1125                            return (com.liferay.portal.model.Layout)returnObj;
1126                    }
1127                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1128                            _log.error(se, se);
1129    
1130                            throw se;
1131                    }
1132            }
1133    
1134            public static com.liferay.portal.model.Layout updateParentLayoutId(
1135                    HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1136                    long layoutId, long parentLayoutId)
1137                    throws com.liferay.portal.kernel.exception.PortalException,
1138                            com.liferay.portal.kernel.exception.SystemException {
1139                    try {
1140                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
1141                                            "updateParentLayoutId", long.class, boolean.class,
1142                                            long.class, long.class);
1143    
1144                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
1145                                            privateLayout, layoutId, parentLayoutId);
1146    
1147                            Object returnObj = null;
1148    
1149                            try {
1150                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1151                            }
1152                            catch (Exception e) {
1153                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1154                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1155                                    }
1156    
1157                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1158                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1159                                    }
1160    
1161                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1162                            }
1163    
1164                            return (com.liferay.portal.model.Layout)returnObj;
1165                    }
1166                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1167                            _log.error(se, se);
1168    
1169                            throw se;
1170                    }
1171            }
1172    
1173            public static com.liferay.portal.model.Layout updateParentLayoutId(
1174                    HttpPrincipal httpPrincipal, long plid, long parentPlid)
1175                    throws com.liferay.portal.kernel.exception.PortalException,
1176                            com.liferay.portal.kernel.exception.SystemException {
1177                    try {
1178                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
1179                                            "updateParentLayoutId", long.class, long.class);
1180    
1181                            MethodHandler methodHandler = new MethodHandler(methodKey, plid,
1182                                            parentPlid);
1183    
1184                            Object returnObj = null;
1185    
1186                            try {
1187                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1188                            }
1189                            catch (Exception e) {
1190                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1191                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1192                                    }
1193    
1194                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1195                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1196                                    }
1197    
1198                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1199                            }
1200    
1201                            return (com.liferay.portal.model.Layout)returnObj;
1202                    }
1203                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1204                            _log.error(se, se);
1205    
1206                            throw se;
1207                    }
1208            }
1209    
1210            public static com.liferay.portal.model.Layout updatePriority(
1211                    HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1212                    long layoutId, int priority)
1213                    throws com.liferay.portal.kernel.exception.PortalException,
1214                            com.liferay.portal.kernel.exception.SystemException {
1215                    try {
1216                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
1217                                            "updatePriority", long.class, boolean.class, long.class,
1218                                            int.class);
1219    
1220                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
1221                                            privateLayout, layoutId, priority);
1222    
1223                            Object returnObj = null;
1224    
1225                            try {
1226                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1227                            }
1228                            catch (Exception e) {
1229                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1230                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1231                                    }
1232    
1233                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1234                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1235                                    }
1236    
1237                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1238                            }
1239    
1240                            return (com.liferay.portal.model.Layout)returnObj;
1241                    }
1242                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1243                            _log.error(se, se);
1244    
1245                            throw se;
1246                    }
1247            }
1248    
1249            public static com.liferay.portal.model.Layout updatePriority(
1250                    HttpPrincipal httpPrincipal, long plid, int priority)
1251                    throws com.liferay.portal.kernel.exception.PortalException,
1252                            com.liferay.portal.kernel.exception.SystemException {
1253                    try {
1254                            MethodKey methodKey = new MethodKey(LayoutServiceUtil.class.getName(),
1255                                            "updatePriority", long.class, int.class);
1256    
1257                            MethodHandler methodHandler = new MethodHandler(methodKey, plid,
1258                                            priority);
1259    
1260                            Object returnObj = null;
1261    
1262                            try {
1263                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1264                            }
1265                            catch (Exception e) {
1266                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1267                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1268                                    }
1269    
1270                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1271                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1272                                    }
1273    
1274                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1275                            }
1276    
1277                            return (com.liferay.portal.model.Layout)returnObj;
1278                    }
1279                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1280                            _log.error(se, se);
1281    
1282                            throw se;
1283                    }
1284            }
1285    
1286            private static Log _log = LogFactoryUtil.getLog(LayoutServiceHttp.class);
1287    }