use of org.eclipse.winery.repository.filebased.MultiRepository in project winery by eclipse.
the class Prefs method doRepositoryInitialization.
/**
* Initialization code for the repository. Should go into separate class, but being here should be OK for a
* prototype
* <p>
* Called from both the constructor for JUnit and the servlet-based initialization
* <p>
*/
private void doRepositoryInitialization() throws Exception {
RepositoryFactory.reconfigure();
if (RepositoryFactory.getRepository() instanceof GitBasedRepository) {
GitWebSocket socket = new GitWebSocket();
((GitBasedRepository) RepositoryFactory.getRepository()).registerForEvents(socket);
} else if (RepositoryFactory.getRepository() instanceof MultiRepository) {
GitWebSocket socket = new GitWebSocket();
((MultiRepository) RepositoryFactory.getRepository()).registerForEvents(socket);
}
}
Aggregations