Search in sources :

Example 1 with MainView

use of de.catma.ui.module.main.MainView 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);
    }
}
Also used : CatmaHeader(de.catma.ui.module.main.CatmaHeader) GitProjectManager(de.catma.repository.git.GitProjectManager) IRemoteGitManagerRestricted(de.catma.repository.git.interfaces.IRemoteGitManagerRestricted) GitlabManagerPrivileged(de.catma.repository.git.managers.GitlabManagerPrivileged) NotLoggedInMainView(de.catma.ui.module.main.NotLoggedInMainView) MainView(de.catma.ui.module.main.MainView) NotLoggedInMainView(de.catma.ui.module.main.NotLoggedInMainView)

Aggregations

GitProjectManager (de.catma.repository.git.GitProjectManager)1 IRemoteGitManagerRestricted (de.catma.repository.git.interfaces.IRemoteGitManagerRestricted)1 GitlabManagerPrivileged (de.catma.repository.git.managers.GitlabManagerPrivileged)1 CatmaHeader (de.catma.ui.module.main.CatmaHeader)1 MainView (de.catma.ui.module.main.MainView)1 NotLoggedInMainView (de.catma.ui.module.main.NotLoggedInMainView)1