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 byte[] exportPortletInfo(HttpPrincipal httpPrincipal,
532         long plid, java.lang.String portletId,
533         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
534         java.util.Date endDate)
535         throws com.liferay.portal.PortalException,
536             com.liferay.portal.SystemException {
537         try {
538             Object paramObj0 = new LongWrapper(plid);
539 
540             Object paramObj1 = portletId;
541 
542             if (portletId == null) {
543                 paramObj1 = new NullWrapper("java.lang.String");
544             }
545 
546             Object paramObj2 = parameterMap;
547 
548             if (parameterMap == null) {
549                 paramObj2 = new NullWrapper("java.util.Map");
550             }
551 
552             Object paramObj3 = startDate;
553 
554             if (startDate == null) {
555                 paramObj3 = new NullWrapper("java.util.Date");
556             }
557 
558             Object paramObj4 = endDate;
559 
560             if (endDate == null) {
561                 paramObj4 = new NullWrapper("java.util.Date");
562             }
563 
564             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
565                     "exportPortletInfo",
566                     new Object[] {
567                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
568                     });
569 
570             Object returnObj = null;
571 
572             try {
573                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
574             }
575             catch (Exception e) {
576                 if (e instanceof com.liferay.portal.PortalException) {
577                     throw (com.liferay.portal.PortalException)e;
578                 }
579 
580                 if (e instanceof com.liferay.portal.SystemException) {
581                     throw (com.liferay.portal.SystemException)e;
582                 }
583 
584                 throw new com.liferay.portal.SystemException(e);
585             }
586 
587             return (byte[])returnObj;
588         }
589         catch (com.liferay.portal.SystemException se) {
590             _log.error(se, se);
591 
592             throw se;
593         }
594     }
595 
596     public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
597         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
598         java.io.File file)
599         throws com.liferay.portal.PortalException,
600             com.liferay.portal.SystemException {
601         try {
602             Object paramObj0 = new LongWrapper(groupId);
603 
604             Object paramObj1 = new BooleanWrapper(privateLayout);
605 
606             Object paramObj2 = parameterMap;
607 
608             if (parameterMap == null) {
609                 paramObj2 = new NullWrapper("java.util.Map");
610             }
611 
612             Object paramObj3 = file;
613 
614             if (file == null) {
615                 paramObj3 = new NullWrapper("java.io.File");
616             }
617 
618             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
619                     "importLayouts",
620                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
621 
622             try {
623                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
624             }
625             catch (Exception e) {
626                 if (e instanceof com.liferay.portal.PortalException) {
627                     throw (com.liferay.portal.PortalException)e;
628                 }
629 
630                 if (e instanceof com.liferay.portal.SystemException) {
631                     throw (com.liferay.portal.SystemException)e;
632                 }
633 
634                 throw new com.liferay.portal.SystemException(e);
635             }
636         }
637         catch (com.liferay.portal.SystemException se) {
638             _log.error(se, se);
639 
640             throw se;
641         }
642     }
643 
644     public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
645         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
646         byte[] bytes)
647         throws com.liferay.portal.PortalException,
648             com.liferay.portal.SystemException {
649         try {
650             Object paramObj0 = new LongWrapper(groupId);
651 
652             Object paramObj1 = new BooleanWrapper(privateLayout);
653 
654             Object paramObj2 = parameterMap;
655 
656             if (parameterMap == null) {
657                 paramObj2 = new NullWrapper("java.util.Map");
658             }
659 
660             Object paramObj3 = bytes;
661 
662             if (bytes == null) {
663                 paramObj3 = new NullWrapper("[B");
664             }
665 
666             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
667                     "importLayouts",
668                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
669 
670             try {
671                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
672             }
673             catch (Exception e) {
674                 if (e instanceof com.liferay.portal.PortalException) {
675                     throw (com.liferay.portal.PortalException)e;
676                 }
677 
678                 if (e instanceof com.liferay.portal.SystemException) {
679                     throw (com.liferay.portal.SystemException)e;
680                 }
681 
682                 throw new com.liferay.portal.SystemException(e);
683             }
684         }
685         catch (com.liferay.portal.SystemException se) {
686             _log.error(se, se);
687 
688             throw se;
689         }
690     }
691 
692     public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
693         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
694         java.io.InputStream is)
695         throws com.liferay.portal.PortalException,
696             com.liferay.portal.SystemException {
697         try {
698             Object paramObj0 = new LongWrapper(groupId);
699 
700             Object paramObj1 = new BooleanWrapper(privateLayout);
701 
702             Object paramObj2 = parameterMap;
703 
704             if (parameterMap == null) {
705                 paramObj2 = new NullWrapper("java.util.Map");
706             }
707 
708             Object paramObj3 = is;
709 
710             if (is == null) {
711                 paramObj3 = new NullWrapper("java.io.InputStream");
712             }
713 
714             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
715                     "importLayouts",
716                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
717 
718             try {
719                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
720             }
721             catch (Exception e) {
722                 if (e instanceof com.liferay.portal.PortalException) {
723                     throw (com.liferay.portal.PortalException)e;
724                 }
725 
726                 if (e instanceof com.liferay.portal.SystemException) {
727                     throw (com.liferay.portal.SystemException)e;
728                 }
729 
730                 throw new com.liferay.portal.SystemException(e);
731             }
732         }
733         catch (com.liferay.portal.SystemException se) {
734             _log.error(se, se);
735 
736             throw se;
737         }
738     }
739 
740     public static void importPortletInfo(HttpPrincipal httpPrincipal,
741         long plid, java.lang.String portletId,
742         java.util.Map<String, String[]> parameterMap, java.io.File file)
743         throws com.liferay.portal.PortalException,
744             com.liferay.portal.SystemException {
745         try {
746             Object paramObj0 = new LongWrapper(plid);
747 
748             Object paramObj1 = portletId;
749 
750             if (portletId == null) {
751                 paramObj1 = new NullWrapper("java.lang.String");
752             }
753 
754             Object paramObj2 = parameterMap;
755 
756             if (parameterMap == null) {
757                 paramObj2 = new NullWrapper("java.util.Map");
758             }
759 
760             Object paramObj3 = file;
761 
762             if (file == null) {
763                 paramObj3 = new NullWrapper("java.io.File");
764             }
765 
766             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
767                     "importPortletInfo",
768                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
769 
770             try {
771                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
772             }
773             catch (Exception e) {
774                 if (e instanceof com.liferay.portal.PortalException) {
775                     throw (com.liferay.portal.PortalException)e;
776                 }
777 
778                 if (e instanceof com.liferay.portal.SystemException) {
779                     throw (com.liferay.portal.SystemException)e;
780                 }
781 
782                 throw new com.liferay.portal.SystemException(e);
783             }
784         }
785         catch (com.liferay.portal.SystemException se) {
786             _log.error(se, se);
787 
788             throw se;
789         }
790     }
791 
792     public static void importPortletInfo(HttpPrincipal httpPrincipal,
793         long plid, java.lang.String portletId,
794         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
795         throws com.liferay.portal.PortalException,
796             com.liferay.portal.SystemException {
797         try {
798             Object paramObj0 = new LongWrapper(plid);
799 
800             Object paramObj1 = portletId;
801 
802             if (portletId == null) {
803                 paramObj1 = new NullWrapper("java.lang.String");
804             }
805 
806             Object paramObj2 = parameterMap;
807 
808             if (parameterMap == null) {
809                 paramObj2 = new NullWrapper("java.util.Map");
810             }
811 
812             Object paramObj3 = is;
813 
814             if (is == null) {
815                 paramObj3 = new NullWrapper("java.io.InputStream");
816             }
817 
818             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
819                     "importPortletInfo",
820                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
821 
822             try {
823                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
824             }
825             catch (Exception e) {
826                 if (e instanceof com.liferay.portal.PortalException) {
827                     throw (com.liferay.portal.PortalException)e;
828                 }
829 
830                 if (e instanceof com.liferay.portal.SystemException) {
831                     throw (com.liferay.portal.SystemException)e;
832                 }
833 
834                 throw new com.liferay.portal.SystemException(e);
835             }
836         }
837         catch (com.liferay.portal.SystemException se) {
838             _log.error(se, se);
839 
840             throw se;
841         }
842     }
843 
844     public static void schedulePublishToLive(HttpPrincipal httpPrincipal,
845         long sourceGroupId, long targetGroupId, boolean privateLayout,
846         java.util.Map<Long, Boolean> layoutIdMap,
847         java.util.Map<String, String[]> parameterMap, java.lang.String scope,
848         java.util.Date startDate, java.util.Date endDate,
849         java.lang.String groupName, java.lang.String cronText,
850         java.util.Date schedulerStartDate, java.util.Date schedulerEndDate,
851         java.lang.String description)
852         throws com.liferay.portal.PortalException,
853             com.liferay.portal.SystemException {
854         try {
855             Object paramObj0 = new LongWrapper(sourceGroupId);
856 
857             Object paramObj1 = new LongWrapper(targetGroupId);
858 
859             Object paramObj2 = new BooleanWrapper(privateLayout);
860 
861             Object paramObj3 = layoutIdMap;
862 
863             if (layoutIdMap == null) {
864                 paramObj3 = new NullWrapper("java.util.Map");
865             }
866 
867             Object paramObj4 = parameterMap;
868 
869             if (parameterMap == null) {
870                 paramObj4 = new NullWrapper("java.util.Map");
871             }
872 
873             Object paramObj5 = scope;
874 
875             if (scope == null) {
876                 paramObj5 = new NullWrapper("java.lang.String");
877             }
878 
879             Object paramObj6 = startDate;
880 
881             if (startDate == null) {
882                 paramObj6 = new NullWrapper("java.util.Date");
883             }
884 
885             Object paramObj7 = endDate;
886 
887             if (endDate == null) {
888                 paramObj7 = new NullWrapper("java.util.Date");
889             }
890 
891             Object paramObj8 = groupName;
892 
893             if (groupName == null) {
894                 paramObj8 = new NullWrapper("java.lang.String");
895             }
896 
897             Object paramObj9 = cronText;
898 
899             if (cronText == null) {
900                 paramObj9 = new NullWrapper("java.lang.String");
901             }
902 
903             Object paramObj10 = schedulerStartDate;
904 
905             if (schedulerStartDate == null) {
906                 paramObj10 = new NullWrapper("java.util.Date");
907             }
908 
909             Object paramObj11 = schedulerEndDate;
910 
911             if (schedulerEndDate == null) {
912                 paramObj11 = new NullWrapper("java.util.Date");
913             }
914 
915             Object paramObj12 = description;
916 
917             if (description == null) {
918                 paramObj12 = new NullWrapper("java.lang.String");
919             }
920 
921             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
922                     "schedulePublishToLive",
923                     new Object[] {
924                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
925                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
926                         paramObj10, paramObj11, paramObj12
927                     });
928 
929             try {
930                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
931             }
932             catch (Exception e) {
933                 if (e instanceof com.liferay.portal.PortalException) {
934                     throw (com.liferay.portal.PortalException)e;
935                 }
936 
937                 if (e instanceof com.liferay.portal.SystemException) {
938                     throw (com.liferay.portal.SystemException)e;
939                 }
940 
941                 throw new com.liferay.portal.SystemException(e);
942             }
943         }
944         catch (com.liferay.portal.SystemException se) {
945             _log.error(se, se);
946 
947             throw se;
948         }
949     }
950 
951     public static void schedulePublishToRemote(HttpPrincipal httpPrincipal,
952         long sourceGroupId, boolean privateLayout,
953         java.util.Map<Long, Boolean> layoutIdMap,
954         java.util.Map<String, String[]> parameterMap,
955         java.lang.String remoteAddress, int remotePort,
956         boolean secureConnection, long remoteGroupId,
957         boolean remotePrivateLayout, java.util.Date startDate,
958         java.util.Date endDate, java.lang.String groupName,
959         java.lang.String cronText, java.util.Date schedulerStartDate,
960         java.util.Date schedulerEndDate, java.lang.String description)
961         throws com.liferay.portal.PortalException,
962             com.liferay.portal.SystemException {
963         try {
964             Object paramObj0 = new LongWrapper(sourceGroupId);
965 
966             Object paramObj1 = new BooleanWrapper(privateLayout);
967 
968             Object paramObj2 = layoutIdMap;
969 
970             if (layoutIdMap == null) {
971                 paramObj2 = new NullWrapper("java.util.Map");
972             }
973 
974             Object paramObj3 = parameterMap;
975 
976             if (parameterMap == null) {
977                 paramObj3 = new NullWrapper("java.util.Map");
978             }
979 
980             Object paramObj4 = remoteAddress;
981 
982             if (remoteAddress == null) {
983                 paramObj4 = new NullWrapper("java.lang.String");
984             }
985 
986             Object paramObj5 = new IntegerWrapper(remotePort);
987 
988             Object paramObj6 = new BooleanWrapper(secureConnection);
989 
990             Object paramObj7 = new LongWrapper(remoteGroupId);
991 
992             Object paramObj8 = new BooleanWrapper(remotePrivateLayout);
993 
994             Object paramObj9 = startDate;
995 
996             if (startDate == null) {
997                 paramObj9 = new NullWrapper("java.util.Date");
998             }
999 
1000            Object paramObj10 = endDate;
1001
1002            if (endDate == null) {
1003                paramObj10 = new NullWrapper("java.util.Date");
1004            }
1005
1006            Object paramObj11 = groupName;
1007
1008            if (groupName == null) {
1009                paramObj11 = new NullWrapper("java.lang.String");
1010            }
1011
1012            Object paramObj12 = cronText;
1013
1014            if (cronText == null) {
1015                paramObj12 = new NullWrapper("java.lang.String");
1016            }
1017
1018            Object paramObj13 = schedulerStartDate;
1019
1020            if (schedulerStartDate == null) {
1021                paramObj13 = new NullWrapper("java.util.Date");
1022            }
1023
1024            Object paramObj14 = schedulerEndDate;
1025
1026            if (schedulerEndDate == null) {
1027                paramObj14 = new NullWrapper("java.util.Date");
1028            }
1029
1030            Object paramObj15 = description;
1031
1032            if (description == null) {
1033                paramObj15 = new NullWrapper("java.lang.String");
1034            }
1035
1036            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1037                    "schedulePublishToRemote",
1038                    new Object[] {
1039                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1040                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1041                        paramObj10, paramObj11, paramObj12, paramObj13,
1042                        paramObj14, paramObj15
1043                    });
1044
1045            try {
1046                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1047            }
1048            catch (Exception e) {
1049                if (e instanceof com.liferay.portal.PortalException) {
1050                    throw (com.liferay.portal.PortalException)e;
1051                }
1052
1053                if (e instanceof com.liferay.portal.SystemException) {
1054                    throw (com.liferay.portal.SystemException)e;
1055                }
1056
1057                throw new com.liferay.portal.SystemException(e);
1058            }
1059        }
1060        catch (com.liferay.portal.SystemException se) {
1061            _log.error(se, se);
1062
1063            throw se;
1064        }
1065    }
1066
1067    public static void setLayouts(HttpPrincipal httpPrincipal, long groupId,
1068        boolean privateLayout, long parentLayoutId, long[] layoutIds)
1069        throws com.liferay.portal.PortalException,
1070            com.liferay.portal.SystemException {
1071        try {
1072            Object paramObj0 = new LongWrapper(groupId);
1073
1074            Object paramObj1 = new BooleanWrapper(privateLayout);
1075
1076            Object paramObj2 = new LongWrapper(parentLayoutId);
1077
1078            Object paramObj3 = layoutIds;
1079
1080            if (layoutIds == null) {
1081                paramObj3 = new NullWrapper("[J");
1082            }
1083
1084            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1085                    "setLayouts",
1086                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1087
1088            try {
1089                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1090            }
1091            catch (Exception e) {
1092                if (e instanceof com.liferay.portal.PortalException) {
1093                    throw (com.liferay.portal.PortalException)e;
1094                }
1095
1096                if (e instanceof com.liferay.portal.SystemException) {
1097                    throw (com.liferay.portal.SystemException)e;
1098                }
1099
1100                throw new com.liferay.portal.SystemException(e);
1101            }
1102        }
1103        catch (com.liferay.portal.SystemException se) {
1104            _log.error(se, se);
1105
1106            throw se;
1107        }
1108    }
1109
1110    public static void unschedulePublishToLive(HttpPrincipal httpPrincipal,
1111        long groupId, java.lang.String jobName, java.lang.String groupName)
1112        throws com.liferay.portal.PortalException,
1113            com.liferay.portal.SystemException {
1114        try {
1115            Object paramObj0 = new LongWrapper(groupId);
1116
1117            Object paramObj1 = jobName;
1118
1119            if (jobName == null) {
1120                paramObj1 = new NullWrapper("java.lang.String");
1121            }
1122
1123            Object paramObj2 = groupName;
1124
1125            if (groupName == null) {
1126                paramObj2 = new NullWrapper("java.lang.String");
1127            }
1128
1129            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1130                    "unschedulePublishToLive",
1131                    new Object[] { paramObj0, paramObj1, paramObj2 });
1132
1133            try {
1134                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1135            }
1136            catch (Exception e) {
1137                if (e instanceof com.liferay.portal.PortalException) {
1138                    throw (com.liferay.portal.PortalException)e;
1139                }
1140
1141                if (e instanceof com.liferay.portal.SystemException) {
1142                    throw (com.liferay.portal.SystemException)e;
1143                }
1144
1145                throw new com.liferay.portal.SystemException(e);
1146            }
1147        }
1148        catch (com.liferay.portal.SystemException se) {
1149            _log.error(se, se);
1150
1151            throw se;
1152        }
1153    }
1154
1155    public static void unschedulePublishToRemote(HttpPrincipal httpPrincipal,
1156        long groupId, java.lang.String jobName, java.lang.String groupName)
1157        throws com.liferay.portal.PortalException,
1158            com.liferay.portal.SystemException {
1159        try {
1160            Object paramObj0 = new LongWrapper(groupId);
1161
1162            Object paramObj1 = jobName;
1163
1164            if (jobName == null) {
1165                paramObj1 = new NullWrapper("java.lang.String");
1166            }
1167
1168            Object paramObj2 = groupName;
1169
1170            if (groupName == null) {
1171                paramObj2 = new NullWrapper("java.lang.String");
1172            }
1173
1174            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1175                    "unschedulePublishToRemote",
1176                    new Object[] { paramObj0, paramObj1, paramObj2 });
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 com.liferay.portal.model.Layout updateLayout(
1201        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1202        long layoutId, long parentLayoutId,
1203        java.util.Map<java.util.Locale, String> localeNamesMap,
1204        java.util.Map<java.util.Locale, String> localeTitlesMap,
1205        java.lang.String description, java.lang.String type, boolean hidden,
1206        java.lang.String friendlyURL)
1207        throws com.liferay.portal.PortalException,
1208            com.liferay.portal.SystemException {
1209        try {
1210            Object paramObj0 = new LongWrapper(groupId);
1211
1212            Object paramObj1 = new BooleanWrapper(privateLayout);
1213
1214            Object paramObj2 = new LongWrapper(layoutId);
1215
1216            Object paramObj3 = new LongWrapper(parentLayoutId);
1217
1218            Object paramObj4 = localeNamesMap;
1219
1220            if (localeNamesMap == null) {
1221                paramObj4 = new NullWrapper("java.util.Map");
1222            }
1223
1224            Object paramObj5 = localeTitlesMap;
1225
1226            if (localeTitlesMap == null) {
1227                paramObj5 = new NullWrapper("java.util.Map");
1228            }
1229
1230            Object paramObj6 = description;
1231
1232            if (description == null) {
1233                paramObj6 = new NullWrapper("java.lang.String");
1234            }
1235
1236            Object paramObj7 = type;
1237
1238            if (type == null) {
1239                paramObj7 = new NullWrapper("java.lang.String");
1240            }
1241
1242            Object paramObj8 = new BooleanWrapper(hidden);
1243
1244            Object paramObj9 = friendlyURL;
1245
1246            if (friendlyURL == null) {
1247                paramObj9 = new NullWrapper("java.lang.String");
1248            }
1249
1250            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1251                    "updateLayout",
1252                    new Object[] {
1253                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1254                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9
1255                    });
1256
1257            Object returnObj = null;
1258
1259            try {
1260                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1261            }
1262            catch (Exception e) {
1263                if (e instanceof com.liferay.portal.PortalException) {
1264                    throw (com.liferay.portal.PortalException)e;
1265                }
1266
1267                if (e instanceof com.liferay.portal.SystemException) {
1268                    throw (com.liferay.portal.SystemException)e;
1269                }
1270
1271                throw new com.liferay.portal.SystemException(e);
1272            }
1273
1274            return (com.liferay.portal.model.Layout)returnObj;
1275        }
1276        catch (com.liferay.portal.SystemException se) {
1277            _log.error(se, se);
1278
1279            throw se;
1280        }
1281    }
1282
1283    public static com.liferay.portal.model.Layout updateLayout(
1284        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1285        long layoutId, long parentLayoutId,
1286        java.util.Map<java.util.Locale, String> localeNamesMap,
1287        java.util.Map<java.util.Locale, String> localeTitlesMap,
1288        java.lang.String description, java.lang.String type, boolean hidden,
1289        java.lang.String friendlyURL, java.lang.Boolean iconImage,
1290        byte[] iconBytes)
1291        throws com.liferay.portal.PortalException,
1292            com.liferay.portal.SystemException {
1293        try {
1294            Object paramObj0 = new LongWrapper(groupId);
1295
1296            Object paramObj1 = new BooleanWrapper(privateLayout);
1297
1298            Object paramObj2 = new LongWrapper(layoutId);
1299
1300            Object paramObj3 = new LongWrapper(parentLayoutId);
1301
1302            Object paramObj4 = localeNamesMap;
1303
1304            if (localeNamesMap == null) {
1305                paramObj4 = new NullWrapper("java.util.Map");
1306            }
1307
1308            Object paramObj5 = localeTitlesMap;
1309
1310            if (localeTitlesMap == null) {
1311                paramObj5 = new NullWrapper("java.util.Map");
1312            }
1313
1314            Object paramObj6 = description;
1315
1316            if (description == null) {
1317                paramObj6 = new NullWrapper("java.lang.String");
1318            }
1319
1320            Object paramObj7 = type;
1321
1322            if (type == null) {
1323                paramObj7 = new NullWrapper("java.lang.String");
1324            }
1325
1326            Object paramObj8 = new BooleanWrapper(hidden);
1327
1328            Object paramObj9 = friendlyURL;
1329
1330            if (friendlyURL == null) {
1331                paramObj9 = new NullWrapper("java.lang.String");
1332            }
1333
1334            Object paramObj10 = iconImage;
1335
1336            if (iconImage == null) {
1337                paramObj10 = new NullWrapper("java.lang.Boolean");
1338            }
1339
1340            Object paramObj11 = iconBytes;
1341
1342            if (iconBytes == null) {
1343                paramObj11 = new NullWrapper("[B");
1344            }
1345
1346            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1347                    "updateLayout",
1348                    new Object[] {
1349                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1350                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1351                        paramObj10, paramObj11
1352                    });
1353
1354            Object returnObj = null;
1355
1356            try {
1357                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1358            }
1359            catch (Exception e) {
1360                if (e instanceof com.liferay.portal.PortalException) {
1361                    throw (com.liferay.portal.PortalException)e;
1362                }
1363
1364                if (e instanceof com.liferay.portal.SystemException) {
1365                    throw (com.liferay.portal.SystemException)e;
1366                }
1367
1368                throw new com.liferay.portal.SystemException(e);
1369            }
1370
1371            return (com.liferay.portal.model.Layout)returnObj;
1372        }
1373        catch (com.liferay.portal.SystemException se) {
1374            _log.error(se, se);
1375
1376            throw se;
1377        }
1378    }
1379
1380    public static com.liferay.portal.model.Layout updateLayout(
1381        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1382        long layoutId, java.lang.String typeSettings)
1383        throws com.liferay.portal.PortalException,
1384            com.liferay.portal.SystemException {
1385        try {
1386            Object paramObj0 = new LongWrapper(groupId);
1387
1388            Object paramObj1 = new BooleanWrapper(privateLayout);
1389
1390            Object paramObj2 = new LongWrapper(layoutId);
1391
1392            Object paramObj3 = typeSettings;
1393
1394            if (typeSettings == null) {
1395                paramObj3 = new NullWrapper("java.lang.String");
1396            }
1397
1398            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1399                    "updateLayout",
1400                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1401
1402            Object returnObj = null;
1403
1404            try {
1405                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1406            }
1407            catch (Exception e) {
1408                if (e instanceof com.liferay.portal.PortalException) {
1409                    throw (com.liferay.portal.PortalException)e;
1410                }
1411
1412                if (e instanceof com.liferay.portal.SystemException) {
1413                    throw (com.liferay.portal.SystemException)e;
1414                }
1415
1416                throw new com.liferay.portal.SystemException(e);
1417            }
1418
1419            return (com.liferay.portal.model.Layout)returnObj;
1420        }
1421        catch (com.liferay.portal.SystemException se) {
1422            _log.error(se, se);
1423
1424            throw se;
1425        }
1426    }
1427
1428    public static com.liferay.portal.model.Layout updateLookAndFeel(
1429        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1430        long layoutId, java.lang.String themeId,
1431        java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme)
1432        throws com.liferay.portal.PortalException,
1433            com.liferay.portal.SystemException {
1434        try {
1435            Object paramObj0 = new LongWrapper(groupId);
1436
1437            Object paramObj1 = new BooleanWrapper(privateLayout);
1438
1439            Object paramObj2 = new LongWrapper(layoutId);
1440
1441            Object paramObj3 = themeId;
1442
1443            if (themeId == null) {
1444                paramObj3 = new NullWrapper("java.lang.String");
1445            }
1446
1447            Object paramObj4 = colorSchemeId;
1448
1449            if (colorSchemeId == null) {
1450                paramObj4 = new NullWrapper("java.lang.String");
1451            }
1452
1453            Object paramObj5 = css;
1454
1455            if (css == null) {
1456                paramObj5 = new NullWrapper("java.lang.String");
1457            }
1458
1459            Object paramObj6 = new BooleanWrapper(wapTheme);
1460
1461            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1462                    "updateLookAndFeel",
1463                    new Object[] {
1464                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1465                        paramObj5, paramObj6
1466                    });
1467
1468            Object returnObj = null;
1469
1470            try {
1471                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1472            }
1473            catch (Exception e) {
1474                if (e instanceof com.liferay.portal.PortalException) {
1475                    throw (com.liferay.portal.PortalException)e;
1476                }
1477
1478                if (e instanceof com.liferay.portal.SystemException) {
1479                    throw (com.liferay.portal.SystemException)e;
1480                }
1481
1482                throw new com.liferay.portal.SystemException(e);
1483            }
1484
1485            return (com.liferay.portal.model.Layout)returnObj;
1486        }
1487        catch (com.liferay.portal.SystemException se) {
1488            _log.error(se, se);
1489
1490            throw se;
1491        }
1492    }
1493
1494    public static com.liferay.portal.model.Layout updateName(
1495        HttpPrincipal httpPrincipal, long plid, java.lang.String name,
1496        java.lang.String languageId)
1497        throws com.liferay.portal.PortalException,
1498            com.liferay.portal.SystemException {
1499        try {
1500            Object paramObj0 = new LongWrapper(plid);
1501
1502            Object paramObj1 = name;
1503
1504            if (name == null) {
1505                paramObj1 = new NullWrapper("java.lang.String");
1506            }
1507
1508            Object paramObj2 = languageId;
1509
1510            if (languageId == null) {
1511                paramObj2 = new NullWrapper("java.lang.String");
1512            }
1513
1514            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1515                    "updateName",
1516                    new Object[] { paramObj0, paramObj1, paramObj2 });
1517
1518            Object returnObj = null;
1519
1520            try {
1521                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1522            }
1523            catch (Exception e) {
1524                if (e instanceof com.liferay.portal.PortalException) {
1525                    throw (com.liferay.portal.PortalException)e;
1526                }
1527
1528                if (e instanceof com.liferay.portal.SystemException) {
1529                    throw (com.liferay.portal.SystemException)e;
1530                }
1531
1532                throw new com.liferay.portal.SystemException(e);
1533            }
1534
1535            return (com.liferay.portal.model.Layout)returnObj;
1536        }
1537        catch (com.liferay.portal.SystemException se) {
1538            _log.error(se, se);
1539
1540            throw se;
1541        }
1542    }
1543
1544    public static com.liferay.portal.model.Layout updateName(
1545        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1546        long layoutId, java.lang.String name, java.lang.String languageId)
1547        throws com.liferay.portal.PortalException,
1548            com.liferay.portal.SystemException {
1549        try {
1550            Object paramObj0 = new LongWrapper(groupId);
1551
1552            Object paramObj1 = new BooleanWrapper(privateLayout);
1553
1554            Object paramObj2 = new LongWrapper(layoutId);
1555
1556            Object paramObj3 = name;
1557
1558            if (name == null) {
1559                paramObj3 = new NullWrapper("java.lang.String");
1560            }
1561
1562            Object paramObj4 = languageId;
1563
1564            if (languageId == null) {
1565                paramObj4 = new NullWrapper("java.lang.String");
1566            }
1567
1568            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1569                    "updateName",
1570                    new Object[] {
1571                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
1572                    });
1573
1574            Object returnObj = null;
1575
1576            try {
1577                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1578            }
1579            catch (Exception e) {
1580                if (e instanceof com.liferay.portal.PortalException) {
1581                    throw (com.liferay.portal.PortalException)e;
1582                }
1583
1584                if (e instanceof com.liferay.portal.SystemException) {
1585                    throw (com.liferay.portal.SystemException)e;
1586                }
1587
1588                throw new com.liferay.portal.SystemException(e);
1589            }
1590
1591            return (com.liferay.portal.model.Layout)returnObj;
1592        }
1593        catch (com.liferay.portal.SystemException se) {
1594            _log.error(se, se);
1595
1596            throw se;
1597        }
1598    }
1599
1600    public static com.liferay.portal.model.Layout updateParentLayoutId(
1601        HttpPrincipal httpPrincipal, long plid, long parentPlid)
1602        throws com.liferay.portal.PortalException,
1603            com.liferay.portal.SystemException {
1604        try {
1605            Object paramObj0 = new LongWrapper(plid);
1606
1607            Object paramObj1 = new LongWrapper(parentPlid);
1608
1609            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1610                    "updateParentLayoutId",
1611                    new Object[] { paramObj0, paramObj1 });
1612
1613            Object returnObj = null;
1614
1615            try {
1616                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1617            }
1618            catch (Exception e) {
1619                if (e instanceof com.liferay.portal.PortalException) {
1620                    throw (com.liferay.portal.PortalException)e;
1621                }
1622
1623                if (e instanceof com.liferay.portal.SystemException) {
1624                    throw (com.liferay.portal.SystemException)e;
1625                }
1626
1627                throw new com.liferay.portal.SystemException(e);
1628            }
1629
1630            return (com.liferay.portal.model.Layout)returnObj;
1631        }
1632        catch (com.liferay.portal.SystemException se) {
1633            _log.error(se, se);
1634
1635            throw se;
1636        }
1637    }
1638
1639    public static com.liferay.portal.model.Layout updateParentLayoutId(
1640        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1641        long layoutId, long parentLayoutId)
1642        throws com.liferay.portal.PortalException,
1643            com.liferay.portal.SystemException {
1644        try {
1645            Object paramObj0 = new LongWrapper(groupId);
1646
1647            Object paramObj1 = new BooleanWrapper(privateLayout);
1648
1649            Object paramObj2 = new LongWrapper(layoutId);
1650
1651            Object paramObj3 = new LongWrapper(parentLayoutId);
1652
1653            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1654                    "updateParentLayoutId",
1655                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1656
1657            Object returnObj = null;
1658
1659            try {
1660                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1661            }
1662            catch (Exception e) {
1663                if (e instanceof com.liferay.portal.PortalException) {
1664                    throw (com.liferay.portal.PortalException)e;
1665                }
1666
1667                if (e instanceof com.liferay.portal.SystemException) {
1668                    throw (com.liferay.portal.SystemException)e;
1669                }
1670
1671                throw new com.liferay.portal.SystemException(e);
1672            }
1673
1674            return (com.liferay.portal.model.Layout)returnObj;
1675        }
1676        catch (com.liferay.portal.SystemException se) {
1677            _log.error(se, se);
1678
1679            throw se;
1680        }
1681    }
1682
1683    public static com.liferay.portal.model.Layout updatePriority(
1684        HttpPrincipal httpPrincipal, long plid, int priority)
1685        throws com.liferay.portal.PortalException,
1686            com.liferay.portal.SystemException {
1687        try {
1688            Object paramObj0 = new LongWrapper(plid);
1689
1690            Object paramObj1 = new IntegerWrapper(priority);
1691
1692            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1693                    "updatePriority", new Object[] { paramObj0, paramObj1 });
1694
1695            Object returnObj = null;
1696
1697            try {
1698                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1699            }
1700            catch (Exception e) {
1701                if (e instanceof com.liferay.portal.PortalException) {
1702                    throw (com.liferay.portal.PortalException)e;
1703                }
1704
1705                if (e instanceof com.liferay.portal.SystemException) {
1706                    throw (com.liferay.portal.SystemException)e;
1707                }
1708
1709                throw new com.liferay.portal.SystemException(e);
1710            }
1711
1712            return (com.liferay.portal.model.Layout)returnObj;
1713        }
1714        catch (com.liferay.portal.SystemException se) {
1715            _log.error(se, se);
1716
1717            throw se;
1718        }
1719    }
1720
1721    public static com.liferay.portal.model.Layout updatePriority(
1722        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1723        long layoutId, int priority)
1724        throws com.liferay.portal.PortalException,
1725            com.liferay.portal.SystemException {
1726        try {
1727            Object paramObj0 = new LongWrapper(groupId);
1728
1729            Object paramObj1 = new BooleanWrapper(privateLayout);
1730
1731            Object paramObj2 = new LongWrapper(layoutId);
1732
1733            Object paramObj3 = new IntegerWrapper(priority);
1734
1735            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1736                    "updatePriority",
1737                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1738
1739            Object returnObj = null;
1740
1741            try {
1742                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1743            }
1744            catch (Exception e) {
1745                if (e instanceof com.liferay.portal.PortalException) {
1746                    throw (com.liferay.portal.PortalException)e;
1747                }
1748
1749                if (e instanceof com.liferay.portal.SystemException) {
1750                    throw (com.liferay.portal.SystemException)e;
1751                }
1752
1753                throw new com.liferay.portal.SystemException(e);
1754            }
1755
1756            return (com.liferay.portal.model.Layout)returnObj;
1757        }
1758        catch (com.liferay.portal.SystemException se) {
1759            _log.error(se, se);
1760
1761            throw se;
1762        }
1763    }
1764
1765    private static Log _log = LogFactoryUtil.getLog(LayoutServiceHttp.class);
1766}