Line | |
---|
1 | package clarin.cmdi.componentregistry.impl.database; |
---|
2 | |
---|
3 | import clarin.cmdi.componentregistry.CMDComponentSpecExpander; |
---|
4 | import clarin.cmdi.componentregistry.ComponentRegistryException; |
---|
5 | import clarin.cmdi.componentregistry.components.CMDComponentSpec; |
---|
6 | |
---|
7 | /** |
---|
8 | * |
---|
9 | * @author Twan Goosen <twan.goosen@mpi.nl> |
---|
10 | */ |
---|
11 | public class CMDComponentSpecExpanderDbImpl extends CMDComponentSpecExpander { |
---|
12 | |
---|
13 | private ComponentRegistryDbImpl dbImplRegistry; |
---|
14 | |
---|
15 | public CMDComponentSpecExpanderDbImpl(ComponentRegistryDbImpl registry) { |
---|
16 | super(registry); |
---|
17 | dbImplRegistry = registry; |
---|
18 | } |
---|
19 | |
---|
20 | public static CMDComponentSpec expandComponent(String componentId, ComponentRegistryDbImpl registry) throws ComponentRegistryException { |
---|
21 | CMDComponentSpecExpanderDbImpl expander = new CMDComponentSpecExpanderDbImpl(registry); |
---|
22 | return expander.expandComponent(componentId); |
---|
23 | } |
---|
24 | |
---|
25 | public static CMDComponentSpec expandProfile(String profileId, ComponentRegistryDbImpl registry) throws ComponentRegistryException { |
---|
26 | CMDComponentSpecExpanderDbImpl expander = new CMDComponentSpecExpanderDbImpl(registry); |
---|
27 | return expander.expandProfile(profileId); |
---|
28 | } |
---|
29 | |
---|
30 | @Override |
---|
31 | protected CMDComponentSpec getUncachedComponent(String componentId) throws ComponentRegistryException { |
---|
32 | return dbImplRegistry.getUncachedMDComponent(componentId); |
---|
33 | } |
---|
34 | |
---|
35 | @Override |
---|
36 | protected CMDComponentSpec getUncachedProfile(String profileId) throws ComponentRegistryException { |
---|
37 | return dbImplRegistry.getUncachedMDProfile(profileId); |
---|
38 | } |
---|
39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.