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,
76          java.util.Map<java.util.Locale, String> localeNamesMap,
77          java.util.Map<java.util.Locale, String> localeTitlesMap,
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 = localeNamesMap;
90  
91              if (localeNamesMap == null) {
92                  paramObj3 = new NullWrapper("java.util.Map");
93              }
94  
95              Object paramObj4 = localeTitlesMap;
96  
97              if (localeTitlesMap == null) {
98                  paramObj4 = new NullWrapper("java.util.Map");
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, java.lang.String name, java.lang.String title,
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 = name;
169 
170             if (name == null) {
171                 paramObj3 = new NullWrapper("java.lang.String");
172             }
173 
174             Object paramObj4 = title;
175 
176             if (title == null) {
177                 paramObj4 = new NullWrapper("java.lang.String");
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 byte[] exportLayouts(HttpPrincipal httpPrincipal,
302         long groupId, boolean privateLayout, long[] layoutIds,
303         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
304         java.util.Date endDate)
305         throws com.liferay.portal.PortalException,
306             com.liferay.portal.SystemException {
307         try {
308             Object paramObj0 = new LongWrapper(groupId);
309 
310             Object paramObj1 = new BooleanWrapper(privateLayout);
311 
312             Object paramObj2 = layoutIds;
313 
314             if (layoutIds == null) {
315                 paramObj2 = new NullWrapper("[J");
316             }
317 
318             Object paramObj3 = parameterMap;
319 
320             if (parameterMap == null) {
321                 paramObj3 = new NullWrapper("java.util.Map");
322             }
323 
324             Object paramObj4 = startDate;
325 
326             if (startDate == null) {
327                 paramObj4 = new NullWrapper("java.util.Date");
328             }
329 
330             Object paramObj5 = endDate;
331 
332             if (endDate == null) {
333                 paramObj5 = new NullWrapper("java.util.Date");
334             }
335 
336             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
337                     "exportLayouts",
338                     new Object[] {
339                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
340                         paramObj5
341                     });
342 
343             Object returnObj = null;
344 
345             try {
346                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
347             }
348             catch (Exception e) {
349                 if (e instanceof com.liferay.portal.PortalException) {
350                     throw (com.liferay.portal.PortalException)e;
351                 }
352 
353                 if (e instanceof com.liferay.portal.SystemException) {
354                     throw (com.liferay.portal.SystemException)e;
355                 }
356 
357                 throw new com.liferay.portal.SystemException(e);
358             }
359 
360             return (byte[])returnObj;
361         }
362         catch (com.liferay.portal.SystemException se) {
363             _log.error(se, se);
364 
365             throw se;
366         }
367     }
368 
369     public static byte[] exportLayouts(HttpPrincipal httpPrincipal,
370         long groupId, boolean privateLayout,
371         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
372         java.util.Date endDate)
373         throws com.liferay.portal.PortalException,
374             com.liferay.portal.SystemException {
375         try {
376             Object paramObj0 = new LongWrapper(groupId);
377 
378             Object paramObj1 = new BooleanWrapper(privateLayout);
379 
380             Object paramObj2 = parameterMap;
381 
382             if (parameterMap == null) {
383                 paramObj2 = new NullWrapper("java.util.Map");
384             }
385 
386             Object paramObj3 = startDate;
387 
388             if (startDate == null) {
389                 paramObj3 = new NullWrapper("java.util.Date");
390             }
391 
392             Object paramObj4 = endDate;
393 
394             if (endDate == null) {
395                 paramObj4 = new NullWrapper("java.util.Date");
396             }
397 
398             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
399                     "exportLayouts",
400                     new Object[] {
401                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
402                     });
403 
404             Object returnObj = null;
405 
406             try {
407                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
408             }
409             catch (Exception e) {
410                 if (e instanceof com.liferay.portal.PortalException) {
411                     throw (com.liferay.portal.PortalException)e;
412                 }
413 
414                 if (e instanceof com.liferay.portal.SystemException) {
415                     throw (com.liferay.portal.SystemException)e;
416                 }
417 
418                 throw new com.liferay.portal.SystemException(e);
419             }
420 
421             return (byte[])returnObj;
422         }
423         catch (com.liferay.portal.SystemException se) {
424             _log.error(se, se);
425 
426             throw se;
427         }
428     }
429 
430     public static java.io.File exportLayoutsAsFile(
431         HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
432         long[] layoutIds, java.util.Map<String, String[]> parameterMap,
433         java.util.Date startDate, java.util.Date endDate)
434         throws com.liferay.portal.PortalException,
435             com.liferay.portal.SystemException {
436         try {
437             Object paramObj0 = new LongWrapper(groupId);
438 
439             Object paramObj1 = new BooleanWrapper(privateLayout);
440 
441             Object paramObj2 = layoutIds;
442 
443             if (layoutIds == null) {
444                 paramObj2 = new NullWrapper("[J");
445             }
446 
447             Object paramObj3 = parameterMap;
448 
449             if (parameterMap == null) {
450                 paramObj3 = new NullWrapper("java.util.Map");
451             }
452 
453             Object paramObj4 = startDate;
454 
455             if (startDate == null) {
456                 paramObj4 = new NullWrapper("java.util.Date");
457             }
458 
459             Object paramObj5 = endDate;
460 
461             if (endDate == null) {
462                 paramObj5 = new NullWrapper("java.util.Date");
463             }
464 
465             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
466                     "exportLayoutsAsFile",
467                     new Object[] {
468                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
469                         paramObj5
470                     });
471 
472             Object returnObj = null;
473 
474             try {
475                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
476             }
477             catch (Exception e) {
478                 if (e instanceof com.liferay.portal.PortalException) {
479                     throw (com.liferay.portal.PortalException)e;
480                 }
481 
482                 if (e instanceof com.liferay.portal.SystemException) {
483                     throw (com.liferay.portal.SystemException)e;
484                 }
485 
486                 throw new com.liferay.portal.SystemException(e);
487             }
488 
489             return (java.io.File)returnObj;
490         }
491         catch (com.liferay.portal.SystemException se) {
492             _log.error(se, se);
493 
494             throw se;
495         }
496     }
497 
498     public static byte[] exportPortletInfo(HttpPrincipal httpPrincipal,
499         long plid, long groupId, java.lang.String portletId,
500         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
501         java.util.Date endDate)
502         throws com.liferay.portal.PortalException,
503             com.liferay.portal.SystemException {
504         try {
505             Object paramObj0 = new LongWrapper(plid);
506 
507             Object paramObj1 = new LongWrapper(groupId);
508 
509             Object paramObj2 = portletId;
510 
511             if (portletId == null) {
512                 paramObj2 = new NullWrapper("java.lang.String");
513             }
514 
515             Object paramObj3 = parameterMap;
516 
517             if (parameterMap == null) {
518                 paramObj3 = new NullWrapper("java.util.Map");
519             }
520 
521             Object paramObj4 = startDate;
522 
523             if (startDate == null) {
524                 paramObj4 = new NullWrapper("java.util.Date");
525             }
526 
527             Object paramObj5 = endDate;
528 
529             if (endDate == null) {
530                 paramObj5 = new NullWrapper("java.util.Date");
531             }
532 
533             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
534                     "exportPortletInfo",
535                     new Object[] {
536                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
537                         paramObj5
538                     });
539 
540             Object returnObj = null;
541 
542             try {
543                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
544             }
545             catch (Exception e) {
546                 if (e instanceof com.liferay.portal.PortalException) {
547                     throw (com.liferay.portal.PortalException)e;
548                 }
549 
550                 if (e instanceof com.liferay.portal.SystemException) {
551                     throw (com.liferay.portal.SystemException)e;
552                 }
553 
554                 throw new com.liferay.portal.SystemException(e);
555             }
556 
557             return (byte[])returnObj;
558         }
559         catch (com.liferay.portal.SystemException se) {
560             _log.error(se, se);
561 
562             throw se;
563         }
564     }
565 
566     public static java.io.File exportPortletInfoAsFile(
567         HttpPrincipal httpPrincipal, long plid, long groupId,
568         java.lang.String portletId,
569         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
570         java.util.Date endDate)
571         throws com.liferay.portal.PortalException,
572             com.liferay.portal.SystemException {
573         try {
574             Object paramObj0 = new LongWrapper(plid);
575 
576             Object paramObj1 = new LongWrapper(groupId);
577 
578             Object paramObj2 = portletId;
579 
580             if (portletId == null) {
581                 paramObj2 = new NullWrapper("java.lang.String");
582             }
583 
584             Object paramObj3 = parameterMap;
585 
586             if (parameterMap == null) {
587                 paramObj3 = new NullWrapper("java.util.Map");
588             }
589 
590             Object paramObj4 = startDate;
591 
592             if (startDate == null) {
593                 paramObj4 = new NullWrapper("java.util.Date");
594             }
595 
596             Object paramObj5 = endDate;
597 
598             if (endDate == null) {
599                 paramObj5 = new NullWrapper("java.util.Date");
600             }
601 
602             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
603                     "exportPortletInfoAsFile",
604                     new Object[] {
605                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
606                         paramObj5
607                     });
608 
609             Object returnObj = null;
610 
611             try {
612                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
613             }
614             catch (Exception e) {
615                 if (e instanceof com.liferay.portal.PortalException) {
616                     throw (com.liferay.portal.PortalException)e;
617                 }
618 
619                 if (e instanceof com.liferay.portal.SystemException) {
620                     throw (com.liferay.portal.SystemException)e;
621                 }
622 
623                 throw new com.liferay.portal.SystemException(e);
624             }
625 
626             return (java.io.File)returnObj;
627         }
628         catch (com.liferay.portal.SystemException se) {
629             _log.error(se, se);
630 
631             throw se;
632         }
633     }
634 
635     public static java.lang.String getLayoutName(HttpPrincipal httpPrincipal,
636         long groupId, boolean privateLayout, long layoutId,
637         java.lang.String languageId)
638         throws com.liferay.portal.PortalException,
639             com.liferay.portal.SystemException {
640         try {
641             Object paramObj0 = new LongWrapper(groupId);
642 
643             Object paramObj1 = new BooleanWrapper(privateLayout);
644 
645             Object paramObj2 = new LongWrapper(layoutId);
646 
647             Object paramObj3 = languageId;
648 
649             if (languageId == null) {
650                 paramObj3 = new NullWrapper("java.lang.String");
651             }
652 
653             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
654                     "getLayoutName",
655                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
656 
657             Object returnObj = null;
658 
659             try {
660                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
661             }
662             catch (Exception e) {
663                 if (e instanceof com.liferay.portal.PortalException) {
664                     throw (com.liferay.portal.PortalException)e;
665                 }
666 
667                 if (e instanceof com.liferay.portal.SystemException) {
668                     throw (com.liferay.portal.SystemException)e;
669                 }
670 
671                 throw new com.liferay.portal.SystemException(e);
672             }
673 
674             return (java.lang.String)returnObj;
675         }
676         catch (com.liferay.portal.SystemException se) {
677             _log.error(se, se);
678 
679             throw se;
680         }
681     }
682 
683     public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
684         HttpPrincipal httpPrincipal, long companyId,
685         java.lang.String portletId, java.lang.String preferencesKey,
686         java.lang.String preferencesValue)
687         throws com.liferay.portal.SystemException {
688         try {
689             Object paramObj0 = new LongWrapper(companyId);
690 
691             Object paramObj1 = portletId;
692 
693             if (portletId == null) {
694                 paramObj1 = new NullWrapper("java.lang.String");
695             }
696 
697             Object paramObj2 = preferencesKey;
698 
699             if (preferencesKey == null) {
700                 paramObj2 = new NullWrapper("java.lang.String");
701             }
702 
703             Object paramObj3 = preferencesValue;
704 
705             if (preferencesValue == null) {
706                 paramObj3 = new NullWrapper("java.lang.String");
707             }
708 
709             MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
710                     "getLayoutReferences",
711                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
712 
713             Object returnObj = null;
714 
715             try {
716                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
717             }
718             catch (Exception e) {
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.model.LayoutReference[])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         byte[] bytes)
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 = bytes;
752 
753             if (bytes == null) {
754                 paramObj3 = new NullWrapper("[B");
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         java.io.File file)
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 = file;
800 
801             if (file == null) {
802                 paramObj3 = new NullWrapper("java.io.File");
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 groupId, boolean privateLayout,
1643        long layoutId, java.lang.String name, java.lang.String languageId)
1644        throws com.liferay.portal.PortalException,
1645            com.liferay.portal.SystemException {
1646        try {
1647            Object paramObj0 = new LongWrapper(groupId);
1648
1649            Object paramObj1 = new BooleanWrapper(privateLayout);
1650
1651            Object paramObj2 = new LongWrapper(layoutId);
1652
1653            Object paramObj3 = name;
1654
1655            if (name == null) {
1656                paramObj3 = new NullWrapper("java.lang.String");
1657            }
1658
1659            Object paramObj4 = languageId;
1660
1661            if (languageId == null) {
1662                paramObj4 = new NullWrapper("java.lang.String");
1663            }
1664
1665            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1666                    "updateName",
1667                    new Object[] {
1668                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
1669                    });
1670
1671            Object returnObj = null;
1672
1673            try {
1674                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1675            }
1676            catch (Exception e) {
1677                if (e instanceof com.liferay.portal.PortalException) {
1678                    throw (com.liferay.portal.PortalException)e;
1679                }
1680
1681                if (e instanceof com.liferay.portal.SystemException) {
1682                    throw (com.liferay.portal.SystemException)e;
1683                }
1684
1685                throw new com.liferay.portal.SystemException(e);
1686            }
1687
1688            return (com.liferay.portal.model.Layout)returnObj;
1689        }
1690        catch (com.liferay.portal.SystemException se) {
1691            _log.error(se, se);
1692
1693            throw se;
1694        }
1695    }
1696
1697    public static com.liferay.portal.model.Layout updateName(
1698        HttpPrincipal httpPrincipal, long plid, java.lang.String name,
1699        java.lang.String languageId)
1700        throws com.liferay.portal.PortalException,
1701            com.liferay.portal.SystemException {
1702        try {
1703            Object paramObj0 = new LongWrapper(plid);
1704
1705            Object paramObj1 = name;
1706
1707            if (name == null) {
1708                paramObj1 = new NullWrapper("java.lang.String");
1709            }
1710
1711            Object paramObj2 = languageId;
1712
1713            if (languageId == null) {
1714                paramObj2 = new NullWrapper("java.lang.String");
1715            }
1716
1717            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1718                    "updateName",
1719                    new Object[] { paramObj0, paramObj1, paramObj2 });
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 groupId, boolean privateLayout,
1749        long layoutId, long parentLayoutId)
1750        throws com.liferay.portal.PortalException,
1751            com.liferay.portal.SystemException {
1752        try {
1753            Object paramObj0 = new LongWrapper(groupId);
1754
1755            Object paramObj1 = new BooleanWrapper(privateLayout);
1756
1757            Object paramObj2 = new LongWrapper(layoutId);
1758
1759            Object paramObj3 = new LongWrapper(parentLayoutId);
1760
1761            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1762                    "updateParentLayoutId",
1763                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1764
1765            Object returnObj = null;
1766
1767            try {
1768                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1769            }
1770            catch (Exception e) {
1771                if (e instanceof com.liferay.portal.PortalException) {
1772                    throw (com.liferay.portal.PortalException)e;
1773                }
1774
1775                if (e instanceof com.liferay.portal.SystemException) {
1776                    throw (com.liferay.portal.SystemException)e;
1777                }
1778
1779                throw new com.liferay.portal.SystemException(e);
1780            }
1781
1782            return (com.liferay.portal.model.Layout)returnObj;
1783        }
1784        catch (com.liferay.portal.SystemException se) {
1785            _log.error(se, se);
1786
1787            throw se;
1788        }
1789    }
1790
1791    public static com.liferay.portal.model.Layout updateParentLayoutId(
1792        HttpPrincipal httpPrincipal, long plid, long parentPlid)
1793        throws com.liferay.portal.PortalException,
1794            com.liferay.portal.SystemException {
1795        try {
1796            Object paramObj0 = new LongWrapper(plid);
1797
1798            Object paramObj1 = new LongWrapper(parentPlid);
1799
1800            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1801                    "updateParentLayoutId",
1802                    new Object[] { paramObj0, paramObj1 });
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 groupId, boolean privateLayout,
1832        long layoutId, int priority)
1833        throws com.liferay.portal.PortalException,
1834            com.liferay.portal.SystemException {
1835        try {
1836            Object paramObj0 = new LongWrapper(groupId);
1837
1838            Object paramObj1 = new BooleanWrapper(privateLayout);
1839
1840            Object paramObj2 = new LongWrapper(layoutId);
1841
1842            Object paramObj3 = new IntegerWrapper(priority);
1843
1844            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1845                    "updatePriority",
1846                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1847
1848            Object returnObj = null;
1849
1850            try {
1851                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1852            }
1853            catch (Exception e) {
1854                if (e instanceof com.liferay.portal.PortalException) {
1855                    throw (com.liferay.portal.PortalException)e;
1856                }
1857
1858                if (e instanceof com.liferay.portal.SystemException) {
1859                    throw (com.liferay.portal.SystemException)e;
1860                }
1861
1862                throw new com.liferay.portal.SystemException(e);
1863            }
1864
1865            return (com.liferay.portal.model.Layout)returnObj;
1866        }
1867        catch (com.liferay.portal.SystemException se) {
1868            _log.error(se, se);
1869
1870            throw se;
1871        }
1872    }
1873
1874    public static com.liferay.portal.model.Layout updatePriority(
1875        HttpPrincipal httpPrincipal, long plid, int priority)
1876        throws com.liferay.portal.PortalException,
1877            com.liferay.portal.SystemException {
1878        try {
1879            Object paramObj0 = new LongWrapper(plid);
1880
1881            Object paramObj1 = new IntegerWrapper(priority);
1882
1883            MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1884                    "updatePriority", new Object[] { paramObj0, paramObj1 });
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}