use of org.collectionspace.chain.csp.config.ConfigRoot in project application by collectionspace.
the class TestData method getSpec.
public final Spec getSpec(ServletTester tester) {
if (this.spec == null) {
CSPManager cspm = new CSPManagerImpl();
cspm.register(new CoreConfig());
cspm.register(new Spec());
try {
cspm.go();
tester.getAttribute("config-filename");
String filename = (String) tester.getAttribute("config-filename");
cspm.configure(getSource(filename), new ConfigFinder(null), false);
} catch (CSPDependencyException e) {
log.info("CSPManagerImpl failed");
log.info(tester.getAttribute("config-filename").toString());
log.info(e.getLocalizedMessage());
}
ConfigRoot root = cspm.getConfigRoot();
Spec spec = (Spec) root.getRoot(Spec.SPEC_ROOT);
this.spec = spec;
}
return this.spec;
}
use of org.collectionspace.chain.csp.config.ConfigRoot in project application by collectionspace.
the class ServiceConfigGeneration method createSpec.
private Spec createSpec(CSPManager cspm) {
ConfigRoot root = cspm.getConfigRoot();
Spec spec = (Spec) root.getRoot(Spec.SPEC_ROOT);
return spec;
}
use of org.collectionspace.chain.csp.config.ConfigRoot in project application by collectionspace.
the class TestServices method getSpec.
private Spec getSpec(CSPManager cspm) {
ConfigRoot root = cspm.getConfigRoot();
Spec spec = (Spec) root.getRoot(Spec.SPEC_ROOT);
assertNotNull(spec);
return spec;
}
Aggregations