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