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