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