1
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
74 public class LayoutServiceHttp {
75 public static com.liferay.portal.model.Layout addLayout(
76 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
77 long parentLayoutId, java.lang.String name, java.lang.String title,
78 java.lang.String description, java.lang.String type, boolean hidden,
79 java.lang.String friendlyURL)
80 throws com.liferay.portal.SystemException,
81 com.liferay.portal.PortalException {
82 try {
83 Object paramObj0 = new LongWrapper(groupId);
84
85 Object paramObj1 = new BooleanWrapper(privateLayout);
86
87 Object paramObj2 = new LongWrapper(parentLayoutId);
88
89 Object paramObj3 = name;
90
91 if (name == null) {
92 paramObj3 = new NullWrapper("java.lang.String");
93 }
94
95 Object paramObj4 = title;
96
97 if (title == null) {
98 paramObj4 = new NullWrapper("java.lang.String");
99 }
100
101 Object paramObj5 = description;
102
103 if (description == null) {
104 paramObj5 = new NullWrapper("java.lang.String");
105 }
106
107 Object paramObj6 = type;
108
109 if (type == null) {
110 paramObj6 = new NullWrapper("java.lang.String");
111 }
112
113 Object paramObj7 = new BooleanWrapper(hidden);
114
115 Object paramObj8 = friendlyURL;
116
117 if (friendlyURL == null) {
118 paramObj8 = new NullWrapper("java.lang.String");
119 }
120
121 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
122 "addLayout",
123 new Object[] {
124 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
125 paramObj5, paramObj6, paramObj7, paramObj8
126 });
127
128 Object returnObj = null;
129
130 try {
131 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
132 }
133 catch (Exception e) {
134 if (e instanceof com.liferay.portal.SystemException) {
135 throw (com.liferay.portal.SystemException)e;
136 }
137
138 if (e instanceof com.liferay.portal.PortalException) {
139 throw (com.liferay.portal.PortalException)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.util.Map localeNamesMap,
157 java.util.Map localeTitlesMap, java.lang.String description,
158 java.lang.String type, boolean hidden, java.lang.String friendlyURL)
159 throws com.liferay.portal.SystemException,
160 com.liferay.portal.PortalException {
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.SystemException) {
214 throw (com.liferay.portal.SystemException)e;
215 }
216
217 if (e instanceof com.liferay.portal.PortalException) {
218 throw (com.liferay.portal.PortalException)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.SystemException,
235 com.liferay.portal.PortalException {
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.SystemException) {
247 throw (com.liferay.portal.SystemException)e;
248 }
249
250 if (e instanceof com.liferay.portal.PortalException) {
251 throw (com.liferay.portal.PortalException)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.SystemException,
267 com.liferay.portal.PortalException {
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.SystemException) {
284 throw (com.liferay.portal.SystemException)e;
285 }
286
287 if (e instanceof com.liferay.portal.PortalException) {
288 throw (com.liferay.portal.PortalException)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.SystemException,
305 com.liferay.portal.PortalException {
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.SystemException) {
330 throw (com.liferay.portal.SystemException)e;
331 }
332
333 if (e instanceof com.liferay.portal.PortalException) {
334 throw (com.liferay.portal.PortalException)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 prefsKey,
352 java.lang.String prefsValue) throws com.liferay.portal.SystemException {
353 try {
354 Object paramObj0 = new LongWrapper(companyId);
355
356 Object paramObj1 = portletId;
357
358 if (portletId == null) {
359 paramObj1 = new NullWrapper("java.lang.String");
360 }
361
362 Object paramObj2 = prefsKey;
363
364 if (prefsKey == null) {
365 paramObj2 = new NullWrapper("java.lang.String");
366 }
367
368 Object paramObj3 = prefsValue;
369
370 if (prefsValue == null) {
371 paramObj3 = new NullWrapper("java.lang.String");
372 }
373
374 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
375 "getLayoutReferences",
376 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
377
378 Object returnObj = null;
379
380 try {
381 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
382 }
383 catch (Exception e) {
384 if (e instanceof com.liferay.portal.SystemException) {
385 throw (com.liferay.portal.SystemException)e;
386 }
387
388 throw new com.liferay.portal.SystemException(e);
389 }
390
391 return (com.liferay.portal.model.LayoutReference[])returnObj;
392 }
393 catch (com.liferay.portal.SystemException se) {
394 _log.error(se, se);
395
396 throw se;
397 }
398 }
399
400 public static byte[] exportLayouts(HttpPrincipal httpPrincipal,
401 long groupId, boolean privateLayout, java.util.Map parameterMap)
402 throws com.liferay.portal.SystemException,
403 com.liferay.portal.PortalException {
404 try {
405 Object paramObj0 = new LongWrapper(groupId);
406
407 Object paramObj1 = new BooleanWrapper(privateLayout);
408
409 Object paramObj2 = parameterMap;
410
411 if (parameterMap == null) {
412 paramObj2 = new NullWrapper("java.util.Map");
413 }
414
415 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
416 "exportLayouts",
417 new Object[] { paramObj0, paramObj1, paramObj2 });
418
419 Object returnObj = null;
420
421 try {
422 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
423 }
424 catch (Exception e) {
425 if (e instanceof com.liferay.portal.SystemException) {
426 throw (com.liferay.portal.SystemException)e;
427 }
428
429 if (e instanceof com.liferay.portal.PortalException) {
430 throw (com.liferay.portal.PortalException)e;
431 }
432
433 throw new com.liferay.portal.SystemException(e);
434 }
435
436 return (byte[])returnObj;
437 }
438 catch (com.liferay.portal.SystemException se) {
439 _log.error(se, se);
440
441 throw se;
442 }
443 }
444
445 public static byte[] exportLayouts(HttpPrincipal httpPrincipal,
446 long groupId, boolean privateLayout, long[] layoutIds,
447 java.util.Map parameterMap)
448 throws com.liferay.portal.SystemException,
449 com.liferay.portal.PortalException {
450 try {
451 Object paramObj0 = new LongWrapper(groupId);
452
453 Object paramObj1 = new BooleanWrapper(privateLayout);
454
455 Object paramObj2 = layoutIds;
456
457 if (layoutIds == null) {
458 paramObj2 = new NullWrapper("[J");
459 }
460
461 Object paramObj3 = parameterMap;
462
463 if (parameterMap == null) {
464 paramObj3 = new NullWrapper("java.util.Map");
465 }
466
467 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
468 "exportLayouts",
469 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
470
471 Object returnObj = null;
472
473 try {
474 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
475 }
476 catch (Exception e) {
477 if (e instanceof com.liferay.portal.SystemException) {
478 throw (com.liferay.portal.SystemException)e;
479 }
480
481 if (e instanceof com.liferay.portal.PortalException) {
482 throw (com.liferay.portal.PortalException)e;
483 }
484
485 throw new com.liferay.portal.SystemException(e);
486 }
487
488 return (byte[])returnObj;
489 }
490 catch (com.liferay.portal.SystemException se) {
491 _log.error(se, se);
492
493 throw se;
494 }
495 }
496
497 public static byte[] exportPortletInfo(HttpPrincipal httpPrincipal,
498 long plid, java.lang.String portletId, java.util.Map parameterMap)
499 throws com.liferay.portal.SystemException,
500 com.liferay.portal.PortalException {
501 try {
502 Object paramObj0 = new LongWrapper(plid);
503
504 Object paramObj1 = portletId;
505
506 if (portletId == null) {
507 paramObj1 = new NullWrapper("java.lang.String");
508 }
509
510 Object paramObj2 = parameterMap;
511
512 if (parameterMap == null) {
513 paramObj2 = new NullWrapper("java.util.Map");
514 }
515
516 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
517 "exportPortletInfo",
518 new Object[] { paramObj0, paramObj1, paramObj2 });
519
520 Object returnObj = null;
521
522 try {
523 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
524 }
525 catch (Exception e) {
526 if (e instanceof com.liferay.portal.SystemException) {
527 throw (com.liferay.portal.SystemException)e;
528 }
529
530 if (e instanceof com.liferay.portal.PortalException) {
531 throw (com.liferay.portal.PortalException)e;
532 }
533
534 throw new com.liferay.portal.SystemException(e);
535 }
536
537 return (byte[])returnObj;
538 }
539 catch (com.liferay.portal.SystemException se) {
540 _log.error(se, se);
541
542 throw se;
543 }
544 }
545
546 public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
547 boolean privateLayout, java.util.Map parameterMap, java.io.File file)
548 throws com.liferay.portal.SystemException,
549 com.liferay.portal.PortalException {
550 try {
551 Object paramObj0 = new LongWrapper(groupId);
552
553 Object paramObj1 = new BooleanWrapper(privateLayout);
554
555 Object paramObj2 = parameterMap;
556
557 if (parameterMap == null) {
558 paramObj2 = new NullWrapper("java.util.Map");
559 }
560
561 Object paramObj3 = file;
562
563 if (file == null) {
564 paramObj3 = new NullWrapper("java.io.File");
565 }
566
567 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
568 "importLayouts",
569 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
570
571 try {
572 TunnelUtil.invoke(httpPrincipal, methodWrapper);
573 }
574 catch (Exception e) {
575 if (e instanceof com.liferay.portal.SystemException) {
576 throw (com.liferay.portal.SystemException)e;
577 }
578
579 if (e instanceof com.liferay.portal.PortalException) {
580 throw (com.liferay.portal.PortalException)e;
581 }
582
583 throw new com.liferay.portal.SystemException(e);
584 }
585 }
586 catch (com.liferay.portal.SystemException se) {
587 _log.error(se, se);
588
589 throw se;
590 }
591 }
592
593 public static void importLayouts(HttpPrincipal httpPrincipal, long groupId,
594 boolean privateLayout, java.util.Map parameterMap,
595 java.io.InputStream is)
596 throws com.liferay.portal.SystemException,
597 com.liferay.portal.PortalException {
598 try {
599 Object paramObj0 = new LongWrapper(groupId);
600
601 Object paramObj1 = new BooleanWrapper(privateLayout);
602
603 Object paramObj2 = parameterMap;
604
605 if (parameterMap == null) {
606 paramObj2 = new NullWrapper("java.util.Map");
607 }
608
609 Object paramObj3 = is;
610
611 if (is == null) {
612 paramObj3 = new NullWrapper("java.io.InputStream");
613 }
614
615 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
616 "importLayouts",
617 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
618
619 try {
620 TunnelUtil.invoke(httpPrincipal, methodWrapper);
621 }
622 catch (Exception e) {
623 if (e instanceof com.liferay.portal.SystemException) {
624 throw (com.liferay.portal.SystemException)e;
625 }
626
627 if (e instanceof com.liferay.portal.PortalException) {
628 throw (com.liferay.portal.PortalException)e;
629 }
630
631 throw new com.liferay.portal.SystemException(e);
632 }
633 }
634 catch (com.liferay.portal.SystemException se) {
635 _log.error(se, se);
636
637 throw se;
638 }
639 }
640
641 public static void importPortletInfo(HttpPrincipal httpPrincipal,
642 long plid, java.lang.String portletId, java.util.Map parameterMap,
643 java.io.File file)
644 throws com.liferay.portal.SystemException,
645 com.liferay.portal.PortalException {
646 try {
647 Object paramObj0 = new LongWrapper(plid);
648
649 Object paramObj1 = portletId;
650
651 if (portletId == null) {
652 paramObj1 = new NullWrapper("java.lang.String");
653 }
654
655 Object paramObj2 = parameterMap;
656
657 if (parameterMap == null) {
658 paramObj2 = new NullWrapper("java.util.Map");
659 }
660
661 Object paramObj3 = file;
662
663 if (file == null) {
664 paramObj3 = new NullWrapper("java.io.File");
665 }
666
667 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
668 "importPortletInfo",
669 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
670
671 try {
672 TunnelUtil.invoke(httpPrincipal, methodWrapper);
673 }
674 catch (Exception e) {
675 if (e instanceof com.liferay.portal.SystemException) {
676 throw (com.liferay.portal.SystemException)e;
677 }
678
679 if (e instanceof com.liferay.portal.PortalException) {
680 throw (com.liferay.portal.PortalException)e;
681 }
682
683 throw new com.liferay.portal.SystemException(e);
684 }
685 }
686 catch (com.liferay.portal.SystemException se) {
687 _log.error(se, se);
688
689 throw se;
690 }
691 }
692
693 public static void importPortletInfo(HttpPrincipal httpPrincipal,
694 long plid, java.lang.String portletId, java.util.Map parameterMap,
695 java.io.InputStream is)
696 throws com.liferay.portal.SystemException,
697 com.liferay.portal.PortalException {
698 try {
699 Object paramObj0 = new LongWrapper(plid);
700
701 Object paramObj1 = portletId;
702
703 if (portletId == null) {
704 paramObj1 = new NullWrapper("java.lang.String");
705 }
706
707 Object paramObj2 = parameterMap;
708
709 if (parameterMap == null) {
710 paramObj2 = new NullWrapper("java.util.Map");
711 }
712
713 Object paramObj3 = is;
714
715 if (is == null) {
716 paramObj3 = new NullWrapper("java.io.InputStream");
717 }
718
719 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
720 "importPortletInfo",
721 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
722
723 try {
724 TunnelUtil.invoke(httpPrincipal, methodWrapper);
725 }
726 catch (Exception e) {
727 if (e instanceof com.liferay.portal.SystemException) {
728 throw (com.liferay.portal.SystemException)e;
729 }
730
731 if (e instanceof com.liferay.portal.PortalException) {
732 throw (com.liferay.portal.PortalException)e;
733 }
734
735 throw new com.liferay.portal.SystemException(e);
736 }
737 }
738 catch (com.liferay.portal.SystemException se) {
739 _log.error(se, se);
740
741 throw se;
742 }
743 }
744
745 public static void setLayouts(HttpPrincipal httpPrincipal, long groupId,
746 boolean privateLayout, long parentLayoutId, long[] layoutIds)
747 throws com.liferay.portal.SystemException,
748 com.liferay.portal.PortalException {
749 try {
750 Object paramObj0 = new LongWrapper(groupId);
751
752 Object paramObj1 = new BooleanWrapper(privateLayout);
753
754 Object paramObj2 = new LongWrapper(parentLayoutId);
755
756 Object paramObj3 = layoutIds;
757
758 if (layoutIds == null) {
759 paramObj3 = new NullWrapper("[J");
760 }
761
762 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
763 "setLayouts",
764 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
765
766 try {
767 TunnelUtil.invoke(httpPrincipal, methodWrapper);
768 }
769 catch (Exception e) {
770 if (e instanceof com.liferay.portal.SystemException) {
771 throw (com.liferay.portal.SystemException)e;
772 }
773
774 if (e instanceof com.liferay.portal.PortalException) {
775 throw (com.liferay.portal.PortalException)e;
776 }
777
778 throw new com.liferay.portal.SystemException(e);
779 }
780 }
781 catch (com.liferay.portal.SystemException se) {
782 _log.error(se, se);
783
784 throw se;
785 }
786 }
787
788 public static com.liferay.portal.model.Layout updateLayout(
789 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
790 long layoutId, long parentLayoutId, java.util.Map localeNamesMap,
791 java.util.Map localeTitlesMap, java.lang.String description,
792 java.lang.String type, boolean hidden, java.lang.String friendlyURL)
793 throws com.liferay.portal.SystemException,
794 com.liferay.portal.PortalException {
795 try {
796 Object paramObj0 = new LongWrapper(groupId);
797
798 Object paramObj1 = new BooleanWrapper(privateLayout);
799
800 Object paramObj2 = new LongWrapper(layoutId);
801
802 Object paramObj3 = new LongWrapper(parentLayoutId);
803
804 Object paramObj4 = localeNamesMap;
805
806 if (localeNamesMap == null) {
807 paramObj4 = new NullWrapper("java.util.Map");
808 }
809
810 Object paramObj5 = localeTitlesMap;
811
812 if (localeTitlesMap == null) {
813 paramObj5 = new NullWrapper("java.util.Map");
814 }
815
816 Object paramObj6 = description;
817
818 if (description == null) {
819 paramObj6 = new NullWrapper("java.lang.String");
820 }
821
822 Object paramObj7 = type;
823
824 if (type == null) {
825 paramObj7 = new NullWrapper("java.lang.String");
826 }
827
828 Object paramObj8 = new BooleanWrapper(hidden);
829
830 Object paramObj9 = friendlyURL;
831
832 if (friendlyURL == null) {
833 paramObj9 = new NullWrapper("java.lang.String");
834 }
835
836 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
837 "updateLayout",
838 new Object[] {
839 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
840 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9
841 });
842
843 Object returnObj = null;
844
845 try {
846 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
847 }
848 catch (Exception e) {
849 if (e instanceof com.liferay.portal.SystemException) {
850 throw (com.liferay.portal.SystemException)e;
851 }
852
853 if (e instanceof com.liferay.portal.PortalException) {
854 throw (com.liferay.portal.PortalException)e;
855 }
856
857 throw new com.liferay.portal.SystemException(e);
858 }
859
860 return (com.liferay.portal.model.Layout)returnObj;
861 }
862 catch (com.liferay.portal.SystemException se) {
863 _log.error(se, se);
864
865 throw se;
866 }
867 }
868
869 public static com.liferay.portal.model.Layout updateLayout(
870 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
871 long layoutId, long parentLayoutId, java.util.Map localeNamesMap,
872 java.util.Map localeTitlesMap, java.lang.String description,
873 java.lang.String type, boolean hidden, java.lang.String friendlyURL,
874 java.lang.Boolean iconImage, byte[] iconBytes)
875 throws com.liferay.portal.SystemException,
876 com.liferay.portal.PortalException {
877 try {
878 Object paramObj0 = new LongWrapper(groupId);
879
880 Object paramObj1 = new BooleanWrapper(privateLayout);
881
882 Object paramObj2 = new LongWrapper(layoutId);
883
884 Object paramObj3 = new LongWrapper(parentLayoutId);
885
886 Object paramObj4 = localeNamesMap;
887
888 if (localeNamesMap == null) {
889 paramObj4 = new NullWrapper("java.util.Map");
890 }
891
892 Object paramObj5 = localeTitlesMap;
893
894 if (localeTitlesMap == null) {
895 paramObj5 = new NullWrapper("java.util.Map");
896 }
897
898 Object paramObj6 = description;
899
900 if (description == null) {
901 paramObj6 = new NullWrapper("java.lang.String");
902 }
903
904 Object paramObj7 = type;
905
906 if (type == null) {
907 paramObj7 = new NullWrapper("java.lang.String");
908 }
909
910 Object paramObj8 = new BooleanWrapper(hidden);
911
912 Object paramObj9 = friendlyURL;
913
914 if (friendlyURL == null) {
915 paramObj9 = new NullWrapper("java.lang.String");
916 }
917
918 Object paramObj10 = iconImage;
919
920 if (iconImage == null) {
921 paramObj10 = new NullWrapper("java.lang.Boolean");
922 }
923
924 Object paramObj11 = iconBytes;
925
926 if (iconBytes == null) {
927 paramObj11 = new NullWrapper("[B");
928 }
929
930 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
931 "updateLayout",
932 new Object[] {
933 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
934 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
935 paramObj10, paramObj11
936 });
937
938 Object returnObj = null;
939
940 try {
941 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
942 }
943 catch (Exception e) {
944 if (e instanceof com.liferay.portal.SystemException) {
945 throw (com.liferay.portal.SystemException)e;
946 }
947
948 if (e instanceof com.liferay.portal.PortalException) {
949 throw (com.liferay.portal.PortalException)e;
950 }
951
952 throw new com.liferay.portal.SystemException(e);
953 }
954
955 return (com.liferay.portal.model.Layout)returnObj;
956 }
957 catch (com.liferay.portal.SystemException se) {
958 _log.error(se, se);
959
960 throw se;
961 }
962 }
963
964 public static com.liferay.portal.model.Layout updateLayout(
965 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
966 long layoutId, java.lang.String typeSettings)
967 throws com.liferay.portal.SystemException,
968 com.liferay.portal.PortalException {
969 try {
970 Object paramObj0 = new LongWrapper(groupId);
971
972 Object paramObj1 = new BooleanWrapper(privateLayout);
973
974 Object paramObj2 = new LongWrapper(layoutId);
975
976 Object paramObj3 = typeSettings;
977
978 if (typeSettings == null) {
979 paramObj3 = new NullWrapper("java.lang.String");
980 }
981
982 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
983 "updateLayout",
984 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
985
986 Object returnObj = null;
987
988 try {
989 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
990 }
991 catch (Exception e) {
992 if (e instanceof com.liferay.portal.SystemException) {
993 throw (com.liferay.portal.SystemException)e;
994 }
995
996 if (e instanceof com.liferay.portal.PortalException) {
997 throw (com.liferay.portal.PortalException)e;
998 }
999
1000 throw new com.liferay.portal.SystemException(e);
1001 }
1002
1003 return (com.liferay.portal.model.Layout)returnObj;
1004 }
1005 catch (com.liferay.portal.SystemException se) {
1006 _log.error(se, se);
1007
1008 throw se;
1009 }
1010 }
1011
1012 public static com.liferay.portal.model.Layout updateLookAndFeel(
1013 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1014 long layoutId, java.lang.String themeId,
1015 java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme)
1016 throws com.liferay.portal.SystemException,
1017 com.liferay.portal.PortalException {
1018 try {
1019 Object paramObj0 = new LongWrapper(groupId);
1020
1021 Object paramObj1 = new BooleanWrapper(privateLayout);
1022
1023 Object paramObj2 = new LongWrapper(layoutId);
1024
1025 Object paramObj3 = themeId;
1026
1027 if (themeId == null) {
1028 paramObj3 = new NullWrapper("java.lang.String");
1029 }
1030
1031 Object paramObj4 = colorSchemeId;
1032
1033 if (colorSchemeId == null) {
1034 paramObj4 = new NullWrapper("java.lang.String");
1035 }
1036
1037 Object paramObj5 = css;
1038
1039 if (css == null) {
1040 paramObj5 = new NullWrapper("java.lang.String");
1041 }
1042
1043 Object paramObj6 = new BooleanWrapper(wapTheme);
1044
1045 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1046 "updateLookAndFeel",
1047 new Object[] {
1048 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1049 paramObj5, paramObj6
1050 });
1051
1052 Object returnObj = null;
1053
1054 try {
1055 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1056 }
1057 catch (Exception e) {
1058 if (e instanceof com.liferay.portal.SystemException) {
1059 throw (com.liferay.portal.SystemException)e;
1060 }
1061
1062 if (e instanceof com.liferay.portal.PortalException) {
1063 throw (com.liferay.portal.PortalException)e;
1064 }
1065
1066 throw new com.liferay.portal.SystemException(e);
1067 }
1068
1069 return (com.liferay.portal.model.Layout)returnObj;
1070 }
1071 catch (com.liferay.portal.SystemException se) {
1072 _log.error(se, se);
1073
1074 throw se;
1075 }
1076 }
1077
1078 public static com.liferay.portal.model.Layout updateName(
1079 HttpPrincipal httpPrincipal, long plid, java.lang.String name,
1080 java.lang.String languageId)
1081 throws com.liferay.portal.SystemException,
1082 com.liferay.portal.PortalException {
1083 try {
1084 Object paramObj0 = new LongWrapper(plid);
1085
1086 Object paramObj1 = name;
1087
1088 if (name == null) {
1089 paramObj1 = new NullWrapper("java.lang.String");
1090 }
1091
1092 Object paramObj2 = languageId;
1093
1094 if (languageId == null) {
1095 paramObj2 = new NullWrapper("java.lang.String");
1096 }
1097
1098 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1099 "updateName",
1100 new Object[] { paramObj0, paramObj1, paramObj2 });
1101
1102 Object returnObj = null;
1103
1104 try {
1105 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1106 }
1107 catch (Exception e) {
1108 if (e instanceof com.liferay.portal.SystemException) {
1109 throw (com.liferay.portal.SystemException)e;
1110 }
1111
1112 if (e instanceof com.liferay.portal.PortalException) {
1113 throw (com.liferay.portal.PortalException)e;
1114 }
1115
1116 throw new com.liferay.portal.SystemException(e);
1117 }
1118
1119 return (com.liferay.portal.model.Layout)returnObj;
1120 }
1121 catch (com.liferay.portal.SystemException se) {
1122 _log.error(se, se);
1123
1124 throw se;
1125 }
1126 }
1127
1128 public static com.liferay.portal.model.Layout updateName(
1129 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1130 long layoutId, java.lang.String name, java.lang.String languageId)
1131 throws com.liferay.portal.SystemException,
1132 com.liferay.portal.PortalException {
1133 try {
1134 Object paramObj0 = new LongWrapper(groupId);
1135
1136 Object paramObj1 = new BooleanWrapper(privateLayout);
1137
1138 Object paramObj2 = new LongWrapper(layoutId);
1139
1140 Object paramObj3 = name;
1141
1142 if (name == null) {
1143 paramObj3 = new NullWrapper("java.lang.String");
1144 }
1145
1146 Object paramObj4 = languageId;
1147
1148 if (languageId == null) {
1149 paramObj4 = new NullWrapper("java.lang.String");
1150 }
1151
1152 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1153 "updateName",
1154 new Object[] {
1155 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
1156 });
1157
1158 Object returnObj = null;
1159
1160 try {
1161 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1162 }
1163 catch (Exception e) {
1164 if (e instanceof com.liferay.portal.SystemException) {
1165 throw (com.liferay.portal.SystemException)e;
1166 }
1167
1168 if (e instanceof com.liferay.portal.PortalException) {
1169 throw (com.liferay.portal.PortalException)e;
1170 }
1171
1172 throw new com.liferay.portal.SystemException(e);
1173 }
1174
1175 return (com.liferay.portal.model.Layout)returnObj;
1176 }
1177 catch (com.liferay.portal.SystemException se) {
1178 _log.error(se, se);
1179
1180 throw se;
1181 }
1182 }
1183
1184 public static com.liferay.portal.model.Layout updateParentLayoutId(
1185 HttpPrincipal httpPrincipal, long plid, long parentPlid)
1186 throws com.liferay.portal.SystemException,
1187 com.liferay.portal.PortalException {
1188 try {
1189 Object paramObj0 = new LongWrapper(plid);
1190
1191 Object paramObj1 = new LongWrapper(parentPlid);
1192
1193 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1194 "updateParentLayoutId",
1195 new Object[] { paramObj0, paramObj1 });
1196
1197 Object returnObj = null;
1198
1199 try {
1200 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1201 }
1202 catch (Exception e) {
1203 if (e instanceof com.liferay.portal.SystemException) {
1204 throw (com.liferay.portal.SystemException)e;
1205 }
1206
1207 if (e instanceof com.liferay.portal.PortalException) {
1208 throw (com.liferay.portal.PortalException)e;
1209 }
1210
1211 throw new com.liferay.portal.SystemException(e);
1212 }
1213
1214 return (com.liferay.portal.model.Layout)returnObj;
1215 }
1216 catch (com.liferay.portal.SystemException se) {
1217 _log.error(se, se);
1218
1219 throw se;
1220 }
1221 }
1222
1223 public static com.liferay.portal.model.Layout updateParentLayoutId(
1224 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1225 long layoutId, long parentLayoutId)
1226 throws com.liferay.portal.SystemException,
1227 com.liferay.portal.PortalException {
1228 try {
1229 Object paramObj0 = new LongWrapper(groupId);
1230
1231 Object paramObj1 = new BooleanWrapper(privateLayout);
1232
1233 Object paramObj2 = new LongWrapper(layoutId);
1234
1235 Object paramObj3 = new LongWrapper(parentLayoutId);
1236
1237 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1238 "updateParentLayoutId",
1239 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1240
1241 Object returnObj = null;
1242
1243 try {
1244 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1245 }
1246 catch (Exception e) {
1247 if (e instanceof com.liferay.portal.SystemException) {
1248 throw (com.liferay.portal.SystemException)e;
1249 }
1250
1251 if (e instanceof com.liferay.portal.PortalException) {
1252 throw (com.liferay.portal.PortalException)e;
1253 }
1254
1255 throw new com.liferay.portal.SystemException(e);
1256 }
1257
1258 return (com.liferay.portal.model.Layout)returnObj;
1259 }
1260 catch (com.liferay.portal.SystemException se) {
1261 _log.error(se, se);
1262
1263 throw se;
1264 }
1265 }
1266
1267 public static com.liferay.portal.model.Layout updatePriority(
1268 HttpPrincipal httpPrincipal, long plid, int priority)
1269 throws com.liferay.portal.SystemException,
1270 com.liferay.portal.PortalException {
1271 try {
1272 Object paramObj0 = new LongWrapper(plid);
1273
1274 Object paramObj1 = new IntegerWrapper(priority);
1275
1276 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1277 "updatePriority", new Object[] { paramObj0, paramObj1 });
1278
1279 Object returnObj = null;
1280
1281 try {
1282 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1283 }
1284 catch (Exception e) {
1285 if (e instanceof com.liferay.portal.SystemException) {
1286 throw (com.liferay.portal.SystemException)e;
1287 }
1288
1289 if (e instanceof com.liferay.portal.PortalException) {
1290 throw (com.liferay.portal.PortalException)e;
1291 }
1292
1293 throw new com.liferay.portal.SystemException(e);
1294 }
1295
1296 return (com.liferay.portal.model.Layout)returnObj;
1297 }
1298 catch (com.liferay.portal.SystemException se) {
1299 _log.error(se, se);
1300
1301 throw se;
1302 }
1303 }
1304
1305 public static com.liferay.portal.model.Layout updatePriority(
1306 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
1307 long layoutId, int priority)
1308 throws com.liferay.portal.SystemException,
1309 com.liferay.portal.PortalException {
1310 try {
1311 Object paramObj0 = new LongWrapper(groupId);
1312
1313 Object paramObj1 = new BooleanWrapper(privateLayout);
1314
1315 Object paramObj2 = new LongWrapper(layoutId);
1316
1317 Object paramObj3 = new IntegerWrapper(priority);
1318
1319 MethodWrapper methodWrapper = new MethodWrapper(LayoutServiceUtil.class.getName(),
1320 "updatePriority",
1321 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1322
1323 Object returnObj = null;
1324
1325 try {
1326 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1327 }
1328 catch (Exception e) {
1329 if (e instanceof com.liferay.portal.SystemException) {
1330 throw (com.liferay.portal.SystemException)e;
1331 }
1332
1333 if (e instanceof com.liferay.portal.PortalException) {
1334 throw (com.liferay.portal.PortalException)e;
1335 }
1336
1337 throw new com.liferay.portal.SystemException(e);
1338 }
1339
1340 return (com.liferay.portal.model.Layout)returnObj;
1341 }
1342 catch (com.liferay.portal.SystemException se) {
1343 _log.error(se, se);
1344
1345 throw se;
1346 }
1347 }
1348
1349 private static Log _log = LogFactoryUtil.getLog(LayoutServiceHttp.class);
1350}