1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package de.smartics.properties.impl.config.domain.key.envapp;
17
18 import de.smartics.properties.api.config.domain.key.ConfigurationKeyFactory;
19 import de.smartics.properties.api.config.domain.key.ConfigurationKeyHelper;
20 import de.smartics.properties.api.config.domain.key.KeyListBuilder;
21 import de.smartics.properties.spi.config.definition.DefinitionConfigParser;
22 import de.smartics.properties.spi.config.definition.DefinitionKeyHelper;
23 import de.smartics.properties.spi.config.definition.PropertiesDefinitionContext;
24 import de.smartics.properties.spi.config.domain.key.ConfigurationKeyContext;
25
26
27
28
29 public final class EnvAppConfigurationKeyContext implements
30 ConfigurationKeyContext
31 {
32
33
34
35
36
37
38
39
40
41 private final EnvAppConfigurationKeyFactory factory =
42 new EnvAppConfigurationKeyFactory();
43
44
45
46
47
48 private final EnvAppKeyListBuilder builder = new EnvAppKeyListBuilder();
49
50
51
52
53 private final EnvAppDefinitionConfigParser parser =
54 new EnvAppDefinitionConfigParser();
55
56
57
58
59 private final EnvAppDefinitionKeyHelper defaultHelper =
60 new EnvAppDefinitionKeyHelper();
61
62
63
64
65
66
67
68
69 public EnvAppConfigurationKeyContext()
70 {
71 }
72
73
74
75
76
77
78
79
80
81
82
83 @Override
84 public ConfigurationKeyFactory<?> configurationKeyFactory()
85 {
86 return factory;
87 }
88
89 @Override
90 public KeyListBuilder keyListBuilder()
91 {
92 return builder;
93 }
94
95 @Override
96 public DefinitionConfigParser<?> definitionConfigParser()
97 {
98 return parser;
99 }
100
101 @Override
102 public DefinitionKeyHelper definitionKeyHelper()
103 {
104 return defaultHelper;
105 }
106
107 @Override
108 public DefinitionKeyHelper definitionKeyHelper(
109 final PropertiesDefinitionContext definitionContext)
110 {
111 return new EnvAppDefinitionKeyHelper(
112 (EnvAppPropertiesDefinitionContext) definitionContext);
113 }
114
115 @Override
116 public ConfigurationKeyHelper configurationKeyHelper(
117 final boolean preferEarManifest)
118 {
119 final EnvAppConfigurationKeyHelper configurationKeyHelper =
120 new EnvAppConfigurationKeyHelper(preferEarManifest);
121 return configurationKeyHelper;
122 }
123
124
125
126 }