use of de.catma.ui.module.main.NotLoggedInMainView in project catma by forTEXT.
the class Vaadin8InitializationService method newEntryPage.
@Override
public Component newEntryPage(EventBus eventBus, LoginService loginService, HazelCastService hazelcastService, SqliteService sqliteService) throws IOException {
IRemoteGitManagerRestricted api = loginService.getAPI();
if (api != null) {
GitProjectManager projectManager = new GitProjectManager(CATMAPropertyKey.GitBasedRepositoryBasePath.getValue(), api, // noop deletion handler
(projectId) -> {
}, acquireBackgroundService(), eventBus);
hazelcastService.start();
GitlabManagerPrivileged gitlabManagerPrivileged = new GitlabManagerPrivileged();
boolean termsOfUseConsentGiven = gitlabManagerPrivileged.updateLastLoginAndGetTermsOfUseConsent(api.getUser());
return new MainView(projectManager, new CatmaHeader(eventBus, loginService, gitlabManagerPrivileged), eventBus, api, loginService, termsOfUseConsentGiven, consent -> gitlabManagerPrivileged.setTermsOfUseConsentGiven(api.getUser(), consent));
} else {
return new NotLoggedInMainView(this, loginService, hazelcastService, sqliteService, eventBus);
}
}
Aggregations