1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| package org.apache.hivemind.impl; |
16 |
| |
17 |
| import java.util.List; |
18 |
| import java.util.Locale; |
19 |
| |
20 |
| import org.apache.hivemind.Location; |
21 |
| import org.apache.hivemind.Messages; |
22 |
| import org.apache.hivemind.Registry; |
23 |
| import org.apache.hivemind.internal.Module; |
24 |
| import org.apache.hivemind.internal.RegistryInfrastructure; |
25 |
| |
26 |
| |
27 |
| |
28 |
| |
29 |
| |
30 |
| |
31 |
| |
32 |
| public class RegistryImpl implements Registry |
33 |
| { |
34 |
| private RegistryInfrastructure _infrastructure; |
35 |
| |
36 |
121
| public RegistryImpl(RegistryInfrastructure infrastructure)
|
37 |
| { |
38 |
121
| _infrastructure = infrastructure;
|
39 |
| } |
40 |
| |
41 |
2
| public boolean containsConfiguration(String configurationId)
|
42 |
| { |
43 |
2
| return _infrastructure.containsConfiguration(configurationId, null);
|
44 |
| } |
45 |
| |
46 |
2
| public boolean containsService(Class serviceInterface)
|
47 |
| { |
48 |
2
| return _infrastructure.containsService(serviceInterface, null);
|
49 |
| } |
50 |
| |
51 |
3
| public boolean containsService(String serviceId, Class serviceInterface)
|
52 |
| { |
53 |
3
| return _infrastructure.containsService(serviceId, serviceInterface, null);
|
54 |
| } |
55 |
| |
56 |
36
| public List getConfiguration(String configurationId)
|
57 |
| { |
58 |
36
| return _infrastructure.getConfiguration(configurationId, null);
|
59 |
| } |
60 |
| |
61 |
1
| public String expandSymbols(String input, Location location)
|
62 |
| { |
63 |
1
| return _infrastructure.expandSymbols(input, location);
|
64 |
| } |
65 |
| |
66 |
77
| public Object getService(String serviceId, Class serviceInterface)
|
67 |
| { |
68 |
77
| return _infrastructure.getService(serviceId, serviceInterface, null);
|
69 |
| } |
70 |
| |
71 |
11
| public Object getService(Class serviceInterface)
|
72 |
| { |
73 |
11
| return _infrastructure.getService(serviceInterface, null);
|
74 |
| } |
75 |
| |
76 |
3
| public Locale getLocale()
|
77 |
| { |
78 |
3
| return _infrastructure.getLocale();
|
79 |
| } |
80 |
| |
81 |
29
| public void shutdown()
|
82 |
| { |
83 |
29
| _infrastructure.shutdown();
|
84 |
| } |
85 |
| |
86 |
803
| public void cleanupThread()
|
87 |
| { |
88 |
803
| _infrastructure.cleanupThread();
|
89 |
| } |
90 |
| |
91 |
0
| public String valueForSymbol(String name)
|
92 |
| { |
93 |
0
| return _infrastructure.valueForSymbol(name);
|
94 |
| } |
95 |
| |
96 |
| |
97 |
2
| public void setupThread()
|
98 |
| { |
99 |
2
| _infrastructure.setupThread();
|
100 |
| } |
101 |
| |
102 |
| |
103 |
| |
104 |
| |
105 |
0
| public List getServiceIds( Class serviceInterface )
|
106 |
| { |
107 |
0
| return _infrastructure.getServiceIds( serviceInterface );
|
108 |
| } |
109 |
| |
110 |
| |
111 |
| |
112 |
| |
113 |
1
| public Messages getModuleMessages( String moduleId )
|
114 |
| { |
115 |
1
| final Module module = _infrastructure.getModule( moduleId );
|
116 |
1
| return module == null ? null : module.getMessages();
|
117 |
| } |
118 |
| } |