1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.orchestra.viewController;
20
21
22
23
24
25
26
27
28
29 public class CompositeViewControllerExecutor implements ViewControllerExecutor
30 {
31 private final ViewControllerExecutor[] viewControllerExecutors;
32
33 public CompositeViewControllerExecutor(ViewControllerExecutor[] viewControllerExecutors)
34 {
35 this.viewControllerExecutors = new ViewControllerExecutor[viewControllerExecutors.length];
36 System.arraycopy(viewControllerExecutors, 0, this.viewControllerExecutors, 0, viewControllerExecutors.length);
37 }
38
39
40 public boolean invokeInitView(String beanName, Object bean)
41 {
42 for (int i = 0; i< viewControllerExecutors.length; i++)
43 {
44 if (viewControllerExecutors[i].invokeInitView(beanName, bean))
45 {
46 return true;
47 }
48 }
49
50 return false;
51 }
52
53 public boolean invokePreRenderView(String beanName, Object bean)
54 {
55 for (int i = 0; i< viewControllerExecutors.length; i++)
56 {
57 if (viewControllerExecutors[i].invokePreRenderView(beanName, bean))
58 {
59 return true;
60 }
61 }
62
63 return false;
64 }
65
66 public boolean invokePreProcess(String beanName, Object bean)
67 {
68 for (int i = 0; i< viewControllerExecutors.length; i++)
69 {
70 if (viewControllerExecutors[i].invokePreProcess(beanName, bean))
71 {
72 return true;
73 }
74 }
75
76 return false;
77 }
78 }