Search in sources :

Example 11 with CSPManager

use of org.collectionspace.csp.api.container.CSPManager in project application by collectionspace.

the class TestServices method getServiceManager.

private CSPManager getServiceManager(String filename) {
    CSPManager cspm = new CSPManagerImpl();
    cspm.register(new CoreConfig());
    cspm.register(new Spec());
    cspm.register(new ServicesStorageGenerator());
    try {
        cspm.go();
        cspm.configure(getSource(filename), new ConfigFinder(null), false);
    } catch (CSPDependencyException e) {
        log.error("CSPManagerImpl failed");
        log.error(e.getLocalizedMessage());
    }
    return cspm;
}
Also used : ServicesStorageGenerator(org.collectionspace.chain.csp.persistence.services.ServicesStorageGenerator) CSPManager(org.collectionspace.csp.api.container.CSPManager) CoreConfig(org.collectionspace.chain.csp.inner.CoreConfig) CSPDependencyException(org.collectionspace.csp.api.core.CSPDependencyException) CSPManagerImpl(org.collectionspace.csp.container.impl.CSPManagerImpl) TenantSpec(org.collectionspace.chain.csp.persistence.services.TenantSpec) Spec(org.collectionspace.chain.csp.schema.Spec) ConfigFinder(org.collectionspace.csp.helper.core.ConfigFinder) TestConfigFinder(org.collectionspace.csp.helper.test.TestConfigFinder)

Aggregations

CSPManager (org.collectionspace.csp.api.container.CSPManager)11 Spec (org.collectionspace.chain.csp.schema.Spec)8 CoreConfig (org.collectionspace.chain.csp.inner.CoreConfig)7 CSPManagerImpl (org.collectionspace.csp.container.impl.CSPManagerImpl)7 ConfigFinder (org.collectionspace.csp.helper.core.ConfigFinder)7 ConfigRoot (org.collectionspace.chain.csp.config.ConfigRoot)6 TestConfigFinder (org.collectionspace.csp.helper.test.TestConfigFinder)5 CSPDependencyException (org.collectionspace.csp.api.core.CSPDependencyException)3 Test (org.junit.Test)3 ServicesStorageGenerator (org.collectionspace.chain.csp.persistence.services.ServicesStorageGenerator)2 TenantSpec (org.collectionspace.chain.csp.persistence.services.TenantSpec)2 File (java.io.File)1 Record (org.collectionspace.chain.csp.schema.Record)1 CSPRequestCache (org.collectionspace.csp.api.core.CSPRequestCache)1 CSPRequestCredentials (org.collectionspace.csp.api.core.CSPRequestCredentials)1 StorageGenerator (org.collectionspace.csp.api.persistence.StorageGenerator)1 RequestCache (org.collectionspace.csp.helper.core.RequestCache)1 JSONException (org.json.JSONException)1 JSONObject (org.json.JSONObject)1 InputSource (org.xml.sax.InputSource)1