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 preferencesKey,
678         java.lang.String preferencesValue)
679         throws com.liferay.portal.SystemException {
680         try {
681             Object paramObj0 = new LongWrapper(companyId);
682 
683             Object paramObj1 = portletId;
684 
685             if (portletId == null) {
686                 paramObj1 = new NullWrapper("java.lang.String");
687             }
688 
689             Object paramObj2 = preferencesKey;
690 
691             if (preferencesKey == null) {
692                 paramObj2 = new NullWrapper("java.lang.String");
693             }
694 
695             Object paramObj3 = preferencesValue;
696 
697             if (preferencesValue == null) {
698                 paramObj3 = new NullWrapper("java.lang.String");
699             }
700 
701             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
702                     "getLayoutReferences",
703                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
704 
705             Object returnObj = null;
706 
707             try {
708                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
709             }
710             catch (Exception e) {
711                 if (e instanceof com.liferay.portal.SystemException) {
712                     throw (com.liferay.portal.SystemException)e;
713                 }
714 
715                 throw new com.liferay.portal.SystemException(e);
716             }
717 
718             return (com.liferay.portal.model.LayoutReference[])returnObj;
719         }
720         catch (com.liferay.portal.SystemException se) {
721             _log.error(se, se);
722 
723             throw se;
724         }
725     }
726 
727     public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
728         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
729         byte[] bytes)
730         throws com.liferay.portal.PortalException,
731             com.liferay.portal.SystemException {
732         try {
733             Object paramObj0 = new LongWrapper(groupId);
734 
735             Object paramObj1 = new BooleanWrapper(privateLayout);
736 
737             Object paramObj2 = parameterMap;
738 
739             if (parameterMap == null) {
740                 paramObj2 = new NullWrapper("java.util.Map");
741             }
742 
743             Object paramObj3 = bytes;
744 
745             if (bytes == null) {
746                 paramObj3 = new NullWrapper("[B");
747             }
748 
749             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
750                     "importLayouts",
751                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
752 
753             try {
754                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
755             }
756             catch (Exception e) {
757                 if (e instanceof com.liferay.portal.PortalException) {
758                     throw (com.liferay.portal.PortalException)e;
759                 }
760 
761                 if (e instanceof com.liferay.portal.SystemException) {
762                     throw (com.liferay.portal.SystemException)e;
763                 }
764 
765                 throw new com.liferay.portal.SystemException(e);
766             }
767         }
768         catch (com.liferay.portal.SystemException se) {
769             _log.error(se, se);
770 
771             throw se;
772         }
773     }
774 
775     public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
776         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
777         java.io.File file)
778         throws com.liferay.portal.PortalException,
779             com.liferay.portal.SystemException {
780         try {
781             Object paramObj0 = new LongWrapper(groupId);
782 
783             Object paramObj1 = new BooleanWrapper(privateLayout);
784 
785             Object paramObj2 = parameterMap;
786 
787             if (parameterMap == null) {
788                 paramObj2 = new NullWrapper("java.util.Map");
789             }
790 
791             Object paramObj3 = file;
792 
793             if (file == null) {
794                 paramObj3 = new NullWrapper("java.io.File");
795             }
796 
797             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
798                     "importLayouts",
799                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
800 
801             try {
802                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
803             }
804             catch (Exception e) {
805                 if (e instanceof com.liferay.portal.PortalException) {
806                     throw (com.liferay.portal.PortalException)e;
807                 }
808 
809                 if (e instanceof com.liferay.portal.SystemException) {
810                     throw (com.liferay.portal.SystemException)e;
811                 }
812 
813                 throw new com.liferay.portal.SystemException(e);
814             }
815         }
816         catch (com.liferay.portal.SystemException se) {
817             _log.error(se, se);
818 
819             throw se;
820         }
821     }
822 
823     public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
824         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
825         java.io.InputStream is)
826         throws com.liferay.portal.PortalException,
827             com.liferay.portal.SystemException {
828         try {
829             Object paramObj0 = new LongWrapper(groupId);
830 
831             Object paramObj1 = new BooleanWrapper(privateLayout);
832 
833             Object paramObj2 = parameterMap;
834 
835             if (parameterMap == null) {
836                 paramObj2 = new NullWrapper("java.util.Map");
837             }
838 
839             Object paramObj3 = is;
840 
841             if (is == null) {
842                 paramObj3 = new NullWrapper("java.io.InputStream");
843             }
844 
845             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
846                     "importLayouts",
847                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
848 
849             try {
850                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
851             }
852             catch (Exception e) {
853                 if (e instanceof com.liferay.portal.PortalException) {
854                     throw (com.liferay.portal.PortalException)e;
855                 }
856 
857                 if (e instanceof com.liferay.portal.SystemException) {
858                     throw (com.liferay.portal.SystemException)e;
859                 }
860 
861                 throw new com.liferay.portal.SystemException(e);
862             }
863         }
864         catch (com.liferay.portal.SystemException se) {
865             _log.error(se, se);
866 
867             throw se;
868         }
869     }
870 
871     public static void importPortletInfo(HttpPrincipal httpPrincipal,
872         long plid, long groupId, java.lang.String portletId,
873         java.util.Map<String, String[]> parameterMap, java.io.File file)
874         throws com.liferay.portal.PortalException,
875             com.liferay.portal.SystemException {
876         try {
877             Object paramObj0 = new LongWrapper(plid);
878 
879             Object paramObj1 = new LongWrapper(groupId);
880 
881             Object paramObj2 = portletId;
882 
883             if (portletId == null) {
884                 paramObj2 = new NullWrapper("java.lang.String");
885             }
886 
887             Object paramObj3 = parameterMap;
888 
889             if (parameterMap == null) {
890                 paramObj3 = new NullWrapper("java.util.Map");
891             }
892 
893             Object paramObj4 = file;
894 
895             if (file == null) {
896                 paramObj4 = new NullWrapper("java.io.File");
897             }
898 
899             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
900                     "importPortletInfo",
901                     new Object[] {
902                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
903                     });
904 
905             try {
906                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
907             }
908             catch (Exception e) {
909                 if (e instanceof com.liferay.portal.PortalException) {
910                     throw (com.liferay.portal.PortalException)e;
911                 }
912 
913                 if (e instanceof com.liferay.portal.SystemException) {
914                     throw (com.liferay.portal.SystemException)e;
915                 }
916 
917                 throw new com.liferay.portal.SystemException(e);
918             }
919         }
920         catch (com.liferay.portal.SystemException se) {
921             _log.error(se, se);
922 
923             throw se;
924         }
925     }
926 
927     public static void importPortletInfo(HttpPrincipal httpPrincipal,
928         long plid, long groupId, java.lang.String portletId,
929         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
930         throws com.liferay.portal.PortalException,
931             com.liferay.portal.SystemException {
932         try {
933             Object paramObj0 = new LongWrapper(plid);
934 
935             Object paramObj1 = new LongWrapper(groupId);
936 
937             Object paramObj2 = portletId;
938 
939             if (portletId == null) {
940                 paramObj2 = new NullWrapper("java.lang.String");
941             }
942 
943             Object paramObj3 = parameterMap;
944 
945             if (parameterMap == null) {
946                 paramObj3 = new NullWrapper("java.util.Map");
947             }
948 
949             Object paramObj4 = is;
950 
951             if (is == null) {
952                 paramObj4 = new NullWrapper("java.io.InputStream");
953             }
954 
955             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
956                     "importPortletInfo",
957                     new Object[] {
958                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
959                     });
960 
961             try {
962                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
963             }
964             catch (Exception e) {
965                 if (e instanceof com.liferay.portal.PortalException) {
966                     throw (com.liferay.portal.PortalException)e;
967                 }
968 
969                 if (e instanceof com.liferay.portal.SystemException) {
970                     throw (com.liferay.portal.SystemException)e;
971                 }
972 
973                 throw new com.liferay.portal.SystemException(e);
974             }
975         }
976         catch (com.liferay.portal.SystemException se) {
977             _log.error(se, se);
978 
979             throw se;
980         }
981     }
982 
983     public static void schedulePublishToLive(HttpPrincipal httpPrincipal,
984         long sourceGroupId, long targetGroupId, boolean privateLayout,
985         java.util.Map<Long, Boolean> layoutIdMap,
986         java.util.Map<String, String[]> parameterMap, java.lang.String scope,
987         java.util.Date startDate, java.util.Date endDate,
988         java.lang.String groupName, java.lang.String cronText,
989         java.util.Date schedulerStartDate, java.util.Date schedulerEndDate,
990         java.lang.String description)
991         throws com.liferay.portal.PortalException,
992             com.liferay.portal.SystemException {
993         try {
994             Object paramObj0 = new LongWrapper(sourceGroupId);
995 
996             Object paramObj1 = new LongWrapper(targetGroupId);
997 
998             Object paramObj2 = new BooleanWrapper(privateLayout);
999 
1000            Object paramObj3 = layoutIdMap;
1001
1002            if (layoutIdMap == null) {
1003                paramObj3 = new NullWrapper("java.util.Map");
1004            }
1005
1006            Object paramObj4 = parameterMap;
1007
1008            if (parameterMap == null) {
1009                paramObj4 = new NullWrapper("java.util.Map");
1010            }
1011
1012            Object paramObj5 = scope;
1013
1014            if (scope == null) {
1015                paramObj5 = new NullWrapper("java.lang.String");
1016            }
1017
1018            Object paramObj6 = startDate;
1019
1020            if (startDate == null) {
1021                paramObj6 = new NullWrapper("java.util.Date");
1022            }
1023
1024            Object paramObj7 = endDate;
1025
1026            if (endDate == null) {
1027                paramObj7 = new NullWrapper("java.util.Date");
1028            }
1029
1030            Object paramObj8 = groupName;
1031
1032            if (groupName == null) {
1033                paramObj8 = new NullWrapper("java.lang.String");
1034            }
1035
1036            Object paramObj9 = cronText;
1037
1038            if (cronText == null) {
1039                paramObj9 = new NullWrapper("java.lang.String");
1040            }
1041
1042            Object paramObj10 = schedulerStartDate;
1043
1044            if (schedulerStartDate == null) {
1045                paramObj10 = new NullWrapper("java.util.Date");
1046            }
1047
1048            Object paramObj11 = schedulerEndDate;
1049
1050            if (schedulerEndDate == null) {
1051                paramObj11 = new NullWrapper("java.util.Date");
1052            }
1053
1054            Object paramObj12 = description;
1055
1056            if (description == null) {
1057                paramObj12 = new NullWrapper("java.lang.String");
1058            }
1059
1060            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1061                    "schedulePublishToLive",
1062                    new Object[] {
1063                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1064                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1065                        paramObj10, paramObj11, paramObj12
1066                    });
1067
1068            try {
1069                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1070            }
1071            catch (Exception e) {
1072                if (e instanceof com.liferay.portal.PortalException) {
1073                    throw (com.liferay.portal.PortalException)e;
1074                }
1075
1076                if (e instanceof com.liferay.portal.SystemException) {
1077                    throw (com.liferay.portal.SystemException)e;
1078                }
1079
1080                throw new com.liferay.portal.SystemException(e);
1081            }
1082        }
1083        catch (com.liferay.portal.SystemException se) {
1084            _log.error(se, se);
1085
1086            throw se;
1087        }
1088    }
1089
1090    public static void schedulePublishToRemote(HttpPrincipal httpPrincipal,
1091        long sourceGroupId, boolean privateLayout,
1092        java.util.Map<Long, Boolean> layoutIdMap,
1093        java.util.Map<String, String[]> parameterMap,
1094        java.lang.String remoteAddress, int remotePort,
1095        boolean secureConnection, long remoteGroupId,
1096        boolean remotePrivateLayout, java.util.Date startDate,
1097        java.util.Date endDate, java.lang.String groupName,
1098        java.lang.String cronText, java.util.Date schedulerStartDate,
1099        java.util.Date schedulerEndDate, java.lang.String description)
1100        throws com.liferay.portal.PortalException,
1101            com.liferay.portal.SystemException {
1102        try {
1103            Object paramObj0 = new LongWrapper(sourceGroupId);
1104
1105            Object paramObj1 = new BooleanWrapper(privateLayout);
1106
1107            Object paramObj2 = layoutIdMap;
1108
1109            if (layoutIdMap == null) {
1110                paramObj2 = new NullWrapper("java.util.Map");
1111            }
1112
1113            Object paramObj3 = parameterMap;
1114
1115            if (parameterMap == null) {
1116                paramObj3 = new NullWrapper("java.util.Map");
1117            }
1118
1119            Object paramObj4 = remoteAddress;
1120
1121            if (remoteAddress == null) {
1122                paramObj4 = new NullWrapper("java.lang.String");
1123            }
1124
1125            Object paramObj5 = new IntegerWrapper(remotePort);
1126
1127            Object paramObj6 = new BooleanWrapper(secureConnection);
1128
1129            Object paramObj7 = new LongWrapper(remoteGroupId);
1130
1131            Object paramObj8 = new BooleanWrapper(remotePrivateLayout);
1132
1133            Object paramObj9 = startDate;
1134
1135            if (startDate == null) {
1136                paramObj9 = new NullWrapper("java.util.Date");
1137            }
1138
1139            Object paramObj10 = endDate;
1140
1141            if (endDate == null) {
1142                paramObj10 = new NullWrapper("java.util.Date");
1143            }
1144
1145            Object paramObj11 = groupName;
1146
1147            if (groupName == null) {
1148                paramObj11 = new NullWrapper("java.lang.String");
1149            }
1150
1151            Object paramObj12 = cronText;
1152
1153            if (cronText == null) {
1154                paramObj12 = new NullWrapper("java.lang.String");
1155            }
1156
1157            Object paramObj13 = schedulerStartDate;
1158
1159            if (schedulerStartDate == null) {
1160                paramObj13 = new NullWrapper("java.util.Date");
1161            }
1162
1163            Object paramObj14 = schedulerEndDate;
1164
1165            if (schedulerEndDate == null) {
1166                paramObj14 = new NullWrapper("java.util.Date");
1167            }
1168
1169            Object paramObj15 = description;
1170
1171            if (description == null) {
1172                paramObj15 = new NullWrapper("java.lang.String");
1173            }
1174
1175            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1176                    "schedulePublishToRemote",
1177                    new Object[] {
1178                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1179                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1180                        paramObj10, paramObj11, paramObj12, paramObj13,
1181                        paramObj14, paramObj15
1182                    });
1183
1184            try {
1185                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1186            }
1187            catch (Exception e) {
1188                if (e instanceof com.liferay.portal.PortalException) {
1189                    throw (com.liferay.portal.PortalException)e;
1190                }
1191
1192                if (e instanceof com.liferay.portal.SystemException) {
1193                    throw (com.liferay.portal.SystemException)e;
1194                }
1195
1196                throw new com.liferay.portal.SystemException(e);
1197            }
1198        }
1199        catch (com.liferay.portal.SystemException se) {
1200            _log.error(se, se);
1201
1202            throw se;
1203        }
1204    }
1205
1206    public static void setLayouts(HttpPrincipal httpPrincipal, long groupId,
1207        boolean privateLayout, long parentLayoutId, long[] layoutIds)
1208        throws com.liferay.portal.PortalException,
1209            com.liferay.portal.SystemException {
1210        try {
1211            Object paramObj0 = new LongWrapper(groupId);
1212
1213            Object paramObj1 = new BooleanWrapper(privateLayout);
1214
1215            Object paramObj2 = new LongWrapper(parentLayoutId);
1216
1217            Object paramObj3 = layoutIds;
1218
1219            if (layoutIds == null) {
1220                paramObj3 = new NullWrapper("[J");
1221            }
1222
1223            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1224                    "setLayouts",
1225                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1226
1227            try {
1228                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1229            }
1230            catch (Exception e) {
1231                if (e instanceof com.liferay.portal.PortalException) {
1232                    throw (com.liferay.portal.PortalException)e;
1233                }
1234
1235                if (e instanceof com.liferay.portal.SystemException) {
1236                    throw (com.liferay.portal.SystemException)e;
1237                }
1238
1239                throw new com.liferay.portal.SystemException(e);
1240            }
1241        }
1242        catch (com.liferay.portal.SystemException se) {
1243            _log.error(se, se);
1244
1245            throw se;
1246        }
1247    }
1248
1249    public static void unschedulePublishToLive(HttpPrincipal httpPrincipal,
1250        long groupId, java.lang.String jobName, java.lang.String groupName)
1251        throws com.liferay.portal.PortalException,
1252            com.liferay.portal.SystemException {
1253        try {
1254            Object paramObj0 = new LongWrapper(groupId);
1255
1256            Object paramObj1 = jobName;
1257
1258            if (jobName == null) {
1259                paramObj1 = new NullWrapper("java.lang.String");
1260            }
1261
1262            Object paramObj2 = groupName;
1263
1264            if (groupName == null) {
1265                paramObj2 = new NullWrapper("java.lang.String");
1266            }
1267
1268            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1269                    "unschedulePublishToLive",
1270                    new Object[] { paramObj0, paramObj1, paramObj2 });
1271
1272            try {
1273                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1274            }
1275            catch (Exception e) {
1276                if (e instanceof com.liferay.portal.PortalException) {
1277                    throw (com.liferay.portal.PortalException)e;
1278                }
1279
1280                if (e instanceof com.liferay.portal.SystemException) {
1281                    throw (com.liferay.portal.SystemException)e;
1282                }
1283
1284                throw new com.liferay.portal.SystemException(e);
1285            }
1286        }
1287        catch (com.liferay.portal.SystemException se) {
1288            _log.error(se, se);
1289
1290            throw se;
1291        }
1292    }
1293
1294    public static void unschedulePublishToRemote(HttpPrincipal httpPrincipal,
1295        long groupId, java.lang.String jobName, java.lang.String groupName)
1296        throws com.liferay.portal.PortalException,
1297            com.liferay.portal.SystemException {
1298        try {
1299            Object paramObj0 = new LongWrapper(groupId);
1300
1301            Object paramObj1 = jobName;
1302
1303            if (jobName == null) {
1304                paramObj1 = new NullWrapper("java.lang.String");
1305            }
1306
1307            Object paramObj2 = groupName;
1308
1309            if (groupName == null) {
1310                paramObj2 = new NullWrapper("java.lang.String");
1311            }
1312
1313            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1314                    "unschedulePublishToRemote",
1315                    new Object[] { paramObj0, paramObj1, paramObj2 });
1316
1317            try {
1318                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1319            }
1320            catch (Exception e) {
1321                if (e instanceof com.liferay.portal.PortalException) {
1322                    throw (com.liferay.portal.PortalException)e;
1323                }
1324
1325                if (e instanceof com.liferay.portal.SystemException) {
1326                    throw (com.liferay.portal.SystemException)e;
1327                }
1328
1329                throw new com.liferay.portal.SystemException(e);
1330            }
1331        }
1332        catch (com.liferay.portal.SystemException se) {
1333            _log.error(se, se);
1334
1335            throw se;
1336        }
1337    }
1338
1339    public static com.liferay.portal.model.Layout updateLayout(
1340        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1341        long layoutId, long parentLayoutId,
1342        java.util.Map<java.util.Locale, String> localeNamesMap,
1343        java.util.Map<java.util.Locale, String> localeTitlesMap,
1344        java.lang.String description, java.lang.String type, boolean hidden,
1345        java.lang.String friendlyURL)
1346        throws com.liferay.portal.PortalException,
1347            com.liferay.portal.SystemException {
1348        try {
1349            Object paramObj0 = new LongWrapper(groupId);
1350
1351            Object paramObj1 = new BooleanWrapper(privateLayout);
1352
1353            Object paramObj2 = new LongWrapper(layoutId);
1354
1355            Object paramObj3 = new LongWrapper(parentLayoutId);
1356
1357            Object paramObj4 = localeNamesMap;
1358
1359            if (localeNamesMap == null) {
1360                paramObj4 = new NullWrapper("java.util.Map");
1361            }
1362
1363            Object paramObj5 = localeTitlesMap;
1364
1365            if (localeTitlesMap == null) {
1366                paramObj5 = new NullWrapper("java.util.Map");
1367            }
1368
1369            Object paramObj6 = description;
1370
1371            if (description == null) {
1372                paramObj6 = new NullWrapper("java.lang.String");
1373            }
1374
1375            Object paramObj7 = type;
1376
1377            if (type == null) {
1378                paramObj7 = new NullWrapper("java.lang.String");
1379            }
1380
1381            Object paramObj8 = new BooleanWrapper(hidden);
1382
1383            Object paramObj9 = friendlyURL;
1384
1385            if (friendlyURL == null) {
1386                paramObj9 = new NullWrapper("java.lang.String");
1387            }
1388
1389            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1390                    "updateLayout",
1391                    new Object[] {
1392                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1393                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9
1394                    });
1395
1396            Object returnObj = null;
1397
1398            try {
1399                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1400            }
1401            catch (Exception e) {
1402                if (e instanceof com.liferay.portal.PortalException) {
1403                    throw (com.liferay.portal.PortalException)e;
1404                }
1405
1406                if (e instanceof com.liferay.portal.SystemException) {
1407                    throw (com.liferay.portal.SystemException)e;
1408                }
1409
1410                throw new com.liferay.portal.SystemException(e);
1411            }
1412
1413            return (com.liferay.portal.model.Layout)returnObj;
1414        }
1415        catch (com.liferay.portal.SystemException se) {
1416            _log.error(se, se);
1417
1418            throw se;
1419        }
1420    }
1421
1422    public static com.liferay.portal.model.Layout updateLayout(
1423        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1424        long layoutId, long parentLayoutId,
1425        java.util.Map<java.util.Locale, String> localeNamesMap,
1426        java.util.Map<java.util.Locale, String> localeTitlesMap,
1427        java.lang.String description, java.lang.String type, boolean hidden,
1428        java.lang.String friendlyURL, java.lang.Boolean iconImage,
1429        byte[] iconBytes)
1430        throws com.liferay.portal.PortalException,
1431            com.liferay.portal.SystemException {
1432        try {
1433            Object paramObj0 = new LongWrapper(groupId);
1434
1435            Object paramObj1 = new BooleanWrapper(privateLayout);
1436
1437            Object paramObj2 = new LongWrapper(layoutId);
1438
1439            Object paramObj3 = new LongWrapper(parentLayoutId);
1440
1441            Object paramObj4 = localeNamesMap;
1442
1443            if (localeNamesMap == null) {
1444                paramObj4 = new NullWrapper("java.util.Map");
1445            }
1446
1447            Object paramObj5 = localeTitlesMap;
1448
1449            if (localeTitlesMap == null) {
1450                paramObj5 = new NullWrapper("java.util.Map");
1451            }
1452
1453            Object paramObj6 = description;
1454
1455            if (description == null) {
1456                paramObj6 = new NullWrapper("java.lang.String");
1457            }
1458
1459            Object paramObj7 = type;
1460
1461            if (type == null) {
1462                paramObj7 = new NullWrapper("java.lang.String");
1463            }
1464
1465            Object paramObj8 = new BooleanWrapper(hidden);
1466
1467            Object paramObj9 = friendlyURL;
1468
1469            if (friendlyURL == null) {
1470                paramObj9 = new NullWrapper("java.lang.String");
1471            }
1472
1473            Object paramObj10 = iconImage;
1474
1475            if (iconImage == null) {
1476                paramObj10 = new NullWrapper("java.lang.Boolean");
1477            }
1478
1479            Object paramObj11 = iconBytes;
1480
1481            if (iconBytes == null) {
1482                paramObj11 = new NullWrapper("[B");
1483            }
1484
1485            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1486                    "updateLayout",
1487                    new Object[] {
1488                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1489                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1490                        paramObj10, paramObj11
1491                    });
1492
1493            Object returnObj = null;
1494
1495            try {
1496                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1497            }
1498            catch (Exception e) {
1499                if (e instanceof com.liferay.portal.PortalException) {
1500                    throw (com.liferay.portal.PortalException)e;
1501                }
1502
1503                if (e instanceof com.liferay.portal.SystemException) {
1504                    throw (com.liferay.portal.SystemException)e;
1505                }
1506
1507                throw new com.liferay.portal.SystemException(e);
1508            }
1509
1510            return (com.liferay.portal.model.Layout)returnObj;
1511        }
1512        catch (com.liferay.portal.SystemException se) {
1513            _log.error(se, se);
1514
1515            throw se;
1516        }
1517    }
1518
1519    public static com.liferay.portal.model.Layout updateLayout(
1520        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1521        long layoutId, java.lang.String typeSettings)
1522        throws com.liferay.portal.PortalException,
1523            com.liferay.portal.SystemException {
1524        try {
1525            Object paramObj0 = new LongWrapper(groupId);
1526
1527            Object paramObj1 = new BooleanWrapper(privateLayout);
1528
1529            Object paramObj2 = new LongWrapper(layoutId);
1530
1531            Object paramObj3 = typeSettings;
1532
1533            if (typeSettings == null) {
1534                paramObj3 = new NullWrapper("java.lang.String");
1535            }
1536
1537            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1538                    "updateLayout",
1539                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1540
1541            Object returnObj = null;
1542
1543            try {
1544                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1545            }
1546            catch (Exception e) {
1547                if (e instanceof com.liferay.portal.PortalException) {
1548                    throw (com.liferay.portal.PortalException)e;
1549                }
1550
1551                if (e instanceof com.liferay.portal.SystemException) {
1552                    throw (com.liferay.portal.SystemException)e;
1553                }
1554
1555                throw new com.liferay.portal.SystemException(e);
1556            }
1557
1558            return (com.liferay.portal.model.Layout)returnObj;
1559        }
1560        catch (com.liferay.portal.SystemException se) {
1561            _log.error(se, se);
1562
1563            throw se;
1564        }
1565    }
1566
1567    public static com.liferay.portal.model.Layout updateLookAndFeel(
1568        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1569        long layoutId, java.lang.String themeId,
1570        java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme)
1571        throws com.liferay.portal.PortalException,
1572            com.liferay.portal.SystemException {
1573        try {
1574            Object paramObj0 = new LongWrapper(groupId);
1575
1576            Object paramObj1 = new BooleanWrapper(privateLayout);
1577
1578            Object paramObj2 = new LongWrapper(layoutId);
1579
1580            Object paramObj3 = themeId;
1581
1582            if (themeId == null) {
1583                paramObj3 = new NullWrapper("java.lang.String");
1584            }
1585
1586            Object paramObj4 = colorSchemeId;
1587
1588            if (colorSchemeId == null) {
1589                paramObj4 = new NullWrapper("java.lang.String");
1590            }
1591
1592            Object paramObj5 = css;
1593
1594            if (css == null) {
1595                paramObj5 = new NullWrapper("java.lang.String");
1596            }
1597
1598            Object paramObj6 = new BooleanWrapper(wapTheme);
1599
1600            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1601                    "updateLookAndFeel",
1602                    new Object[] {
1603                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1604                        paramObj5, paramObj6
1605                    });
1606
1607            Object returnObj = null;
1608
1609            try {
1610                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1611            }
1612            catch (Exception e) {
1613                if (e instanceof com.liferay.portal.PortalException) {
1614                    throw (com.liferay.portal.PortalException)e;
1615                }
1616
1617                if (e instanceof com.liferay.portal.SystemException) {
1618                    throw (com.liferay.portal.SystemException)e;
1619                }
1620
1621                throw new com.liferay.portal.SystemException(e);
1622            }
1623
1624            return (com.liferay.portal.model.Layout)returnObj;
1625        }
1626        catch (com.liferay.portal.SystemException se) {
1627            _log.error(se, se);
1628
1629            throw se;
1630        }
1631    }
1632
1633    public static com.liferay.portal.model.Layout updateName(
1634        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1635        long layoutId, java.lang.String name, java.lang.String languageId)
1636        throws com.liferay.portal.PortalException,
1637            com.liferay.portal.SystemException {
1638        try {
1639            Object paramObj0 = new LongWrapper(groupId);
1640
1641            Object paramObj1 = new BooleanWrapper(privateLayout);
1642
1643            Object paramObj2 = new LongWrapper(layoutId);
1644
1645            Object paramObj3 = name;
1646
1647            if (name == null) {
1648                paramObj3 = new NullWrapper("java.lang.String");
1649            }
1650
1651            Object paramObj4 = languageId;
1652
1653            if (languageId == null) {
1654                paramObj4 = new NullWrapper("java.lang.String");
1655            }
1656
1657            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1658                    "updateName",
1659                    new Object[] {
1660                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
1661                    });
1662
1663            Object returnObj = null;
1664
1665            try {
1666                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1667            }
1668            catch (Exception e) {
1669                if (e instanceof com.liferay.portal.PortalException) {
1670                    throw (com.liferay.portal.PortalException)e;
1671                }
1672
1673                if (e instanceof com.liferay.portal.SystemException) {
1674                    throw (com.liferay.portal.SystemException)e;
1675                }
1676
1677                throw new com.liferay.portal.SystemException(e);
1678            }
1679
1680            return (com.liferay.portal.model.Layout)returnObj;
1681        }
1682        catch (com.liferay.portal.SystemException se) {
1683            _log.error(se, se);
1684
1685            throw se;
1686        }
1687    }
1688
1689    public static com.liferay.portal.model.Layout updateName(
1690        HttpPrincipal httpPrincipal, long plid, java.lang.String name,
1691        java.lang.String languageId)
1692        throws com.liferay.portal.PortalException,
1693            com.liferay.portal.SystemException {
1694        try {
1695            Object paramObj0 = new LongWrapper(plid);
1696
1697            Object paramObj1 = name;
1698
1699            if (name == null) {
1700                paramObj1 = new NullWrapper("java.lang.String");
1701            }
1702
1703            Object paramObj2 = languageId;
1704
1705            if (languageId == null) {
1706                paramObj2 = new NullWrapper("java.lang.String");
1707            }
1708
1709            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1710                    "updateName",
1711                    new Object[] { paramObj0, paramObj1, paramObj2 });
1712
1713            Object returnObj = null;
1714
1715            try {
1716                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1717            }
1718            catch (Exception e) {
1719                if (e instanceof com.liferay.portal.PortalException) {
1720                    throw (com.liferay.portal.PortalException)e;
1721                }
1722
1723                if (e instanceof com.liferay.portal.SystemException) {
1724                    throw (com.liferay.portal.SystemException)e;
1725                }
1726
1727                throw new com.liferay.portal.SystemException(e);
1728            }
1729
1730            return (com.liferay.portal.model.Layout)returnObj;
1731        }
1732        catch (com.liferay.portal.SystemException se) {
1733            _log.error(se, se);
1734
1735            throw se;
1736        }
1737    }
1738
1739    public static com.liferay.portal.model.Layout updateParentLayoutId(
1740        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1741        long layoutId, long parentLayoutId)
1742        throws com.liferay.portal.PortalException,
1743            com.liferay.portal.SystemException {
1744        try {
1745            Object paramObj0 = new LongWrapper(groupId);
1746
1747            Object paramObj1 = new BooleanWrapper(privateLayout);
1748
1749            Object paramObj2 = new LongWrapper(layoutId);
1750
1751            Object paramObj3 = new LongWrapper(parentLayoutId);
1752
1753            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1754                    "updateParentLayoutId",
1755                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1756
1757            Object returnObj = null;
1758
1759            try {
1760                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1761            }
1762            catch (Exception e) {
1763                if (e instanceof com.liferay.portal.PortalException) {
1764                    throw (com.liferay.portal.PortalException)e;
1765                }
1766
1767                if (e instanceof com.liferay.portal.SystemException) {
1768                    throw (com.liferay.portal.SystemException)e;
1769                }
1770
1771                throw new com.liferay.portal.SystemException(e);
1772            }
1773
1774            return (com.liferay.portal.model.Layout)returnObj;
1775        }
1776        catch (com.liferay.portal.SystemException se) {
1777            _log.error(se, se);
1778
1779            throw se;
1780        }
1781    }
1782
1783    public static com.liferay.portal.model.Layout updateParentLayoutId(
1784        HttpPrincipal httpPrincipal, long plid, long parentPlid)
1785        throws com.liferay.portal.PortalException,
1786            com.liferay.portal.SystemException {
1787        try {
1788            Object paramObj0 = new LongWrapper(plid);
1789
1790            Object paramObj1 = new LongWrapper(parentPlid);
1791
1792            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1793                    "updateParentLayoutId",
1794                    new Object[] { paramObj0, paramObj1 });
1795
1796            Object returnObj = null;
1797
1798            try {
1799                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1800            }
1801            catch (Exception e) {
1802                if (e instanceof com.liferay.portal.PortalException) {
1803                    throw (com.liferay.portal.PortalException)e;
1804                }
1805
1806                if (e instanceof com.liferay.portal.SystemException) {
1807                    throw (com.liferay.portal.SystemException)e;
1808                }
1809
1810                throw new com.liferay.portal.SystemException(e);
1811            }
1812
1813            return (com.liferay.portal.model.Layout)returnObj;
1814        }
1815        catch (com.liferay.portal.SystemException se) {
1816            _log.error(se, se);
1817
1818            throw se;
1819        }
1820    }
1821
1822    public static com.liferay.portal.model.Layout updatePriority(
1823        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1824        long layoutId, int priority)
1825        throws com.liferay.portal.PortalException,
1826            com.liferay.portal.SystemException {
1827        try {
1828            Object paramObj0 = new LongWrapper(groupId);
1829
1830            Object paramObj1 = new BooleanWrapper(privateLayout);
1831
1832            Object paramObj2 = new LongWrapper(layoutId);
1833
1834            Object paramObj3 = new IntegerWrapper(priority);
1835
1836            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1837                    "updatePriority",
1838                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1839
1840            Object returnObj = null;
1841
1842            try {
1843                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1844            }
1845            catch (Exception e) {
1846                if (e instanceof com.liferay.portal.PortalException) {
1847                    throw (com.liferay.portal.PortalException)e;
1848                }
1849
1850                if (e instanceof com.liferay.portal.SystemException) {
1851                    throw (com.liferay.portal.SystemException)e;
1852                }
1853
1854                throw new com.liferay.portal.SystemException(e);
1855            }
1856
1857            return (com.liferay.portal.model.Layout)returnObj;
1858        }
1859        catch (com.liferay.portal.SystemException se) {
1860            _log.error(se, se);
1861
1862            throw se;
1863        }
1864    }
1865
1866    public static com.liferay.portal.model.Layout updatePriority(
1867        HttpPrincipal httpPrincipal, long plid, int priority)
1868        throws com.liferay.portal.PortalException,
1869            com.liferay.portal.SystemException {
1870        try {
1871            Object paramObj0 = new LongWrapper(plid);
1872
1873            Object paramObj1 = new IntegerWrapper(priority);
1874
1875            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1876                    "updatePriority", new Object[] { paramObj0, paramObj1 });
1877
1878            Object returnObj = null;
1879
1880            try {
1881                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1882            }
1883            catch (Exception e) {
1884                if (e instanceof com.liferay.portal.PortalException) {
1885                    throw (com.liferay.portal.PortalException)e;
1886                }
1887
1888                if (e instanceof com.liferay.portal.SystemException) {
1889                    throw (com.liferay.portal.SystemException)e;
1890                }
1891
1892                throw new com.liferay.portal.SystemException(e);
1893            }
1894
1895            return (com.liferay.portal.model.Layout)returnObj;
1896        }
1897        catch (com.liferay.portal.SystemException se) {
1898            _log.error(se, se);
1899
1900            throw se;
1901        }
1902    }
1903
1904    private static Log _log = LogFactoryUtil.getLog(LayoutServiceHttp.class);
1905}