1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.seasar.teeda.core.config.faces.assembler; |
17 | |
|
18 | |
import java.util.Collections; |
19 | |
import java.util.Map; |
20 | |
|
21 | |
import org.seasar.teeda.core.config.faces.element.ConverterElement; |
22 | |
|
23 | |
public abstract class ConverterAssembler extends AbstractJsfAssembler { |
24 | |
|
25 | 4 | private Map convertersByClass_ = Collections.EMPTY_MAP; |
26 | |
|
27 | 4 | private Map convertersById_ = Collections.EMPTY_MAP; |
28 | |
|
29 | 2 | private static final Class TARGET_CLASS = ConverterElement.class; |
30 | |
|
31 | 4 | public ConverterAssembler(Map convertersByClass, Map convertersById) { |
32 | 4 | if (convertersByClass == null || convertersById == null) { |
33 | 0 | throw new IllegalArgumentException("converter maps"); |
34 | |
} |
35 | 4 | isAllSuitableJsfElement(convertersByClass.values(), TARGET_CLASS); |
36 | 4 | isAllSuitableJsfElement(convertersById.values(), TARGET_CLASS); |
37 | 4 | convertersByClass_ = convertersByClass; |
38 | 4 | convertersById_ = convertersById; |
39 | 4 | setupBeforeAssemble(); |
40 | 4 | } |
41 | |
|
42 | |
protected final Map getConvertersByClass() { |
43 | 4 | return convertersByClass_; |
44 | |
} |
45 | |
|
46 | |
protected final Map getConvertersById() { |
47 | 4 | return convertersById_; |
48 | |
} |
49 | |
} |