1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.seasar.uruma.container.cooldeploy; |
17 | |
|
18 | |
import org.seasar.framework.container.ExternalContext; |
19 | |
import org.seasar.framework.container.ExternalContextComponentDefRegister; |
20 | |
import org.seasar.framework.container.S2Container; |
21 | |
import org.seasar.framework.container.factory.PathResolver; |
22 | |
import org.seasar.framework.container.factory.S2ContainerFactory.DefaultConfigurator; |
23 | |
import org.seasar.framework.container.factory.S2ContainerFactory.Provider; |
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | 0 | public class UrumaS2ContainerFactoryCoolConfigurator extends |
35 | |
DefaultConfigurator { |
36 | |
|
37 | |
|
38 | |
|
39 | |
@Override |
40 | |
protected Provider createProvider(final S2Container configurationContainer) { |
41 | 0 | UrumaS2ContainerFactoryCoolProvider provider = new UrumaS2ContainerFactoryCoolProvider(); |
42 | 0 | if (configurationContainer.hasComponentDef(PathResolver.class)) { |
43 | 0 | provider.setPathResolver((PathResolver) configurationContainer |
44 | |
.getComponent(PathResolver.class)); |
45 | |
} |
46 | 0 | if (configurationContainer.hasComponentDef(ExternalContext.class)) { |
47 | 0 | provider |
48 | |
.setExternalContext((ExternalContext) configurationContainer |
49 | |
.getComponent(ExternalContext.class)); |
50 | |
} |
51 | 0 | if (configurationContainer |
52 | |
.hasComponentDef(ExternalContextComponentDefRegister.class)) { |
53 | 0 | provider |
54 | |
.setExternalContextComponentDefRegister((ExternalContextComponentDefRegister) configurationContainer |
55 | |
.getComponent(ExternalContextComponentDefRegister.class)); |
56 | |
} |
57 | 0 | return provider; |
58 | |
} |
59 | |
|
60 | |
} |