1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portal.service.http;
16  
17  import com.liferay.portal.kernel.log.Log;
18  import com.liferay.portal.kernel.log.LogFactoryUtil;
19  import com.liferay.portal.kernel.util.BooleanWrapper;
20  import com.liferay.portal.kernel.util.IntegerWrapper;
21  import com.liferay.portal.kernel.util.LongWrapper;
22  import com.liferay.portal.kernel.util.MethodWrapper;
23  import com.liferay.portal.kernel.util.NullWrapper;
24  import com.liferay.portal.security.auth.HttpPrincipal;
25  import com.liferay.portal.service.LayoutServiceUtil;
26  
27  /**
28   * <a href="LayoutServiceHttp.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class provides a HTTP utility for the
37   * {@link com.liferay.portal.service.LayoutServiceUtil} service utility. The
38   * static methods of this class calls the same methods of the service utility.
39   * However, the signatures are different because it requires an additional
40   * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
41   * </p>
42   *
43   * <p>
44   * The benefits of using the HTTP utility is that it is fast and allows for
45   * tunneling without the cost of serializing to text. The drawback is that it
46   * only works with Java.
47   * </p>
48   *
49   * <p>
50   * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
51   * configure security.
52   * </p>
53   *
54   * <p>
55   * The HTTP utility is only generated for remote services.
56   * </p>
57   *
58   * @author    Brian Wing Shun Chan
59   * @see       LayoutServiceSoap
60   * @see       com.liferay.portal.security.auth.HttpPrincipal
61   * @see       com.liferay.portal.service.LayoutServiceUtil
62   * @generated
63   */
64  public class LayoutServiceHttp {
65      public static com.liferay.portal.model.Layout addLayout(
66          HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
67          long parentLayoutId,
68          java.util.Map<java.util.Locale, String> localeNamesMap,
69          java.util.Map<java.util.Locale, String> localeTitlesMap,
70          java.lang.String description, java.lang.String type, boolean hidden,
71          java.lang.String friendlyURL)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException {
74          try {
75              Object paramObj0 = new LongWrapper(groupId);
76  
77              Object paramObj1 = new BooleanWrapper(privateLayout);
78  
79              Object paramObj2 = new LongWrapper(parentLayoutId);
80  
81              Object paramObj3 = localeNamesMap;
82  
83              if (localeNamesMap == null) {
84                  paramObj3 = new NullWrapper("java.util.Map");
85              }
86  
87              Object paramObj4 = localeTitlesMap;
88  
89              if (localeTitlesMap == null) {
90                  paramObj4 = new NullWrapper("java.util.Map");
91              }
92  
93              Object paramObj5 = description;
94  
95              if (description == null) {
96                  paramObj5 = new NullWrapper("java.lang.String");
97              }
98  
99              Object paramObj6 = type;
100 
101             if (type == null) {
102                 paramObj6 = new NullWrapper("java.lang.String");
103             }
104 
105             Object paramObj7 = new BooleanWrapper(hidden);
106 
107             Object paramObj8 = friendlyURL;
108 
109             if (friendlyURL == null) {
110                 paramObj8 = new NullWrapper("java.lang.String");
111             }
112 
113             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
114                     "addLayout",
115                     new Object[] {
116                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
117                         paramObj5, paramObj6, paramObj7, paramObj8
118                     });
119 
120             Object returnObj = null;
121 
122             try {
123                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
124             }
125             catch (Exception e) {
126                 if (e instanceof com.liferay.portal.PortalException) {
127                     throw (com.liferay.portal.PortalException)e;
128                 }
129 
130                 if (e instanceof com.liferay.portal.SystemException) {
131                     throw (com.liferay.portal.SystemException)e;
132                 }
133 
134                 throw new com.liferay.portal.SystemException(e);
135             }
136 
137             return (com.liferay.portal.model.Layout)returnObj;
138         }
139         catch (com.liferay.portal.SystemException se) {
140             _log.error(se, se);
141 
142             throw se;
143         }
144     }
145 
146     public static com.liferay.portal.model.Layout addLayout(
147         HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
148         long parentLayoutId, java.lang.String name, java.lang.String title,
149         java.lang.String description, java.lang.String type, boolean hidden,
150         java.lang.String friendlyURL)
151         throws com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException {
153         try {
154             Object paramObj0 = new LongWrapper(groupId);
155 
156             Object paramObj1 = new BooleanWrapper(privateLayout);
157 
158             Object paramObj2 = new LongWrapper(parentLayoutId);
159 
160             Object paramObj3 = name;
161 
162             if (name == null) {
163                 paramObj3 = new NullWrapper("java.lang.String");
164             }
165 
166             Object paramObj4 = title;
167 
168             if (title == null) {
169                 paramObj4 = new NullWrapper("java.lang.String");
170             }
171 
172             Object paramObj5 = description;
173 
174             if (description == null) {
175                 paramObj5 = new NullWrapper("java.lang.String");
176             }
177 
178             Object paramObj6 = type;
179 
180             if (type == null) {
181                 paramObj6 = new NullWrapper("java.lang.String");
182             }
183 
184             Object paramObj7 = new BooleanWrapper(hidden);
185 
186             Object paramObj8 = friendlyURL;
187 
188             if (friendlyURL == null) {
189                 paramObj8 = new NullWrapper("java.lang.String");
190             }
191 
192             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
193                     "addLayout",
194                     new Object[] {
195                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
196                         paramObj5, paramObj6, paramObj7, paramObj8
197                     });
198 
199             Object returnObj = null;
200 
201             try {
202                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
203             }
204             catch (Exception e) {
205                 if (e instanceof com.liferay.portal.PortalException) {
206                     throw (com.liferay.portal.PortalException)e;
207                 }
208 
209                 if (e instanceof com.liferay.portal.SystemException) {
210                     throw (com.liferay.portal.SystemException)e;
211                 }
212 
213                 throw new com.liferay.portal.SystemException(e);
214             }
215 
216             return (com.liferay.portal.model.Layout)returnObj;
217         }
218         catch (com.liferay.portal.SystemException se) {
219             _log.error(se, se);
220 
221             throw se;
222         }
223     }
224 
225     public static void deleteLayout(HttpPrincipal httpPrincipal, long plid)
226         throws com.liferay.portal.PortalException,
227             com.liferay.portal.SystemException {
228         try {
229             Object paramObj0 = new LongWrapper(plid);
230 
231             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
232                     "deleteLayout", new Object[] { paramObj0 });
233 
234             try {
235                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
236             }
237             catch (Exception e) {
238                 if (e instanceof com.liferay.portal.PortalException) {
239                     throw (com.liferay.portal.PortalException)e;
240                 }
241 
242                 if (e instanceof com.liferay.portal.SystemException) {
243                     throw (com.liferay.portal.SystemException)e;
244                 }
245 
246                 throw new com.liferay.portal.SystemException(e);
247             }
248         }
249         catch (com.liferay.portal.SystemException se) {
250             _log.error(se, se);
251 
252             throw se;
253         }
254     }
255 
256     public static void deleteLayout(HttpPrincipal httpPrincipal, long groupId,
257         boolean privateLayout, long layoutId)
258         throws com.liferay.portal.PortalException,
259             com.liferay.portal.SystemException {
260         try {
261             Object paramObj0 = new LongWrapper(groupId);
262 
263             Object paramObj1 = new BooleanWrapper(privateLayout);
264 
265             Object paramObj2 = new LongWrapper(layoutId);
266 
267             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
268                     "deleteLayout",
269                     new Object[] { paramObj0, paramObj1, paramObj2 });
270 
271             try {
272                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
273             }
274             catch (Exception e) {
275                 if (e instanceof com.liferay.portal.PortalException) {
276                     throw (com.liferay.portal.PortalException)e;
277                 }
278 
279                 if (e instanceof com.liferay.portal.SystemException) {
280                     throw (com.liferay.portal.SystemException)e;
281                 }
282 
283                 throw new com.liferay.portal.SystemException(e);
284             }
285         }
286         catch (com.liferay.portal.SystemException se) {
287             _log.error(se, se);
288 
289             throw se;
290         }
291     }
292 
293     public static byte[] exportLayouts(HttpPrincipal httpPrincipal,
294         long groupId, boolean privateLayout, long[] layoutIds,
295         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
296         java.util.Date endDate)
297         throws com.liferay.portal.PortalException,
298             com.liferay.portal.SystemException {
299         try {
300             Object paramObj0 = new LongWrapper(groupId);
301 
302             Object paramObj1 = new BooleanWrapper(privateLayout);
303 
304             Object paramObj2 = layoutIds;
305 
306             if (layoutIds == null) {
307                 paramObj2 = new NullWrapper("[J");
308             }
309 
310             Object paramObj3 = parameterMap;
311 
312             if (parameterMap == null) {
313                 paramObj3 = new NullWrapper("java.util.Map");
314             }
315 
316             Object paramObj4 = startDate;
317 
318             if (startDate == null) {
319                 paramObj4 = new NullWrapper("java.util.Date");
320             }
321 
322             Object paramObj5 = endDate;
323 
324             if (endDate == null) {
325                 paramObj5 = new NullWrapper("java.util.Date");
326             }
327 
328             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
329                     "exportLayouts",
330                     new Object[] {
331                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
332                         paramObj5
333                     });
334 
335             Object returnObj = null;
336 
337             try {
338                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
339             }
340             catch (Exception e) {
341                 if (e instanceof com.liferay.portal.PortalException) {
342                     throw (com.liferay.portal.PortalException)e;
343                 }
344 
345                 if (e instanceof com.liferay.portal.SystemException) {
346                     throw (com.liferay.portal.SystemException)e;
347                 }
348 
349                 throw new com.liferay.portal.SystemException(e);
350             }
351 
352             return (byte[])returnObj;
353         }
354         catch (com.liferay.portal.SystemException se) {
355             _log.error(se, se);
356 
357             throw se;
358         }
359     }
360 
361     public static byte[] exportLayouts(HttpPrincipal httpPrincipal,
362         long groupId, boolean privateLayout,
363         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
364         java.util.Date endDate)
365         throws com.liferay.portal.PortalException,
366             com.liferay.portal.SystemException {
367         try {
368             Object paramObj0 = new LongWrapper(groupId);
369 
370             Object paramObj1 = new BooleanWrapper(privateLayout);
371 
372             Object paramObj2 = parameterMap;
373 
374             if (parameterMap == null) {
375                 paramObj2 = new NullWrapper("java.util.Map");
376             }
377 
378             Object paramObj3 = startDate;
379 
380             if (startDate == null) {
381                 paramObj3 = new NullWrapper("java.util.Date");
382             }
383 
384             Object paramObj4 = endDate;
385 
386             if (endDate == null) {
387                 paramObj4 = new NullWrapper("java.util.Date");
388             }
389 
390             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
391                     "exportLayouts",
392                     new Object[] {
393                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
394                     });
395 
396             Object returnObj = null;
397 
398             try {
399                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
400             }
401             catch (Exception e) {
402                 if (e instanceof com.liferay.portal.PortalException) {
403                     throw (com.liferay.portal.PortalException)e;
404                 }
405 
406                 if (e instanceof com.liferay.portal.SystemException) {
407                     throw (com.liferay.portal.SystemException)e;
408                 }
409 
410                 throw new com.liferay.portal.SystemException(e);
411             }
412 
413             return (byte[])returnObj;
414         }
415         catch (com.liferay.portal.SystemException se) {
416             _log.error(se, se);
417 
418             throw se;
419         }
420     }
421 
422     public static java.io.File exportLayoutsAsFile(
423         HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
424         long[] layoutIds, java.util.Map<String, String[]> parameterMap,
425         java.util.Date startDate, java.util.Date endDate)
426         throws com.liferay.portal.PortalException,
427             com.liferay.portal.SystemException {
428         try {
429             Object paramObj0 = new LongWrapper(groupId);
430 
431             Object paramObj1 = new BooleanWrapper(privateLayout);
432 
433             Object paramObj2 = layoutIds;
434 
435             if (layoutIds == null) {
436                 paramObj2 = new NullWrapper("[J");
437             }
438 
439             Object paramObj3 = parameterMap;
440 
441             if (parameterMap == null) {
442                 paramObj3 = new NullWrapper("java.util.Map");
443             }
444 
445             Object paramObj4 = startDate;
446 
447             if (startDate == null) {
448                 paramObj4 = new NullWrapper("java.util.Date");
449             }
450 
451             Object paramObj5 = endDate;
452 
453             if (endDate == null) {
454                 paramObj5 = new NullWrapper("java.util.Date");
455             }
456 
457             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
458                     "exportLayoutsAsFile",
459                     new Object[] {
460                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
461                         paramObj5
462                     });
463 
464             Object returnObj = null;
465 
466             try {
467                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
468             }
469             catch (Exception e) {
470                 if (e instanceof com.liferay.portal.PortalException) {
471                     throw (com.liferay.portal.PortalException)e;
472                 }
473 
474                 if (e instanceof com.liferay.portal.SystemException) {
475                     throw (com.liferay.portal.SystemException)e;
476                 }
477 
478                 throw new com.liferay.portal.SystemException(e);
479             }
480 
481             return (java.io.File)returnObj;
482         }
483         catch (com.liferay.portal.SystemException se) {
484             _log.error(se, se);
485 
486             throw se;
487         }
488     }
489 
490     public static byte[] exportPortletInfo(HttpPrincipal httpPrincipal,
491         long plid, long groupId, java.lang.String portletId,
492         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
493         java.util.Date endDate)
494         throws com.liferay.portal.PortalException,
495             com.liferay.portal.SystemException {
496         try {
497             Object paramObj0 = new LongWrapper(plid);
498 
499             Object paramObj1 = new LongWrapper(groupId);
500 
501             Object paramObj2 = portletId;
502 
503             if (portletId == null) {
504                 paramObj2 = new NullWrapper("java.lang.String");
505             }
506 
507             Object paramObj3 = parameterMap;
508 
509             if (parameterMap == null) {
510                 paramObj3 = new NullWrapper("java.util.Map");
511             }
512 
513             Object paramObj4 = startDate;
514 
515             if (startDate == null) {
516                 paramObj4 = new NullWrapper("java.util.Date");
517             }
518 
519             Object paramObj5 = endDate;
520 
521             if (endDate == null) {
522                 paramObj5 = new NullWrapper("java.util.Date");
523             }
524 
525             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
526                     "exportPortletInfo",
527                     new Object[] {
528                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
529                         paramObj5
530                     });
531 
532             Object returnObj = null;
533 
534             try {
535                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
536             }
537             catch (Exception e) {
538                 if (e instanceof com.liferay.portal.PortalException) {
539                     throw (com.liferay.portal.PortalException)e;
540                 }
541 
542                 if (e instanceof com.liferay.portal.SystemException) {
543                     throw (com.liferay.portal.SystemException)e;
544                 }
545 
546                 throw new com.liferay.portal.SystemException(e);
547             }
548 
549             return (byte[])returnObj;
550         }
551         catch (com.liferay.portal.SystemException se) {
552             _log.error(se, se);
553 
554             throw se;
555         }
556     }
557 
558     public static java.io.File exportPortletInfoAsFile(
559         HttpPrincipal httpPrincipal, long plid, long groupId,
560         java.lang.String portletId,
561         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
562         java.util.Date endDate)
563         throws com.liferay.portal.PortalException,
564             com.liferay.portal.SystemException {
565         try {
566             Object paramObj0 = new LongWrapper(plid);
567 
568             Object paramObj1 = new LongWrapper(groupId);
569 
570             Object paramObj2 = portletId;
571 
572             if (portletId == null) {
573                 paramObj2 = new NullWrapper("java.lang.String");
574             }
575 
576             Object paramObj3 = parameterMap;
577 
578             if (parameterMap == null) {
579                 paramObj3 = new NullWrapper("java.util.Map");
580             }
581 
582             Object paramObj4 = startDate;
583 
584             if (startDate == null) {
585                 paramObj4 = new NullWrapper("java.util.Date");
586             }
587 
588             Object paramObj5 = endDate;
589 
590             if (endDate == null) {
591                 paramObj5 = new NullWrapper("java.util.Date");
592             }
593 
594             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
595                     "exportPortletInfoAsFile",
596                     new Object[] {
597                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
598                         paramObj5
599                     });
600 
601             Object returnObj = null;
602 
603             try {
604                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
605             }
606             catch (Exception e) {
607                 if (e instanceof com.liferay.portal.PortalException) {
608                     throw (com.liferay.portal.PortalException)e;
609                 }
610 
611                 if (e instanceof com.liferay.portal.SystemException) {
612                     throw (com.liferay.portal.SystemException)e;
613                 }
614 
615                 throw new com.liferay.portal.SystemException(e);
616             }
617 
618             return (java.io.File)returnObj;
619         }
620         catch (com.liferay.portal.SystemException se) {
621             _log.error(se, se);
622 
623             throw se;
624         }
625     }
626 
627     public static java.lang.String getLayoutName(HttpPrincipal httpPrincipal,
628         long groupId, boolean privateLayout, long layoutId,
629         java.lang.String languageId)
630         throws com.liferay.portal.PortalException,
631             com.liferay.portal.SystemException {
632         try {
633             Object paramObj0 = new LongWrapper(groupId);
634 
635             Object paramObj1 = new BooleanWrapper(privateLayout);
636 
637             Object paramObj2 = new LongWrapper(layoutId);
638 
639             Object paramObj3 = languageId;
640 
641             if (languageId == null) {
642                 paramObj3 = new NullWrapper("java.lang.String");
643             }
644 
645             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
646                     "getLayoutName",
647                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
648 
649             Object returnObj = null;
650 
651             try {
652                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
653             }
654             catch (Exception e) {
655                 if (e instanceof com.liferay.portal.PortalException) {
656                     throw (com.liferay.portal.PortalException)e;
657                 }
658 
659                 if (e instanceof com.liferay.portal.SystemException) {
660                     throw (com.liferay.portal.SystemException)e;
661                 }
662 
663                 throw new com.liferay.portal.SystemException(e);
664             }
665 
666             return (java.lang.String)returnObj;
667         }
668         catch (com.liferay.portal.SystemException se) {
669             _log.error(se, se);
670 
671             throw se;
672         }
673     }
674 
675     public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
676         HttpPrincipal httpPrincipal, long companyId,
677         java.lang.String portletId, java.lang.String prefsKey,
678         java.lang.String prefsValue) throws com.liferay.portal.SystemException {
679         try {
680             Object paramObj0 = new LongWrapper(companyId);
681 
682             Object paramObj1 = portletId;
683 
684             if (portletId == null) {
685                 paramObj1 = new NullWrapper("java.lang.String");
686             }
687 
688             Object paramObj2 = prefsKey;
689 
690             if (prefsKey == null) {
691                 paramObj2 = new NullWrapper("java.lang.String");
692             }
693 
694             Object paramObj3 = prefsValue;
695 
696             if (prefsValue == null) {
697                 paramObj3 = new NullWrapper("java.lang.String");
698             }
699 
700             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
701                     "getLayoutReferences",
702                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
703 
704             Object returnObj = null;
705 
706             try {
707                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
708             }
709             catch (Exception e) {
710                 if (e instanceof com.liferay.portal.SystemException) {
711                     throw (com.liferay.portal.SystemException)e;
712                 }
713 
714                 throw new com.liferay.portal.SystemException(e);
715             }
716 
717             return (com.liferay.portal.model.LayoutReference[])returnObj;
718         }
719         catch (com.liferay.portal.SystemException se) {
720             _log.error(se, se);
721 
722             throw se;
723         }
724     }
725 
726     public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
727         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
728         byte[] bytes)
729         throws com.liferay.portal.PortalException,
730             com.liferay.portal.SystemException {
731         try {
732             Object paramObj0 = new LongWrapper(groupId);
733 
734             Object paramObj1 = new BooleanWrapper(privateLayout);
735 
736             Object paramObj2 = parameterMap;
737 
738             if (parameterMap == null) {
739                 paramObj2 = new NullWrapper("java.util.Map");
740             }
741 
742             Object paramObj3 = bytes;
743 
744             if (bytes == null) {
745                 paramObj3 = new NullWrapper("[B");
746             }
747 
748             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
749                     "importLayouts",
750                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
751 
752             try {
753                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
754             }
755             catch (Exception e) {
756                 if (e instanceof com.liferay.portal.PortalException) {
757                     throw (com.liferay.portal.PortalException)e;
758                 }
759 
760                 if (e instanceof com.liferay.portal.SystemException) {
761                     throw (com.liferay.portal.SystemException)e;
762                 }
763 
764                 throw new com.liferay.portal.SystemException(e);
765             }
766         }
767         catch (com.liferay.portal.SystemException se) {
768             _log.error(se, se);
769 
770             throw se;
771         }
772     }
773 
774     public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
775         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
776         java.io.File file)
777         throws com.liferay.portal.PortalException,
778             com.liferay.portal.SystemException {
779         try {
780             Object paramObj0 = new LongWrapper(groupId);
781 
782             Object paramObj1 = new BooleanWrapper(privateLayout);
783 
784             Object paramObj2 = parameterMap;
785 
786             if (parameterMap == null) {
787                 paramObj2 = new NullWrapper("java.util.Map");
788             }
789 
790             Object paramObj3 = file;
791 
792             if (file == null) {
793                 paramObj3 = new NullWrapper("java.io.File");
794             }
795 
796             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
797                     "importLayouts",
798                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
799 
800             try {
801                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
802             }
803             catch (Exception e) {
804                 if (e instanceof com.liferay.portal.PortalException) {
805                     throw (com.liferay.portal.PortalException)e;
806                 }
807 
808                 if (e instanceof com.liferay.portal.SystemException) {
809                     throw (com.liferay.portal.SystemException)e;
810                 }
811 
812                 throw new com.liferay.portal.SystemException(e);
813             }
814         }
815         catch (com.liferay.portal.SystemException se) {
816             _log.error(se, se);
817 
818             throw se;
819         }
820     }
821 
822     public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
823         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
824         java.io.InputStream is)
825         throws com.liferay.portal.PortalException,
826             com.liferay.portal.SystemException {
827         try {
828             Object paramObj0 = new LongWrapper(groupId);
829 
830             Object paramObj1 = new BooleanWrapper(privateLayout);
831 
832             Object paramObj2 = parameterMap;
833 
834             if (parameterMap == null) {
835                 paramObj2 = new NullWrapper("java.util.Map");
836             }
837 
838             Object paramObj3 = is;
839 
840             if (is == null) {
841                 paramObj3 = new NullWrapper("java.io.InputStream");
842             }
843 
844             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
845                     "importLayouts",
846                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
847 
848             try {
849                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
850             }
851             catch (Exception e) {
852                 if (e instanceof com.liferay.portal.PortalException) {
853                     throw (com.liferay.portal.PortalException)e;
854                 }
855 
856                 if (e instanceof com.liferay.portal.SystemException) {
857                     throw (com.liferay.portal.SystemException)e;
858                 }
859 
860                 throw new com.liferay.portal.SystemException(e);
861             }
862         }
863         catch (com.liferay.portal.SystemException se) {
864             _log.error(se, se);
865 
866             throw se;
867         }
868     }
869 
870     public static void importPortletInfo(HttpPrincipal httpPrincipal,
871         long plid, long groupId, java.lang.String portletId,
872         java.util.Map<String, String[]> parameterMap, java.io.File file)
873         throws com.liferay.portal.PortalException,
874             com.liferay.portal.SystemException {
875         try {
876             Object paramObj0 = new LongWrapper(plid);
877 
878             Object paramObj1 = new LongWrapper(groupId);
879 
880             Object paramObj2 = portletId;
881 
882             if (portletId == null) {
883                 paramObj2 = new NullWrapper("java.lang.String");
884             }
885 
886             Object paramObj3 = parameterMap;
887 
888             if (parameterMap == null) {
889                 paramObj3 = new NullWrapper("java.util.Map");
890             }
891 
892             Object paramObj4 = file;
893 
894             if (file == null) {
895                 paramObj4 = new NullWrapper("java.io.File");
896             }
897 
898             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
899                     "importPortletInfo",
900                     new Object[] {
901                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
902                     });
903 
904             try {
905                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
906             }
907             catch (Exception e) {
908                 if (e instanceof com.liferay.portal.PortalException) {
909                     throw (com.liferay.portal.PortalException)e;
910                 }
911 
912                 if (e instanceof com.liferay.portal.SystemException) {
913                     throw (com.liferay.portal.SystemException)e;
914                 }
915 
916                 throw new com.liferay.portal.SystemException(e);
917             }
918         }
919         catch (com.liferay.portal.SystemException se) {
920             _log.error(se, se);
921 
922             throw se;
923         }
924     }
925 
926     public static void importPortletInfo(HttpPrincipal httpPrincipal,
927         long plid, long groupId, java.lang.String portletId,
928         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
929         throws com.liferay.portal.PortalException,
930             com.liferay.portal.SystemException {
931         try {
932             Object paramObj0 = new LongWrapper(plid);
933 
934             Object paramObj1 = new LongWrapper(groupId);
935 
936             Object paramObj2 = portletId;
937 
938             if (portletId == null) {
939                 paramObj2 = new NullWrapper("java.lang.String");
940             }
941 
942             Object paramObj3 = parameterMap;
943 
944             if (parameterMap == null) {
945                 paramObj3 = new NullWrapper("java.util.Map");
946             }
947 
948             Object paramObj4 = is;
949 
950             if (is == null) {
951                 paramObj4 = new NullWrapper("java.io.InputStream");
952             }
953 
954             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
955                     "importPortletInfo",
956                     new Object[] {
957                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
958                     });
959 
960             try {
961                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
962             }
963             catch (Exception e) {
964                 if (e instanceof com.liferay.portal.PortalException) {
965                     throw (com.liferay.portal.PortalException)e;
966                 }
967 
968                 if (e instanceof com.liferay.portal.SystemException) {
969                     throw (com.liferay.portal.SystemException)e;
970                 }
971 
972                 throw new com.liferay.portal.SystemException(e);
973             }
974         }
975         catch (com.liferay.portal.SystemException se) {
976             _log.error(se, se);
977 
978             throw se;
979         }
980     }
981 
982     public static void schedulePublishToLive(HttpPrincipal httpPrincipal,
983         long sourceGroupId, long targetGroupId, boolean privateLayout,
984         java.util.Map<Long, Boolean> layoutIdMap,
985         java.util.Map<String, String[]> parameterMap, java.lang.String scope,
986         java.util.Date startDate, java.util.Date endDate,
987         java.lang.String groupName, java.lang.String cronText,
988         java.util.Date schedulerStartDate, java.util.Date schedulerEndDate,
989         java.lang.String description)
990         throws com.liferay.portal.PortalException,
991             com.liferay.portal.SystemException {
992         try {
993             Object paramObj0 = new LongWrapper(sourceGroupId);
994 
995             Object paramObj1 = new LongWrapper(targetGroupId);
996 
997             Object paramObj2 = new BooleanWrapper(privateLayout);
998 
999             Object paramObj3 = layoutIdMap;
1000
1001            if (layoutIdMap == null) {
1002                paramObj3 = new NullWrapper("java.util.Map");
1003            }
1004
1005            Object paramObj4 = parameterMap;
1006
1007            if (parameterMap == null) {
1008                paramObj4 = new NullWrapper("java.util.Map");
1009            }
1010
1011            Object paramObj5 = scope;
1012
1013            if (scope == null) {
1014                paramObj5 = new NullWrapper("java.lang.String");
1015            }
1016
1017            Object paramObj6 = startDate;
1018
1019            if (startDate == null) {
1020                paramObj6 = new NullWrapper("java.util.Date");
1021            }
1022
1023            Object paramObj7 = endDate;
1024
1025            if (endDate == null) {
1026                paramObj7 = new NullWrapper("java.util.Date");
1027            }
1028
1029            Object paramObj8 = groupName;
1030
1031            if (groupName == null) {
1032                paramObj8 = new NullWrapper("java.lang.String");
1033            }
1034
1035            Object paramObj9 = cronText;
1036
1037            if (cronText == null) {
1038                paramObj9 = new NullWrapper("java.lang.String");
1039            }
1040
1041            Object paramObj10 = schedulerStartDate;
1042
1043            if (schedulerStartDate == null) {
1044                paramObj10 = new NullWrapper("java.util.Date");
1045            }
1046
1047            Object paramObj11 = schedulerEndDate;
1048
1049            if (schedulerEndDate == null) {
1050                paramObj11 = new NullWrapper("java.util.Date");
1051            }
1052
1053            Object paramObj12 = description;
1054
1055            if (description == null) {
1056                paramObj12 = new NullWrapper("java.lang.String");
1057            }
1058
1059            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1060                    "schedulePublishToLive",
1061                    new Object[] {
1062                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1063                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1064                        paramObj10, paramObj11, paramObj12
1065                    });
1066
1067            try {
1068                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1069            }
1070            catch (Exception e) {
1071                if (e instanceof com.liferay.portal.PortalException) {
1072                    throw (com.liferay.portal.PortalException)e;
1073                }
1074
1075                if (e instanceof com.liferay.portal.SystemException) {
1076                    throw (com.liferay.portal.SystemException)e;
1077                }
1078
1079                throw new com.liferay.portal.SystemException(e);
1080            }
1081        }
1082        catch (com.liferay.portal.SystemException se) {
1083            _log.error(se, se);
1084
1085            throw se;
1086        }
1087    }
1088
1089    public static void schedulePublishToRemote(HttpPrincipal httpPrincipal,
1090        long sourceGroupId, boolean privateLayout,
1091        java.util.Map<Long, Boolean> layoutIdMap,
1092        java.util.Map<String, String[]> parameterMap,
1093        java.lang.String remoteAddress, int remotePort,
1094        boolean secureConnection, long remoteGroupId,
1095        boolean remotePrivateLayout, java.util.Date startDate,
1096        java.util.Date endDate, java.lang.String groupName,
1097        java.lang.String cronText, java.util.Date schedulerStartDate,
1098        java.util.Date schedulerEndDate, java.lang.String description)
1099        throws com.liferay.portal.PortalException,
1100            com.liferay.portal.SystemException {
1101        try {
1102            Object paramObj0 = new LongWrapper(sourceGroupId);
1103
1104            Object paramObj1 = new BooleanWrapper(privateLayout);
1105
1106            Object paramObj2 = layoutIdMap;
1107
1108            if (layoutIdMap == null) {
1109                paramObj2 = new NullWrapper("java.util.Map");
1110            }
1111
1112            Object paramObj3 = parameterMap;
1113
1114            if (parameterMap == null) {
1115                paramObj3 = new NullWrapper("java.util.Map");
1116            }
1117
1118            Object paramObj4 = remoteAddress;
1119
1120            if (remoteAddress == null) {
1121                paramObj4 = new NullWrapper("java.lang.String");
1122            }
1123
1124            Object paramObj5 = new IntegerWrapper(remotePort);
1125
1126            Object paramObj6 = new BooleanWrapper(secureConnection);
1127
1128            Object paramObj7 = new LongWrapper(remoteGroupId);
1129
1130            Object paramObj8 = new BooleanWrapper(remotePrivateLayout);
1131
1132            Object paramObj9 = startDate;
1133
1134            if (startDate == null) {
1135                paramObj9 = new NullWrapper("java.util.Date");
1136            }
1137
1138            Object paramObj10 = endDate;
1139
1140            if (endDate == null) {
1141                paramObj10 = new NullWrapper("java.util.Date");
1142            }
1143
1144            Object paramObj11 = groupName;
1145
1146            if (groupName == null) {
1147                paramObj11 = new NullWrapper("java.lang.String");
1148            }
1149
1150            Object paramObj12 = cronText;
1151
1152            if (cronText == null) {
1153                paramObj12 = new NullWrapper("java.lang.String");
1154            }
1155
1156            Object paramObj13 = schedulerStartDate;
1157
1158            if (schedulerStartDate == null) {
1159                paramObj13 = new NullWrapper("java.util.Date");
1160            }
1161
1162            Object paramObj14 = schedulerEndDate;
1163
1164            if (schedulerEndDate == null) {
1165                paramObj14 = new NullWrapper("java.util.Date");
1166            }
1167
1168            Object paramObj15 = description;
1169
1170            if (description == null) {
1171                paramObj15 = new NullWrapper("java.lang.String");
1172            }
1173
1174            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1175                    "schedulePublishToRemote",
1176                    new Object[] {
1177                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1178                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1179                        paramObj10, paramObj11, paramObj12, paramObj13,
1180                        paramObj14, paramObj15
1181                    });
1182
1183            try {
1184                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1185            }
1186            catch (Exception e) {
1187                if (e instanceof com.liferay.portal.PortalException) {
1188                    throw (com.liferay.portal.PortalException)e;
1189                }
1190
1191                if (e instanceof com.liferay.portal.SystemException) {
1192                    throw (com.liferay.portal.SystemException)e;
1193                }
1194
1195                throw new com.liferay.portal.SystemException(e);
1196            }
1197        }
1198        catch (com.liferay.portal.SystemException se) {
1199            _log.error(se, se);
1200
1201            throw se;
1202        }
1203    }
1204
1205    public static void setLayouts(HttpPrincipal httpPrincipal, long groupId,
1206        boolean privateLayout, long parentLayoutId, long[] layoutIds)
1207        throws com.liferay.portal.PortalException,
1208            com.liferay.portal.SystemException {
1209        try {
1210            Object paramObj0 = new LongWrapper(groupId);
1211
1212            Object paramObj1 = new BooleanWrapper(privateLayout);
1213
1214            Object paramObj2 = new LongWrapper(parentLayoutId);
1215
1216            Object paramObj3 = layoutIds;
1217
1218            if (layoutIds == null) {
1219                paramObj3 = new NullWrapper("[J");
1220            }
1221
1222            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1223                    "setLayouts",
1224                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1225
1226            try {
1227                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1228            }
1229            catch (Exception e) {
1230                if (e instanceof com.liferay.portal.PortalException) {
1231                    throw (com.liferay.portal.PortalException)e;
1232                }
1233
1234                if (e instanceof com.liferay.portal.SystemException) {
1235                    throw (com.liferay.portal.SystemException)e;
1236                }
1237
1238                throw new com.liferay.portal.SystemException(e);
1239            }
1240        }
1241        catch (com.liferay.portal.SystemException se) {
1242            _log.error(se, se);
1243
1244            throw se;
1245        }
1246    }
1247
1248    public static void unschedulePublishToLive(HttpPrincipal httpPrincipal,
1249        long groupId, java.lang.String jobName, java.lang.String groupName)
1250        throws com.liferay.portal.PortalException,
1251            com.liferay.portal.SystemException {
1252        try {
1253            Object paramObj0 = new LongWrapper(groupId);
1254
1255            Object paramObj1 = jobName;
1256
1257            if (jobName == null) {
1258                paramObj1 = new NullWrapper("java.lang.String");
1259            }
1260
1261            Object paramObj2 = groupName;
1262
1263            if (groupName == null) {
1264                paramObj2 = new NullWrapper("java.lang.String");
1265            }
1266
1267            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1268                    "unschedulePublishToLive",
1269                    new Object[] { paramObj0, paramObj1, paramObj2 });
1270
1271            try {
1272                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1273            }
1274            catch (Exception e) {
1275                if (e instanceof com.liferay.portal.PortalException) {
1276                    throw (com.liferay.portal.PortalException)e;
1277                }
1278
1279                if (e instanceof com.liferay.portal.SystemException) {
1280                    throw (com.liferay.portal.SystemException)e;
1281                }
1282
1283                throw new com.liferay.portal.SystemException(e);
1284            }
1285        }
1286        catch (com.liferay.portal.SystemException se) {
1287            _log.error(se, se);
1288
1289            throw se;
1290        }
1291    }
1292
1293    public static void unschedulePublishToRemote(HttpPrincipal httpPrincipal,
1294        long groupId, java.lang.String jobName, java.lang.String groupName)
1295        throws com.liferay.portal.PortalException,
1296            com.liferay.portal.SystemException {
1297        try {
1298            Object paramObj0 = new LongWrapper(groupId);
1299
1300            Object paramObj1 = jobName;
1301
1302            if (jobName == null) {
1303                paramObj1 = new NullWrapper("java.lang.String");
1304            }
1305
1306            Object paramObj2 = groupName;
1307
1308            if (groupName == null) {
1309                paramObj2 = new NullWrapper("java.lang.String");
1310            }
1311
1312            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1313                    "unschedulePublishToRemote",
1314                    new Object[] { paramObj0, paramObj1, paramObj2 });
1315
1316            try {
1317                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1318            }
1319            catch (Exception e) {
1320                if (e instanceof com.liferay.portal.PortalException) {
1321                    throw (com.liferay.portal.PortalException)e;
1322                }
1323
1324                if (e instanceof com.liferay.portal.SystemException) {
1325                    throw (com.liferay.portal.SystemException)e;
1326                }
1327
1328                throw new com.liferay.portal.SystemException(e);
1329            }
1330        }
1331        catch (com.liferay.portal.SystemException se) {
1332            _log.error(se, se);
1333
1334            throw se;
1335        }
1336    }
1337
1338    public static com.liferay.portal.model.Layout updateLayout(
1339        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1340        long layoutId, long parentLayoutId,
1341        java.util.Map<java.util.Locale, String> localeNamesMap,
1342        java.util.Map<java.util.Locale, String> localeTitlesMap,
1343        java.lang.String description, java.lang.String type, boolean hidden,
1344        java.lang.String friendlyURL)
1345        throws com.liferay.portal.PortalException,
1346            com.liferay.portal.SystemException {
1347        try {
1348            Object paramObj0 = new LongWrapper(groupId);
1349
1350            Object paramObj1 = new BooleanWrapper(privateLayout);
1351
1352            Object paramObj2 = new LongWrapper(layoutId);
1353
1354            Object paramObj3 = new LongWrapper(parentLayoutId);
1355
1356            Object paramObj4 = localeNamesMap;
1357
1358            if (localeNamesMap == null) {
1359                paramObj4 = new NullWrapper("java.util.Map");
1360            }
1361
1362            Object paramObj5 = localeTitlesMap;
1363
1364            if (localeTitlesMap == null) {
1365                paramObj5 = new NullWrapper("java.util.Map");
1366            }
1367
1368            Object paramObj6 = description;
1369
1370            if (description == null) {
1371                paramObj6 = new NullWrapper("java.lang.String");
1372            }
1373
1374            Object paramObj7 = type;
1375
1376            if (type == null) {
1377                paramObj7 = new NullWrapper("java.lang.String");
1378            }
1379
1380            Object paramObj8 = new BooleanWrapper(hidden);
1381
1382            Object paramObj9 = friendlyURL;
1383
1384            if (friendlyURL == null) {
1385                paramObj9 = new NullWrapper("java.lang.String");
1386            }
1387
1388            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1389                    "updateLayout",
1390                    new Object[] {
1391                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1392                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9
1393                    });
1394
1395            Object returnObj = null;
1396
1397            try {
1398                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1399            }
1400            catch (Exception e) {
1401                if (e instanceof com.liferay.portal.PortalException) {
1402                    throw (com.liferay.portal.PortalException)e;
1403                }
1404
1405                if (e instanceof com.liferay.portal.SystemException) {
1406                    throw (com.liferay.portal.SystemException)e;
1407                }
1408
1409                throw new com.liferay.portal.SystemException(e);
1410            }
1411
1412            return (com.liferay.portal.model.Layout)returnObj;
1413        }
1414        catch (com.liferay.portal.SystemException se) {
1415            _log.error(se, se);
1416
1417            throw se;
1418        }
1419    }
1420
1421    public static com.liferay.portal.model.Layout updateLayout(
1422        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1423        long layoutId, long parentLayoutId,
1424        java.util.Map<java.util.Locale, String> localeNamesMap,
1425        java.util.Map<java.util.Locale, String> localeTitlesMap,
1426        java.lang.String description, java.lang.String type, boolean hidden,
1427        java.lang.String friendlyURL, java.lang.Boolean iconImage,
1428        byte[] iconBytes)
1429        throws com.liferay.portal.PortalException,
1430            com.liferay.portal.SystemException {
1431        try {
1432            Object paramObj0 = new LongWrapper(groupId);
1433
1434            Object paramObj1 = new BooleanWrapper(privateLayout);
1435
1436            Object paramObj2 = new LongWrapper(layoutId);
1437
1438            Object paramObj3 = new LongWrapper(parentLayoutId);
1439
1440            Object paramObj4 = localeNamesMap;
1441
1442            if (localeNamesMap == null) {
1443                paramObj4 = new NullWrapper("java.util.Map");
1444            }
1445
1446            Object paramObj5 = localeTitlesMap;
1447
1448            if (localeTitlesMap == null) {
1449                paramObj5 = new NullWrapper("java.util.Map");
1450            }
1451
1452            Object paramObj6 = description;
1453
1454            if (description == null) {
1455                paramObj6 = new NullWrapper("java.lang.String");
1456            }
1457
1458            Object paramObj7 = type;
1459
1460            if (type == null) {
1461                paramObj7 = new NullWrapper("java.lang.String");
1462            }
1463
1464            Object paramObj8 = new BooleanWrapper(hidden);
1465
1466            Object paramObj9 = friendlyURL;
1467
1468            if (friendlyURL == null) {
1469                paramObj9 = new NullWrapper("java.lang.String");
1470            }
1471
1472            Object paramObj10 = iconImage;
1473
1474            if (iconImage == null) {
1475                paramObj10 = new NullWrapper("java.lang.Boolean");
1476            }
1477
1478            Object paramObj11 = iconBytes;
1479
1480            if (iconBytes == null) {
1481                paramObj11 = new NullWrapper("[B");
1482            }
1483
1484            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1485                    "updateLayout",
1486                    new Object[] {
1487                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1488                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1489                        paramObj10, paramObj11
1490                    });
1491
1492            Object returnObj = null;
1493
1494            try {
1495                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1496            }
1497            catch (Exception e) {
1498                if (e instanceof com.liferay.portal.PortalException) {
1499                    throw (com.liferay.portal.PortalException)e;
1500                }
1501
1502                if (e instanceof com.liferay.portal.SystemException) {
1503                    throw (com.liferay.portal.SystemException)e;
1504                }
1505
1506                throw new com.liferay.portal.SystemException(e);
1507            }
1508
1509            return (com.liferay.portal.model.Layout)returnObj;
1510        }
1511        catch (com.liferay.portal.SystemException se) {
1512            _log.error(se, se);
1513
1514            throw se;
1515        }
1516    }
1517
1518    public static com.liferay.portal.model.Layout updateLayout(
1519        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1520        long layoutId, java.lang.String typeSettings)
1521        throws com.liferay.portal.PortalException,
1522            com.liferay.portal.SystemException {
1523        try {
1524            Object paramObj0 = new LongWrapper(groupId);
1525
1526            Object paramObj1 = new BooleanWrapper(privateLayout);
1527
1528            Object paramObj2 = new LongWrapper(layoutId);
1529
1530            Object paramObj3 = typeSettings;
1531
1532            if (typeSettings == null) {
1533                paramObj3 = new NullWrapper("java.lang.String");
1534            }
1535
1536            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1537                    "updateLayout",
1538                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1539
1540            Object returnObj = null;
1541
1542            try {
1543                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1544            }
1545            catch (Exception e) {
1546                if (e instanceof com.liferay.portal.PortalException) {
1547                    throw (com.liferay.portal.PortalException)e;
1548                }
1549
1550                if (e instanceof com.liferay.portal.SystemException) {
1551                    throw (com.liferay.portal.SystemException)e;
1552                }
1553
1554                throw new com.liferay.portal.SystemException(e);
1555            }
1556
1557            return (com.liferay.portal.model.Layout)returnObj;
1558        }
1559        catch (com.liferay.portal.SystemException se) {
1560            _log.error(se, se);
1561
1562            throw se;
1563        }
1564    }
1565
1566    public static com.liferay.portal.model.Layout updateLookAndFeel(
1567        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1568        long layoutId, java.lang.String themeId,
1569        java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme)
1570        throws com.liferay.portal.PortalException,
1571            com.liferay.portal.SystemException {
1572        try {
1573            Object paramObj0 = new LongWrapper(groupId);
1574
1575            Object paramObj1 = new BooleanWrapper(privateLayout);
1576
1577            Object paramObj2 = new LongWrapper(layoutId);
1578
1579            Object paramObj3 = themeId;
1580
1581            if (themeId == null) {
1582                paramObj3 = new NullWrapper("java.lang.String");
1583            }
1584
1585            Object paramObj4 = colorSchemeId;
1586
1587            if (colorSchemeId == null) {
1588                paramObj4 = new NullWrapper("java.lang.String");
1589            }
1590
1591            Object paramObj5 = css;
1592
1593            if (css == null) {
1594                paramObj5 = new NullWrapper("java.lang.String");
1595            }
1596
1597            Object paramObj6 = new BooleanWrapper(wapTheme);
1598
1599            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1600                    "updateLookAndFeel",
1601                    new Object[] {
1602                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1603                        paramObj5, paramObj6
1604                    });
1605
1606            Object returnObj = null;
1607
1608            try {
1609                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1610            }
1611            catch (Exception e) {
1612                if (e instanceof com.liferay.portal.PortalException) {
1613                    throw (com.liferay.portal.PortalException)e;
1614                }
1615
1616                if (e instanceof com.liferay.portal.SystemException) {
1617                    throw (com.liferay.portal.SystemException)e;
1618                }
1619
1620                throw new com.liferay.portal.SystemException(e);
1621            }
1622
1623            return (com.liferay.portal.model.Layout)returnObj;
1624        }
1625        catch (com.liferay.portal.SystemException se) {
1626            _log.error(se, se);
1627
1628            throw se;
1629        }
1630    }
1631
1632    public static com.liferay.portal.model.Layout updateName(
1633        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1634        long layoutId, java.lang.String name, java.lang.String languageId)
1635        throws com.liferay.portal.PortalException,
1636            com.liferay.portal.SystemException {
1637        try {
1638            Object paramObj0 = new LongWrapper(groupId);
1639
1640            Object paramObj1 = new BooleanWrapper(privateLayout);
1641
1642            Object paramObj2 = new LongWrapper(layoutId);
1643
1644            Object paramObj3 = name;
1645
1646            if (name == null) {
1647                paramObj3 = new NullWrapper("java.lang.String");
1648            }
1649
1650            Object paramObj4 = languageId;
1651
1652            if (languageId == null) {
1653                paramObj4 = new NullWrapper("java.lang.String");
1654            }
1655
1656            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1657                    "updateName",
1658                    new Object[] {
1659                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
1660                    });
1661
1662            Object returnObj = null;
1663
1664            try {
1665                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1666            }
1667            catch (Exception e) {
1668                if (e instanceof com.liferay.portal.PortalException) {
1669                    throw (com.liferay.portal.PortalException)e;
1670                }
1671
1672                if (e instanceof com.liferay.portal.SystemException) {
1673                    throw (com.liferay.portal.SystemException)e;
1674                }
1675
1676                throw new com.liferay.portal.SystemException(e);
1677            }
1678
1679            return (com.liferay.portal.model.Layout)returnObj;
1680        }
1681        catch (com.liferay.portal.SystemException se) {
1682            _log.error(se, se);
1683
1684            throw se;
1685        }
1686    }
1687
1688    public static com.liferay.portal.model.Layout updateName(
1689        HttpPrincipal httpPrincipal, long plid, java.lang.String name,
1690        java.lang.String languageId)
1691        throws com.liferay.portal.PortalException,
1692            com.liferay.portal.SystemException {
1693        try {
1694            Object paramObj0 = new LongWrapper(plid);
1695
1696            Object paramObj1 = name;
1697
1698            if (name == null) {
1699                paramObj1 = new NullWrapper("java.lang.String");
1700            }
1701
1702            Object paramObj2 = languageId;
1703
1704            if (languageId == null) {
1705                paramObj2 = new NullWrapper("java.lang.String");
1706            }
1707
1708            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1709                    "updateName",
1710                    new Object[] { paramObj0, paramObj1, paramObj2 });
1711
1712            Object returnObj = null;
1713
1714            try {
1715                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1716            }
1717            catch (Exception e) {
1718                if (e instanceof com.liferay.portal.PortalException) {
1719                    throw (com.liferay.portal.PortalException)e;
1720                }
1721
1722                if (e instanceof com.liferay.portal.SystemException) {
1723                    throw (com.liferay.portal.SystemException)e;
1724                }
1725
1726                throw new com.liferay.portal.SystemException(e);
1727            }
1728
1729            return (com.liferay.portal.model.Layout)returnObj;
1730        }
1731        catch (com.liferay.portal.SystemException se) {
1732            _log.error(se, se);
1733
1734            throw se;
1735        }
1736    }
1737
1738    public static com.liferay.portal.model.Layout updateParentLayoutId(
1739        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1740        long layoutId, long parentLayoutId)
1741        throws com.liferay.portal.PortalException,
1742            com.liferay.portal.SystemException {
1743        try {
1744            Object paramObj0 = new LongWrapper(groupId);
1745
1746            Object paramObj1 = new BooleanWrapper(privateLayout);
1747
1748            Object paramObj2 = new LongWrapper(layoutId);
1749
1750            Object paramObj3 = new LongWrapper(parentLayoutId);
1751
1752            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1753                    "updateParentLayoutId",
1754                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1755
1756            Object returnObj = null;
1757
1758            try {
1759                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1760            }
1761            catch (Exception e) {
1762                if (e instanceof com.liferay.portal.PortalException) {
1763                    throw (com.liferay.portal.PortalException)e;
1764                }
1765
1766                if (e instanceof com.liferay.portal.SystemException) {
1767                    throw (com.liferay.portal.SystemException)e;
1768                }
1769
1770                throw new com.liferay.portal.SystemException(e);
1771            }
1772
1773            return (com.liferay.portal.model.Layout)returnObj;
1774        }
1775        catch (com.liferay.portal.SystemException se) {
1776            _log.error(se, se);
1777
1778            throw se;
1779        }
1780    }
1781
1782    public static com.liferay.portal.model.Layout updateParentLayoutId(
1783        HttpPrincipal httpPrincipal, long plid, long parentPlid)
1784        throws com.liferay.portal.PortalException,
1785            com.liferay.portal.SystemException {
1786        try {
1787            Object paramObj0 = new LongWrapper(plid);
1788
1789            Object paramObj1 = new LongWrapper(parentPlid);
1790
1791            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1792                    "updateParentLayoutId",
1793                    new Object[] { paramObj0, paramObj1 });
1794
1795            Object returnObj = null;
1796
1797            try {
1798                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1799            }
1800            catch (Exception e) {
1801                if (e instanceof com.liferay.portal.PortalException) {
1802                    throw (com.liferay.portal.PortalException)e;
1803                }
1804
1805                if (e instanceof com.liferay.portal.SystemException) {
1806                    throw (com.liferay.portal.SystemException)e;
1807                }
1808
1809                throw new com.liferay.portal.SystemException(e);
1810            }
1811
1812            return (com.liferay.portal.model.Layout)returnObj;
1813        }
1814        catch (com.liferay.portal.SystemException se) {
1815            _log.error(se, se);
1816
1817            throw se;
1818        }
1819    }
1820
1821    public static com.liferay.portal.model.Layout updatePriority(
1822        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1823        long layoutId, int priority)
1824        throws com.liferay.portal.PortalException,
1825            com.liferay.portal.SystemException {
1826        try {
1827            Object paramObj0 = new LongWrapper(groupId);
1828
1829            Object paramObj1 = new BooleanWrapper(privateLayout);
1830
1831            Object paramObj2 = new LongWrapper(layoutId);
1832
1833            Object paramObj3 = new IntegerWrapper(priority);
1834
1835            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1836                    "updatePriority",
1837                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1838
1839            Object returnObj = null;
1840
1841            try {
1842                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1843            }
1844            catch (Exception e) {
1845                if (e instanceof com.liferay.portal.PortalException) {
1846                    throw (com.liferay.portal.PortalException)e;
1847                }
1848
1849                if (e instanceof com.liferay.portal.SystemException) {
1850                    throw (com.liferay.portal.SystemException)e;
1851                }
1852
1853                throw new com.liferay.portal.SystemException(e);
1854            }
1855
1856            return (com.liferay.portal.model.Layout)returnObj;
1857        }
1858        catch (com.liferay.portal.SystemException se) {
1859            _log.error(se, se);
1860
1861            throw se;
1862        }
1863    }
1864
1865    public static com.liferay.portal.model.Layout updatePriority(
1866        HttpPrincipal httpPrincipal, long plid, int priority)
1867        throws com.liferay.portal.PortalException,
1868            com.liferay.portal.SystemException {
1869        try {
1870            Object paramObj0 = new LongWrapper(plid);
1871
1872            Object paramObj1 = new IntegerWrapper(priority);
1873
1874            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1875                    "updatePriority", new Object[] { paramObj0, paramObj1 });
1876
1877            Object returnObj = null;
1878
1879            try {
1880                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1881            }
1882            catch (Exception e) {
1883                if (e instanceof com.liferay.portal.PortalException) {
1884                    throw (com.liferay.portal.PortalException)e;
1885                }
1886
1887                if (e instanceof com.liferay.portal.SystemException) {
1888                    throw (com.liferay.portal.SystemException)e;
1889                }
1890
1891                throw new com.liferay.portal.SystemException(e);
1892            }
1893
1894            return (com.liferay.portal.model.Layout)returnObj;
1895        }
1896        catch (com.liferay.portal.SystemException se) {
1897            _log.error(se, se);
1898
1899            throw se;
1900        }
1901    }
1902
1903    private static Log _log = LogFactoryUtil.getLog(LayoutServiceHttp.class);
1904}