1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.seasar.teeda.core.config.faces.impl; |
17 | |
|
18 | |
import java.util.Iterator; |
19 | |
import java.util.List; |
20 | |
|
21 | |
import org.seasar.teeda.core.config.faces.element.FacesConfig; |
22 | |
import org.seasar.teeda.core.config.faces.element.impl.FacesConfigWrapperImpl; |
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
public class FacesConfigUtil { |
28 | |
|
29 | 0 | private FacesConfigUtil() { |
30 | 0 | } |
31 | |
|
32 | |
public static FacesConfig collectAllFacesConfig(List configs) { |
33 | 3 | isAllFacesConfig(configs); |
34 | 3 | FacesConfig wrappedFacesConfig = new FacesConfigWrapperImpl(configs); |
35 | 3 | return wrappedFacesConfig; |
36 | |
} |
37 | |
|
38 | |
public static void isAllFacesConfig(List configs) { |
39 | 6 | if (configs == null) { |
40 | 1 | throw new IllegalArgumentException(); |
41 | |
} |
42 | 5 | for (Iterator itr = configs.iterator(); itr.hasNext();) { |
43 | 6 | if (!(itr.next() instanceof FacesConfig)) { |
44 | 1 | throw new IllegalStateException(); |
45 | |
} |
46 | |
} |
47 | 4 | } |
48 | |
} |