1   /**
2    * Copyright (c) 2000-2009 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 preferencesKey,
354         java.lang.String preferencesValue)
355         throws com.liferay.portal.SystemException {
356         try {
357             Object paramObj0 = new LongWrapper(companyId);
358 
359             Object paramObj1 = portletId;
360 
361             if (portletId == null) {
362                 paramObj1 = new NullWrapper("java.lang.String");
363             }
364 
365             Object paramObj2 = preferencesKey;
366 
367             if (preferencesKey == null) {
368                 paramObj2 = new NullWrapper("java.lang.String");
369             }
370 
371             Object paramObj3 = preferencesValue;
372 
373             if (preferencesValue == null) {
374                 paramObj3 = new NullWrapper("java.lang.String");
375             }
376 
377             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
378                     "getLayoutReferences",
379                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
380 
381             Object returnObj = null;
382 
383             try {
384                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
385             }
386             catch (Exception e) {
387                 if (e instanceof com.liferay.portal.SystemException) {
388                     throw (com.liferay.portal.SystemException)e;
389                 }
390 
391                 throw new com.liferay.portal.SystemException(e);
392             }
393 
394             return (com.liferay.portal.model.LayoutReference[])returnObj;
395         }
396         catch (com.liferay.portal.SystemException se) {
397             _log.error(se, se);
398 
399             throw se;
400         }
401     }
402 
403     public static byte[] exportLayouts(HttpPrincipal httpPrincipal,
404         long groupId, boolean privateLayout,
405         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
406         java.util.Date endDate)
407         throws com.liferay.portal.PortalException,
408             com.liferay.portal.SystemException {
409         try {
410             Object paramObj0 = new LongWrapper(groupId);
411 
412             Object paramObj1 = new BooleanWrapper(privateLayout);
413 
414             Object paramObj2 = parameterMap;
415 
416             if (parameterMap == null) {
417                 paramObj2 = new NullWrapper("java.util.Map");
418             }
419 
420             Object paramObj3 = startDate;
421 
422             if (startDate == null) {
423                 paramObj3 = new NullWrapper("java.util.Date");
424             }
425 
426             Object paramObj4 = endDate;
427 
428             if (endDate == null) {
429                 paramObj4 = new NullWrapper("java.util.Date");
430             }
431 
432             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
433                     "exportLayouts",
434                     new Object[] {
435                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
436                     });
437 
438             Object returnObj = null;
439 
440             try {
441                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
442             }
443             catch (Exception e) {
444                 if (e instanceof com.liferay.portal.PortalException) {
445                     throw (com.liferay.portal.PortalException)e;
446                 }
447 
448                 if (e instanceof com.liferay.portal.SystemException) {
449                     throw (com.liferay.portal.SystemException)e;
450                 }
451 
452                 throw new com.liferay.portal.SystemException(e);
453             }
454 
455             return (byte[])returnObj;
456         }
457         catch (com.liferay.portal.SystemException se) {
458             _log.error(se, se);
459 
460             throw se;
461         }
462     }
463 
464     public static byte[] exportLayouts(HttpPrincipal httpPrincipal,
465         long groupId, boolean privateLayout, long[] layoutIds,
466         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
467         java.util.Date endDate)
468         throws com.liferay.portal.PortalException,
469             com.liferay.portal.SystemException {
470         try {
471             Object paramObj0 = new LongWrapper(groupId);
472 
473             Object paramObj1 = new BooleanWrapper(privateLayout);
474 
475             Object paramObj2 = layoutIds;
476 
477             if (layoutIds == null) {
478                 paramObj2 = new NullWrapper("[J");
479             }
480 
481             Object paramObj3 = parameterMap;
482 
483             if (parameterMap == null) {
484                 paramObj3 = new NullWrapper("java.util.Map");
485             }
486 
487             Object paramObj4 = startDate;
488 
489             if (startDate == null) {
490                 paramObj4 = new NullWrapper("java.util.Date");
491             }
492 
493             Object paramObj5 = endDate;
494 
495             if (endDate == null) {
496                 paramObj5 = new NullWrapper("java.util.Date");
497             }
498 
499             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
500                     "exportLayouts",
501                     new Object[] {
502                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
503                         paramObj5
504                     });
505 
506             Object returnObj = null;
507 
508             try {
509                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
510             }
511             catch (Exception e) {
512                 if (e instanceof com.liferay.portal.PortalException) {
513                     throw (com.liferay.portal.PortalException)e;
514                 }
515 
516                 if (e instanceof com.liferay.portal.SystemException) {
517                     throw (com.liferay.portal.SystemException)e;
518                 }
519 
520                 throw new com.liferay.portal.SystemException(e);
521             }
522 
523             return (byte[])returnObj;
524         }
525         catch (com.liferay.portal.SystemException se) {
526             _log.error(se, se);
527 
528             throw se;
529         }
530     }
531 
532     public static com.liferay.portal.kernel.io.FileCacheOutputStream exportLayoutsAsStream(
533         HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
534         long[] layoutIds, java.util.Map<String, String[]> parameterMap,
535         java.util.Date startDate, java.util.Date endDate)
536         throws com.liferay.portal.PortalException,
537             com.liferay.portal.SystemException {
538         try {
539             Object paramObj0 = new LongWrapper(groupId);
540 
541             Object paramObj1 = new BooleanWrapper(privateLayout);
542 
543             Object paramObj2 = layoutIds;
544 
545             if (layoutIds == null) {
546                 paramObj2 = new NullWrapper("[J");
547             }
548 
549             Object paramObj3 = parameterMap;
550 
551             if (parameterMap == null) {
552                 paramObj3 = new NullWrapper("java.util.Map");
553             }
554 
555             Object paramObj4 = startDate;
556 
557             if (startDate == null) {
558                 paramObj4 = new NullWrapper("java.util.Date");
559             }
560 
561             Object paramObj5 = endDate;
562 
563             if (endDate == null) {
564                 paramObj5 = new NullWrapper("java.util.Date");
565             }
566 
567             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
568                     "exportLayoutsAsStream",
569                     new Object[] {
570                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
571                         paramObj5
572                     });
573 
574             Object returnObj = null;
575 
576             try {
577                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
578             }
579             catch (Exception e) {
580                 if (e instanceof com.liferay.portal.PortalException) {
581                     throw (com.liferay.portal.PortalException)e;
582                 }
583 
584                 if (e instanceof com.liferay.portal.SystemException) {
585                     throw (com.liferay.portal.SystemException)e;
586                 }
587 
588                 throw new com.liferay.portal.SystemException(e);
589             }
590 
591             return (com.liferay.portal.kernel.io.FileCacheOutputStream)returnObj;
592         }
593         catch (com.liferay.portal.SystemException se) {
594             _log.error(se, se);
595 
596             throw se;
597         }
598     }
599 
600     public static byte[] exportPortletInfo(HttpPrincipal httpPrincipal,
601         long plid, long groupId, java.lang.String portletId,
602         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
603         java.util.Date endDate)
604         throws com.liferay.portal.PortalException,
605             com.liferay.portal.SystemException {
606         try {
607             Object paramObj0 = new LongWrapper(plid);
608 
609             Object paramObj1 = new LongWrapper(groupId);
610 
611             Object paramObj2 = portletId;
612 
613             if (portletId == null) {
614                 paramObj2 = new NullWrapper("java.lang.String");
615             }
616 
617             Object paramObj3 = parameterMap;
618 
619             if (parameterMap == null) {
620                 paramObj3 = new NullWrapper("java.util.Map");
621             }
622 
623             Object paramObj4 = startDate;
624 
625             if (startDate == null) {
626                 paramObj4 = new NullWrapper("java.util.Date");
627             }
628 
629             Object paramObj5 = endDate;
630 
631             if (endDate == null) {
632                 paramObj5 = new NullWrapper("java.util.Date");
633             }
634 
635             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
636                     "exportPortletInfo",
637                     new Object[] {
638                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
639                         paramObj5
640                     });
641 
642             Object returnObj = null;
643 
644             try {
645                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
646             }
647             catch (Exception e) {
648                 if (e instanceof com.liferay.portal.PortalException) {
649                     throw (com.liferay.portal.PortalException)e;
650                 }
651 
652                 if (e instanceof com.liferay.portal.SystemException) {
653                     throw (com.liferay.portal.SystemException)e;
654                 }
655 
656                 throw new com.liferay.portal.SystemException(e);
657             }
658 
659             return (byte[])returnObj;
660         }
661         catch (com.liferay.portal.SystemException se) {
662             _log.error(se, se);
663 
664             throw se;
665         }
666     }
667 
668     public static com.liferay.portal.kernel.io.FileCacheOutputStream exportPortletInfoAsStream(
669         HttpPrincipal httpPrincipal, long plid, long groupId,
670         java.lang.String portletId,
671         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
672         java.util.Date endDate)
673         throws com.liferay.portal.PortalException,
674             com.liferay.portal.SystemException {
675         try {
676             Object paramObj0 = new LongWrapper(plid);
677 
678             Object paramObj1 = new LongWrapper(groupId);
679 
680             Object paramObj2 = portletId;
681 
682             if (portletId == null) {
683                 paramObj2 = new NullWrapper("java.lang.String");
684             }
685 
686             Object paramObj3 = parameterMap;
687 
688             if (parameterMap == null) {
689                 paramObj3 = new NullWrapper("java.util.Map");
690             }
691 
692             Object paramObj4 = startDate;
693 
694             if (startDate == null) {
695                 paramObj4 = new NullWrapper("java.util.Date");
696             }
697 
698             Object paramObj5 = endDate;
699 
700             if (endDate == null) {
701                 paramObj5 = new NullWrapper("java.util.Date");
702             }
703 
704             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
705                     "exportPortletInfoAsStream",
706                     new Object[] {
707                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
708                         paramObj5
709                     });
710 
711             Object returnObj = null;
712 
713             try {
714                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
715             }
716             catch (Exception e) {
717                 if (e instanceof com.liferay.portal.PortalException) {
718                     throw (com.liferay.portal.PortalException)e;
719                 }
720 
721                 if (e instanceof com.liferay.portal.SystemException) {
722                     throw (com.liferay.portal.SystemException)e;
723                 }
724 
725                 throw new com.liferay.portal.SystemException(e);
726             }
727 
728             return (com.liferay.portal.kernel.io.FileCacheOutputStream)returnObj;
729         }
730         catch (com.liferay.portal.SystemException se) {
731             _log.error(se, se);
732 
733             throw se;
734         }
735     }
736 
737     public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
738         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
739         java.io.File file)
740         throws com.liferay.portal.PortalException,
741             com.liferay.portal.SystemException {
742         try {
743             Object paramObj0 = new LongWrapper(groupId);
744 
745             Object paramObj1 = new BooleanWrapper(privateLayout);
746 
747             Object paramObj2 = parameterMap;
748 
749             if (parameterMap == null) {
750                 paramObj2 = new NullWrapper("java.util.Map");
751             }
752 
753             Object paramObj3 = file;
754 
755             if (file == null) {
756                 paramObj3 = new NullWrapper("java.io.File");
757             }
758 
759             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
760                     "importLayouts",
761                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
762 
763             try {
764                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
765             }
766             catch (Exception e) {
767                 if (e instanceof com.liferay.portal.PortalException) {
768                     throw (com.liferay.portal.PortalException)e;
769                 }
770 
771                 if (e instanceof com.liferay.portal.SystemException) {
772                     throw (com.liferay.portal.SystemException)e;
773                 }
774 
775                 throw new com.liferay.portal.SystemException(e);
776             }
777         }
778         catch (com.liferay.portal.SystemException se) {
779             _log.error(se, se);
780 
781             throw se;
782         }
783     }
784 
785     public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
786         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
787         byte[] bytes)
788         throws com.liferay.portal.PortalException,
789             com.liferay.portal.SystemException {
790         try {
791             Object paramObj0 = new LongWrapper(groupId);
792 
793             Object paramObj1 = new BooleanWrapper(privateLayout);
794 
795             Object paramObj2 = parameterMap;
796 
797             if (parameterMap == null) {
798                 paramObj2 = new NullWrapper("java.util.Map");
799             }
800 
801             Object paramObj3 = bytes;
802 
803             if (bytes == null) {
804                 paramObj3 = new NullWrapper("[B");
805             }
806 
807             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
808                     "importLayouts",
809                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
810 
811             try {
812                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
813             }
814             catch (Exception e) {
815                 if (e instanceof com.liferay.portal.PortalException) {
816                     throw (com.liferay.portal.PortalException)e;
817                 }
818 
819                 if (e instanceof com.liferay.portal.SystemException) {
820                     throw (com.liferay.portal.SystemException)e;
821                 }
822 
823                 throw new com.liferay.portal.SystemException(e);
824             }
825         }
826         catch (com.liferay.portal.SystemException se) {
827             _log.error(se, se);
828 
829             throw se;
830         }
831     }
832 
833     public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
834         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
835         java.io.InputStream is)
836         throws com.liferay.portal.PortalException,
837             com.liferay.portal.SystemException {
838         try {
839             Object paramObj0 = new LongWrapper(groupId);
840 
841             Object paramObj1 = new BooleanWrapper(privateLayout);
842 
843             Object paramObj2 = parameterMap;
844 
845             if (parameterMap == null) {
846                 paramObj2 = new NullWrapper("java.util.Map");
847             }
848 
849             Object paramObj3 = is;
850 
851             if (is == null) {
852                 paramObj3 = new NullWrapper("java.io.InputStream");
853             }
854 
855             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
856                     "importLayouts",
857                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
858 
859             try {
860                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
861             }
862             catch (Exception e) {
863                 if (e instanceof com.liferay.portal.PortalException) {
864                     throw (com.liferay.portal.PortalException)e;
865                 }
866 
867                 if (e instanceof com.liferay.portal.SystemException) {
868                     throw (com.liferay.portal.SystemException)e;
869                 }
870 
871                 throw new com.liferay.portal.SystemException(e);
872             }
873         }
874         catch (com.liferay.portal.SystemException se) {
875             _log.error(se, se);
876 
877             throw se;
878         }
879     }
880 
881     public static void importPortletInfo(HttpPrincipal httpPrincipal,
882         long plid, long groupId, java.lang.String portletId,
883         java.util.Map<String, String[]> parameterMap, java.io.File file)
884         throws com.liferay.portal.PortalException,
885             com.liferay.portal.SystemException {
886         try {
887             Object paramObj0 = new LongWrapper(plid);
888 
889             Object paramObj1 = new LongWrapper(groupId);
890 
891             Object paramObj2 = portletId;
892 
893             if (portletId == null) {
894                 paramObj2 = new NullWrapper("java.lang.String");
895             }
896 
897             Object paramObj3 = parameterMap;
898 
899             if (parameterMap == null) {
900                 paramObj3 = new NullWrapper("java.util.Map");
901             }
902 
903             Object paramObj4 = file;
904 
905             if (file == null) {
906                 paramObj4 = new NullWrapper("java.io.File");
907             }
908 
909             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
910                     "importPortletInfo",
911                     new Object[] {
912                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
913                     });
914 
915             try {
916                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
917             }
918             catch (Exception e) {
919                 if (e instanceof com.liferay.portal.PortalException) {
920                     throw (com.liferay.portal.PortalException)e;
921                 }
922 
923                 if (e instanceof com.liferay.portal.SystemException) {
924                     throw (com.liferay.portal.SystemException)e;
925                 }
926 
927                 throw new com.liferay.portal.SystemException(e);
928             }
929         }
930         catch (com.liferay.portal.SystemException se) {
931             _log.error(se, se);
932 
933             throw se;
934         }
935     }
936 
937     public static void importPortletInfo(HttpPrincipal httpPrincipal,
938         long plid, long groupId, java.lang.String portletId,
939         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
940         throws com.liferay.portal.PortalException,
941             com.liferay.portal.SystemException {
942         try {
943             Object paramObj0 = new LongWrapper(plid);
944 
945             Object paramObj1 = new LongWrapper(groupId);
946 
947             Object paramObj2 = portletId;
948 
949             if (portletId == null) {
950                 paramObj2 = new NullWrapper("java.lang.String");
951             }
952 
953             Object paramObj3 = parameterMap;
954 
955             if (parameterMap == null) {
956                 paramObj3 = new NullWrapper("java.util.Map");
957             }
958 
959             Object paramObj4 = is;
960 
961             if (is == null) {
962                 paramObj4 = new NullWrapper("java.io.InputStream");
963             }
964 
965             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
966                     "importPortletInfo",
967                     new Object[] {
968                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
969                     });
970 
971             try {
972                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
973             }
974             catch (Exception e) {
975                 if (e instanceof com.liferay.portal.PortalException) {
976                     throw (com.liferay.portal.PortalException)e;
977                 }
978 
979                 if (e instanceof com.liferay.portal.SystemException) {
980                     throw (com.liferay.portal.SystemException)e;
981                 }
982 
983                 throw new com.liferay.portal.SystemException(e);
984             }
985         }
986         catch (com.liferay.portal.SystemException se) {
987             _log.error(se, se);
988 
989             throw se;
990         }
991     }
992 
993     public static void schedulePublishToLive(HttpPrincipal httpPrincipal,
994         long sourceGroupId, long targetGroupId, boolean privateLayout,
995         java.util.Map<Long, Boolean> layoutIdMap,
996         java.util.Map<String, String[]> parameterMap, java.lang.String scope,
997         java.util.Date startDate, java.util.Date endDate,
998         java.lang.String groupName, java.lang.String cronText,
999         java.util.Date schedulerStartDate, java.util.Date schedulerEndDate,
1000        java.lang.String description)
1001        throws com.liferay.portal.PortalException,
1002            com.liferay.portal.SystemException {
1003        try {
1004            Object paramObj0 = new LongWrapper(sourceGroupId);
1005
1006            Object paramObj1 = new LongWrapper(targetGroupId);
1007
1008            Object paramObj2 = new BooleanWrapper(privateLayout);
1009
1010            Object paramObj3 = layoutIdMap;
1011
1012            if (layoutIdMap == null) {
1013                paramObj3 = new NullWrapper("java.util.Map");
1014            }
1015
1016            Object paramObj4 = parameterMap;
1017
1018            if (parameterMap == null) {
1019                paramObj4 = new NullWrapper("java.util.Map");
1020            }
1021
1022            Object paramObj5 = scope;
1023
1024            if (scope == null) {
1025                paramObj5 = new NullWrapper("java.lang.String");
1026            }
1027
1028            Object paramObj6 = startDate;
1029
1030            if (startDate == null) {
1031                paramObj6 = new NullWrapper("java.util.Date");
1032            }
1033
1034            Object paramObj7 = endDate;
1035
1036            if (endDate == null) {
1037                paramObj7 = new NullWrapper("java.util.Date");
1038            }
1039
1040            Object paramObj8 = groupName;
1041
1042            if (groupName == null) {
1043                paramObj8 = new NullWrapper("java.lang.String");
1044            }
1045
1046            Object paramObj9 = cronText;
1047
1048            if (cronText == null) {
1049                paramObj9 = new NullWrapper("java.lang.String");
1050            }
1051
1052            Object paramObj10 = schedulerStartDate;
1053
1054            if (schedulerStartDate == null) {
1055                paramObj10 = new NullWrapper("java.util.Date");
1056            }
1057
1058            Object paramObj11 = schedulerEndDate;
1059
1060            if (schedulerEndDate == null) {
1061                paramObj11 = new NullWrapper("java.util.Date");
1062            }
1063
1064            Object paramObj12 = description;
1065
1066            if (description == null) {
1067                paramObj12 = new NullWrapper("java.lang.String");
1068            }
1069
1070            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1071                    "schedulePublishToLive",
1072                    new Object[] {
1073                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1074                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1075                        paramObj10, paramObj11, paramObj12
1076                    });
1077
1078            try {
1079                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1080            }
1081            catch (Exception e) {
1082                if (e instanceof com.liferay.portal.PortalException) {
1083                    throw (com.liferay.portal.PortalException)e;
1084                }
1085
1086                if (e instanceof com.liferay.portal.SystemException) {
1087                    throw (com.liferay.portal.SystemException)e;
1088                }
1089
1090                throw new com.liferay.portal.SystemException(e);
1091            }
1092        }
1093        catch (com.liferay.portal.SystemException se) {
1094            _log.error(se, se);
1095
1096            throw se;
1097        }
1098    }
1099
1100    public static void schedulePublishToRemote(HttpPrincipal httpPrincipal,
1101        long sourceGroupId, boolean privateLayout,
1102        java.util.Map<Long, Boolean> layoutIdMap,
1103        java.util.Map<String, String[]> parameterMap,
1104        java.lang.String remoteAddress, int remotePort,
1105        boolean secureConnection, long remoteGroupId,
1106        boolean remotePrivateLayout, java.util.Date startDate,
1107        java.util.Date endDate, java.lang.String groupName,
1108        java.lang.String cronText, java.util.Date schedulerStartDate,
1109        java.util.Date schedulerEndDate, java.lang.String description)
1110        throws com.liferay.portal.PortalException,
1111            com.liferay.portal.SystemException {
1112        try {
1113            Object paramObj0 = new LongWrapper(sourceGroupId);
1114
1115            Object paramObj1 = new BooleanWrapper(privateLayout);
1116
1117            Object paramObj2 = layoutIdMap;
1118
1119            if (layoutIdMap == null) {
1120                paramObj2 = new NullWrapper("java.util.Map");
1121            }
1122
1123            Object paramObj3 = parameterMap;
1124
1125            if (parameterMap == null) {
1126                paramObj3 = new NullWrapper("java.util.Map");
1127            }
1128
1129            Object paramObj4 = remoteAddress;
1130
1131            if (remoteAddress == null) {
1132                paramObj4 = new NullWrapper("java.lang.String");
1133            }
1134
1135            Object paramObj5 = new IntegerWrapper(remotePort);
1136
1137            Object paramObj6 = new BooleanWrapper(secureConnection);
1138
1139            Object paramObj7 = new LongWrapper(remoteGroupId);
1140
1141            Object paramObj8 = new BooleanWrapper(remotePrivateLayout);
1142
1143            Object paramObj9 = startDate;
1144
1145            if (startDate == null) {
1146                paramObj9 = new NullWrapper("java.util.Date");
1147            }
1148
1149            Object paramObj10 = endDate;
1150
1151            if (endDate == null) {
1152                paramObj10 = new NullWrapper("java.util.Date");
1153            }
1154
1155            Object paramObj11 = groupName;
1156
1157            if (groupName == null) {
1158                paramObj11 = new NullWrapper("java.lang.String");
1159            }
1160
1161            Object paramObj12 = cronText;
1162
1163            if (cronText == null) {
1164                paramObj12 = new NullWrapper("java.lang.String");
1165            }
1166
1167            Object paramObj13 = schedulerStartDate;
1168
1169            if (schedulerStartDate == null) {
1170                paramObj13 = new NullWrapper("java.util.Date");
1171            }
1172
1173            Object paramObj14 = schedulerEndDate;
1174
1175            if (schedulerEndDate == null) {
1176                paramObj14 = new NullWrapper("java.util.Date");
1177            }
1178
1179            Object paramObj15 = description;
1180
1181            if (description == null) {
1182                paramObj15 = new NullWrapper("java.lang.String");
1183            }
1184
1185            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1186                    "schedulePublishToRemote",
1187                    new Object[] {
1188                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1189                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1190                        paramObj10, paramObj11, paramObj12, paramObj13,
1191                        paramObj14, paramObj15
1192                    });
1193
1194            try {
1195                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1196            }
1197            catch (Exception e) {
1198                if (e instanceof com.liferay.portal.PortalException) {
1199                    throw (com.liferay.portal.PortalException)e;
1200                }
1201
1202                if (e instanceof com.liferay.portal.SystemException) {
1203                    throw (com.liferay.portal.SystemException)e;
1204                }
1205
1206                throw new com.liferay.portal.SystemException(e);
1207            }
1208        }
1209        catch (com.liferay.portal.SystemException se) {
1210            _log.error(se, se);
1211
1212            throw se;
1213        }
1214    }
1215
1216    public static void setLayouts(HttpPrincipal httpPrincipal, long groupId,
1217        boolean privateLayout, long parentLayoutId, long[] layoutIds)
1218        throws com.liferay.portal.PortalException,
1219            com.liferay.portal.SystemException {
1220        try {
1221            Object paramObj0 = new LongWrapper(groupId);
1222
1223            Object paramObj1 = new BooleanWrapper(privateLayout);
1224
1225            Object paramObj2 = new LongWrapper(parentLayoutId);
1226
1227            Object paramObj3 = layoutIds;
1228
1229            if (layoutIds == null) {
1230                paramObj3 = new NullWrapper("[J");
1231            }
1232
1233            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1234                    "setLayouts",
1235                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1236
1237            try {
1238                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1239            }
1240            catch (Exception e) {
1241                if (e instanceof com.liferay.portal.PortalException) {
1242                    throw (com.liferay.portal.PortalException)e;
1243                }
1244
1245                if (e instanceof com.liferay.portal.SystemException) {
1246                    throw (com.liferay.portal.SystemException)e;
1247                }
1248
1249                throw new com.liferay.portal.SystemException(e);
1250            }
1251        }
1252        catch (com.liferay.portal.SystemException se) {
1253            _log.error(se, se);
1254
1255            throw se;
1256        }
1257    }
1258
1259    public static void unschedulePublishToLive(HttpPrincipal httpPrincipal,
1260        long groupId, java.lang.String jobName, java.lang.String groupName)
1261        throws com.liferay.portal.PortalException,
1262            com.liferay.portal.SystemException {
1263        try {
1264            Object paramObj0 = new LongWrapper(groupId);
1265
1266            Object paramObj1 = jobName;
1267
1268            if (jobName == null) {
1269                paramObj1 = new NullWrapper("java.lang.String");
1270            }
1271
1272            Object paramObj2 = groupName;
1273
1274            if (groupName == null) {
1275                paramObj2 = new NullWrapper("java.lang.String");
1276            }
1277
1278            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1279                    "unschedulePublishToLive",
1280                    new Object[] { paramObj0, paramObj1, paramObj2 });
1281
1282            try {
1283                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1284            }
1285            catch (Exception e) {
1286                if (e instanceof com.liferay.portal.PortalException) {
1287                    throw (com.liferay.portal.PortalException)e;
1288                }
1289
1290                if (e instanceof com.liferay.portal.SystemException) {
1291                    throw (com.liferay.portal.SystemException)e;
1292                }
1293
1294                throw new com.liferay.portal.SystemException(e);
1295            }
1296        }
1297        catch (com.liferay.portal.SystemException se) {
1298            _log.error(se, se);
1299
1300            throw se;
1301        }
1302    }
1303
1304    public static void unschedulePublishToRemote(HttpPrincipal httpPrincipal,
1305        long groupId, java.lang.String jobName, java.lang.String groupName)
1306        throws com.liferay.portal.PortalException,
1307            com.liferay.portal.SystemException {
1308        try {
1309            Object paramObj0 = new LongWrapper(groupId);
1310
1311            Object paramObj1 = jobName;
1312
1313            if (jobName == null) {
1314                paramObj1 = new NullWrapper("java.lang.String");
1315            }
1316
1317            Object paramObj2 = groupName;
1318
1319            if (groupName == null) {
1320                paramObj2 = new NullWrapper("java.lang.String");
1321            }
1322
1323            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1324                    "unschedulePublishToRemote",
1325                    new Object[] { paramObj0, paramObj1, paramObj2 });
1326
1327            try {
1328                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1329            }
1330            catch (Exception e) {
1331                if (e instanceof com.liferay.portal.PortalException) {
1332                    throw (com.liferay.portal.PortalException)e;
1333                }
1334
1335                if (e instanceof com.liferay.portal.SystemException) {
1336                    throw (com.liferay.portal.SystemException)e;
1337                }
1338
1339                throw new com.liferay.portal.SystemException(e);
1340            }
1341        }
1342        catch (com.liferay.portal.SystemException se) {
1343            _log.error(se, se);
1344
1345            throw se;
1346        }
1347    }
1348
1349    public static com.liferay.portal.model.Layout updateLayout(
1350        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1351        long layoutId, long parentLayoutId,
1352        java.util.Map<java.util.Locale, String> localeNamesMap,
1353        java.util.Map<java.util.Locale, String> localeTitlesMap,
1354        java.lang.String description, java.lang.String type, boolean hidden,
1355        java.lang.String friendlyURL)
1356        throws com.liferay.portal.PortalException,
1357            com.liferay.portal.SystemException {
1358        try {
1359            Object paramObj0 = new LongWrapper(groupId);
1360
1361            Object paramObj1 = new BooleanWrapper(privateLayout);
1362
1363            Object paramObj2 = new LongWrapper(layoutId);
1364
1365            Object paramObj3 = new LongWrapper(parentLayoutId);
1366
1367            Object paramObj4 = localeNamesMap;
1368
1369            if (localeNamesMap == null) {
1370                paramObj4 = new NullWrapper("java.util.Map");
1371            }
1372
1373            Object paramObj5 = localeTitlesMap;
1374
1375            if (localeTitlesMap == null) {
1376                paramObj5 = new NullWrapper("java.util.Map");
1377            }
1378
1379            Object paramObj6 = description;
1380
1381            if (description == null) {
1382                paramObj6 = new NullWrapper("java.lang.String");
1383            }
1384
1385            Object paramObj7 = type;
1386
1387            if (type == null) {
1388                paramObj7 = new NullWrapper("java.lang.String");
1389            }
1390
1391            Object paramObj8 = new BooleanWrapper(hidden);
1392
1393            Object paramObj9 = friendlyURL;
1394
1395            if (friendlyURL == null) {
1396                paramObj9 = new NullWrapper("java.lang.String");
1397            }
1398
1399            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1400                    "updateLayout",
1401                    new Object[] {
1402                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1403                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9
1404                    });
1405
1406            Object returnObj = null;
1407
1408            try {
1409                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1410            }
1411            catch (Exception e) {
1412                if (e instanceof com.liferay.portal.PortalException) {
1413                    throw (com.liferay.portal.PortalException)e;
1414                }
1415
1416                if (e instanceof com.liferay.portal.SystemException) {
1417                    throw (com.liferay.portal.SystemException)e;
1418                }
1419
1420                throw new com.liferay.portal.SystemException(e);
1421            }
1422
1423            return (com.liferay.portal.model.Layout)returnObj;
1424        }
1425        catch (com.liferay.portal.SystemException se) {
1426            _log.error(se, se);
1427
1428            throw se;
1429        }
1430    }
1431
1432    public static com.liferay.portal.model.Layout updateLayout(
1433        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1434        long layoutId, long parentLayoutId,
1435        java.util.Map<java.util.Locale, String> localeNamesMap,
1436        java.util.Map<java.util.Locale, String> localeTitlesMap,
1437        java.lang.String description, java.lang.String type, boolean hidden,
1438        java.lang.String friendlyURL, java.lang.Boolean iconImage,
1439        byte[] iconBytes)
1440        throws com.liferay.portal.PortalException,
1441            com.liferay.portal.SystemException {
1442        try {
1443            Object paramObj0 = new LongWrapper(groupId);
1444
1445            Object paramObj1 = new BooleanWrapper(privateLayout);
1446
1447            Object paramObj2 = new LongWrapper(layoutId);
1448
1449            Object paramObj3 = new LongWrapper(parentLayoutId);
1450
1451            Object paramObj4 = localeNamesMap;
1452
1453            if (localeNamesMap == null) {
1454                paramObj4 = new NullWrapper("java.util.Map");
1455            }
1456
1457            Object paramObj5 = localeTitlesMap;
1458
1459            if (localeTitlesMap == null) {
1460                paramObj5 = new NullWrapper("java.util.Map");
1461            }
1462
1463            Object paramObj6 = description;
1464
1465            if (description == null) {
1466                paramObj6 = new NullWrapper("java.lang.String");
1467            }
1468
1469            Object paramObj7 = type;
1470
1471            if (type == null) {
1472                paramObj7 = new NullWrapper("java.lang.String");
1473            }
1474
1475            Object paramObj8 = new BooleanWrapper(hidden);
1476
1477            Object paramObj9 = friendlyURL;
1478
1479            if (friendlyURL == null) {
1480                paramObj9 = new NullWrapper("java.lang.String");
1481            }
1482
1483            Object paramObj10 = iconImage;
1484
1485            if (iconImage == null) {
1486                paramObj10 = new NullWrapper("java.lang.Boolean");
1487            }
1488
1489            Object paramObj11 = iconBytes;
1490
1491            if (iconBytes == null) {
1492                paramObj11 = new NullWrapper("[B");
1493            }
1494
1495            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1496                    "updateLayout",
1497                    new Object[] {
1498                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1499                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1500                        paramObj10, paramObj11
1501                    });
1502
1503            Object returnObj = null;
1504
1505            try {
1506                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1507            }
1508            catch (Exception e) {
1509                if (e instanceof com.liferay.portal.PortalException) {
1510                    throw (com.liferay.portal.PortalException)e;
1511                }
1512
1513                if (e instanceof com.liferay.portal.SystemException) {
1514                    throw (com.liferay.portal.SystemException)e;
1515                }
1516
1517                throw new com.liferay.portal.SystemException(e);
1518            }
1519
1520            return (com.liferay.portal.model.Layout)returnObj;
1521        }
1522        catch (com.liferay.portal.SystemException se) {
1523            _log.error(se, se);
1524
1525            throw se;
1526        }
1527    }
1528
1529    public static com.liferay.portal.model.Layout updateLayout(
1530        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1531        long layoutId, java.lang.String typeSettings)
1532        throws com.liferay.portal.PortalException,
1533            com.liferay.portal.SystemException {
1534        try {
1535            Object paramObj0 = new LongWrapper(groupId);
1536
1537            Object paramObj1 = new BooleanWrapper(privateLayout);
1538
1539            Object paramObj2 = new LongWrapper(layoutId);
1540
1541            Object paramObj3 = typeSettings;
1542
1543            if (typeSettings == null) {
1544                paramObj3 = new NullWrapper("java.lang.String");
1545            }
1546
1547            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1548                    "updateLayout",
1549                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1550
1551            Object returnObj = null;
1552
1553            try {
1554                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1555            }
1556            catch (Exception e) {
1557                if (e instanceof com.liferay.portal.PortalException) {
1558                    throw (com.liferay.portal.PortalException)e;
1559                }
1560
1561                if (e instanceof com.liferay.portal.SystemException) {
1562                    throw (com.liferay.portal.SystemException)e;
1563                }
1564
1565                throw new com.liferay.portal.SystemException(e);
1566            }
1567
1568            return (com.liferay.portal.model.Layout)returnObj;
1569        }
1570        catch (com.liferay.portal.SystemException se) {
1571            _log.error(se, se);
1572
1573            throw se;
1574        }
1575    }
1576
1577    public static com.liferay.portal.model.Layout updateLookAndFeel(
1578        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1579        long layoutId, java.lang.String themeId,
1580        java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme)
1581        throws com.liferay.portal.PortalException,
1582            com.liferay.portal.SystemException {
1583        try {
1584            Object paramObj0 = new LongWrapper(groupId);
1585
1586            Object paramObj1 = new BooleanWrapper(privateLayout);
1587
1588            Object paramObj2 = new LongWrapper(layoutId);
1589
1590            Object paramObj3 = themeId;
1591
1592            if (themeId == null) {
1593                paramObj3 = new NullWrapper("java.lang.String");
1594            }
1595
1596            Object paramObj4 = colorSchemeId;
1597
1598            if (colorSchemeId == null) {
1599                paramObj4 = new NullWrapper("java.lang.String");
1600            }
1601
1602            Object paramObj5 = css;
1603
1604            if (css == null) {
1605                paramObj5 = new NullWrapper("java.lang.String");
1606            }
1607
1608            Object paramObj6 = new BooleanWrapper(wapTheme);
1609
1610            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1611                    "updateLookAndFeel",
1612                    new Object[] {
1613                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1614                        paramObj5, paramObj6
1615                    });
1616
1617            Object returnObj = null;
1618
1619            try {
1620                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1621            }
1622            catch (Exception e) {
1623                if (e instanceof com.liferay.portal.PortalException) {
1624                    throw (com.liferay.portal.PortalException)e;
1625                }
1626
1627                if (e instanceof com.liferay.portal.SystemException) {
1628                    throw (com.liferay.portal.SystemException)e;
1629                }
1630
1631                throw new com.liferay.portal.SystemException(e);
1632            }
1633
1634            return (com.liferay.portal.model.Layout)returnObj;
1635        }
1636        catch (com.liferay.portal.SystemException se) {
1637            _log.error(se, se);
1638
1639            throw se;
1640        }
1641    }
1642
1643    public static com.liferay.portal.model.Layout updateName(
1644        HttpPrincipal httpPrincipal, long plid, java.lang.String name,
1645        java.lang.String languageId)
1646        throws com.liferay.portal.PortalException,
1647            com.liferay.portal.SystemException {
1648        try {
1649            Object paramObj0 = new LongWrapper(plid);
1650
1651            Object paramObj1 = name;
1652
1653            if (name == null) {
1654                paramObj1 = new NullWrapper("java.lang.String");
1655            }
1656
1657            Object paramObj2 = languageId;
1658
1659            if (languageId == null) {
1660                paramObj2 = new NullWrapper("java.lang.String");
1661            }
1662
1663            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1664                    "updateName",
1665                    new Object[] { paramObj0, paramObj1, paramObj2 });
1666
1667            Object returnObj = null;
1668
1669            try {
1670                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1671            }
1672            catch (Exception e) {
1673                if (e instanceof com.liferay.portal.PortalException) {
1674                    throw (com.liferay.portal.PortalException)e;
1675                }
1676
1677                if (e instanceof com.liferay.portal.SystemException) {
1678                    throw (com.liferay.portal.SystemException)e;
1679                }
1680
1681                throw new com.liferay.portal.SystemException(e);
1682            }
1683
1684            return (com.liferay.portal.model.Layout)returnObj;
1685        }
1686        catch (com.liferay.portal.SystemException se) {
1687            _log.error(se, se);
1688
1689            throw se;
1690        }
1691    }
1692
1693    public static com.liferay.portal.model.Layout updateName(
1694        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1695        long layoutId, java.lang.String name, java.lang.String languageId)
1696        throws com.liferay.portal.PortalException,
1697            com.liferay.portal.SystemException {
1698        try {
1699            Object paramObj0 = new LongWrapper(groupId);
1700
1701            Object paramObj1 = new BooleanWrapper(privateLayout);
1702
1703            Object paramObj2 = new LongWrapper(layoutId);
1704
1705            Object paramObj3 = name;
1706
1707            if (name == null) {
1708                paramObj3 = new NullWrapper("java.lang.String");
1709            }
1710
1711            Object paramObj4 = languageId;
1712
1713            if (languageId == null) {
1714                paramObj4 = new NullWrapper("java.lang.String");
1715            }
1716
1717            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1718                    "updateName",
1719                    new Object[] {
1720                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
1721                    });
1722
1723            Object returnObj = null;
1724
1725            try {
1726                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1727            }
1728            catch (Exception e) {
1729                if (e instanceof com.liferay.portal.PortalException) {
1730                    throw (com.liferay.portal.PortalException)e;
1731                }
1732
1733                if (e instanceof com.liferay.portal.SystemException) {
1734                    throw (com.liferay.portal.SystemException)e;
1735                }
1736
1737                throw new com.liferay.portal.SystemException(e);
1738            }
1739
1740            return (com.liferay.portal.model.Layout)returnObj;
1741        }
1742        catch (com.liferay.portal.SystemException se) {
1743            _log.error(se, se);
1744
1745            throw se;
1746        }
1747    }
1748
1749    public static com.liferay.portal.model.Layout updateParentLayoutId(
1750        HttpPrincipal httpPrincipal, long plid, long parentPlid)
1751        throws com.liferay.portal.PortalException,
1752            com.liferay.portal.SystemException {
1753        try {
1754            Object paramObj0 = new LongWrapper(plid);
1755
1756            Object paramObj1 = new LongWrapper(parentPlid);
1757
1758            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1759                    "updateParentLayoutId",
1760                    new Object[] { paramObj0, paramObj1 });
1761
1762            Object returnObj = null;
1763
1764            try {
1765                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1766            }
1767            catch (Exception e) {
1768                if (e instanceof com.liferay.portal.PortalException) {
1769                    throw (com.liferay.portal.PortalException)e;
1770                }
1771
1772                if (e instanceof com.liferay.portal.SystemException) {
1773                    throw (com.liferay.portal.SystemException)e;
1774                }
1775
1776                throw new com.liferay.portal.SystemException(e);
1777            }
1778
1779            return (com.liferay.portal.model.Layout)returnObj;
1780        }
1781        catch (com.liferay.portal.SystemException se) {
1782            _log.error(se, se);
1783
1784            throw se;
1785        }
1786    }
1787
1788    public static com.liferay.portal.model.Layout updateParentLayoutId(
1789        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1790        long layoutId, long parentLayoutId)
1791        throws com.liferay.portal.PortalException,
1792            com.liferay.portal.SystemException {
1793        try {
1794            Object paramObj0 = new LongWrapper(groupId);
1795
1796            Object paramObj1 = new BooleanWrapper(privateLayout);
1797
1798            Object paramObj2 = new LongWrapper(layoutId);
1799
1800            Object paramObj3 = new LongWrapper(parentLayoutId);
1801
1802            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1803                    "updateParentLayoutId",
1804                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1805
1806            Object returnObj = null;
1807
1808            try {
1809                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1810            }
1811            catch (Exception e) {
1812                if (e instanceof com.liferay.portal.PortalException) {
1813                    throw (com.liferay.portal.PortalException)e;
1814                }
1815
1816                if (e instanceof com.liferay.portal.SystemException) {
1817                    throw (com.liferay.portal.SystemException)e;
1818                }
1819
1820                throw new com.liferay.portal.SystemException(e);
1821            }
1822
1823            return (com.liferay.portal.model.Layout)returnObj;
1824        }
1825        catch (com.liferay.portal.SystemException se) {
1826            _log.error(se, se);
1827
1828            throw se;
1829        }
1830    }
1831
1832    public static com.liferay.portal.model.Layout updatePriority(
1833        HttpPrincipal httpPrincipal, long plid, int priority)
1834        throws com.liferay.portal.PortalException,
1835            com.liferay.portal.SystemException {
1836        try {
1837            Object paramObj0 = new LongWrapper(plid);
1838
1839            Object paramObj1 = new IntegerWrapper(priority);
1840
1841            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1842                    "updatePriority", new Object[] { paramObj0, paramObj1 });
1843
1844            Object returnObj = null;
1845
1846            try {
1847                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1848            }
1849            catch (Exception e) {
1850                if (e instanceof com.liferay.portal.PortalException) {
1851                    throw (com.liferay.portal.PortalException)e;
1852                }
1853
1854                if (e instanceof com.liferay.portal.SystemException) {
1855                    throw (com.liferay.portal.SystemException)e;
1856                }
1857
1858                throw new com.liferay.portal.SystemException(e);
1859            }
1860
1861            return (com.liferay.portal.model.Layout)returnObj;
1862        }
1863        catch (com.liferay.portal.SystemException se) {
1864            _log.error(se, se);
1865
1866            throw se;
1867        }
1868    }
1869
1870    public static com.liferay.portal.model.Layout updatePriority(
1871        HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1872        long layoutId, int priority)
1873        throws com.liferay.portal.PortalException,
1874            com.liferay.portal.SystemException {
1875        try {
1876            Object paramObj0 = new LongWrapper(groupId);
1877
1878            Object paramObj1 = new BooleanWrapper(privateLayout);
1879
1880            Object paramObj2 = new LongWrapper(layoutId);
1881
1882            Object paramObj3 = new IntegerWrapper(priority);
1883
1884            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1885                    "updatePriority",
1886                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1887
1888            Object returnObj = null;
1889
1890            try {
1891                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1892            }
1893            catch (Exception e) {
1894                if (e instanceof com.liferay.portal.PortalException) {
1895                    throw (com.liferay.portal.PortalException)e;
1896                }
1897
1898                if (e instanceof com.liferay.portal.SystemException) {
1899                    throw (com.liferay.portal.SystemException)e;
1900                }
1901
1902                throw new com.liferay.portal.SystemException(e);
1903            }
1904
1905            return (com.liferay.portal.model.Layout)returnObj;
1906        }
1907        catch (com.liferay.portal.SystemException se) {
1908            _log.error(se, se);
1909
1910            throw se;
1911        }
1912    }
1913
1914    private static Log _log = LogFactoryUtil.getLog(LayoutServiceHttp.class);
1915}