First steps to create a bootstrap module for data migration

This commit is contained in:
René Pfeuffer
2019-05-09 10:36:27 +02:00
parent f7c4ec06ce
commit d29fa32c8e
6 changed files with 176 additions and 35 deletions

View File

@@ -208,9 +208,9 @@ public class ScmServletModule extends ServletModule
{
install(ThrowingProviderBinder.forModule(this));
SCMContextProvider context = SCMContext.getContext();
bind(SCMContextProvider.class).toInstance(context);
// SCMContextProvider context = SCMContext.getContext();
//
// bind(SCMContextProvider.class).toInstance(context);
ScmConfiguration config = getScmConfiguration();
CipherUtil cu = CipherUtil.getInstance();
@@ -230,10 +230,10 @@ public class ScmServletModule extends ServletModule
bind(ScmEventBus.class).toInstance(ScmEventBus.getInstance());
// bind core
bind(ConfigurationStoreFactory.class, JAXBConfigurationStoreFactory.class);
bind(ConfigurationEntryStoreFactory.class, JAXBConfigurationEntryStoreFactory.class);
bind(DataStoreFactory.class, JAXBDataStoreFactory.class);
bind(BlobStoreFactory.class, FileBlobStoreFactory.class);
// bind(ConfigurationStoreFactory.class, JAXBConfigurationStoreFactory.class);
// bind(ConfigurationEntryStoreFactory.class, JAXBConfigurationEntryStoreFactory.class);
// bind(DataStoreFactory.class, JAXBDataStoreFactory.class);
// bind(BlobStoreFactory.class, FileBlobStoreFactory.class);
bind(ScmConfiguration.class).toInstance(config);
bind(PluginLoader.class).toInstance(pluginLoader);
bind(PluginManager.class, DefaultPluginManager.class);
@@ -242,9 +242,9 @@ public class ScmServletModule extends ServletModule
bind(Scheduler.class).to(QuartzScheduler.class);
// note CipherUtil uses an other generator
bind(KeyGenerator.class).to(DefaultKeyGenerator.class);
// bind(KeyGenerator.class).to(DefaultKeyGenerator.class);
bind(CipherHandler.class).toInstance(cu.getCipherHandler());
bind(FileSystem.class, DefaultFileSystem.class);
// bind(FileSystem.class, DefaultFileSystem.class);
// bind health check stuff
bind(HealthCheckContextListener.class);
@@ -266,7 +266,7 @@ public class ScmServletModule extends ServletModule
// bind dao
bind(GroupDAO.class, XmlGroupDAO.class);
bind(UserDAO.class, XmlUserDAO.class);
bind(RepositoryDAO.class, XmlRepositoryDAO.class);
// bind(RepositoryDAO.class, XmlRepositoryDAO.class);
bindDecorated(RepositoryManager.class, DefaultRepositoryManager.class,
RepositoryManagerProvider.class);