@Test public void initTest() throws IOException, SAXException { System.out.println("hola holitas" + contextPath); final WebClient webClient = new WebClient(); webClient.addRequestHeader("Cache-Control", "no-cache, no-store, must-revalidate"); webClient.addRequestHeader("Pragma", "no-cache"); webClient.addRequestHeader("Expires", "0"); final HtmlPage page = webClient.getPage(contextPath.toExternalForm() + "?invitation=12345678"); final String pageAsText = page.asText(); webClient.closeAllWindows(); }
@Override public void init(VaadinRequest request) { logger.info("New Vaadin UI created"); String invitation = request.getParameter("invitation"); logger.info("Invitation: {} of sessions : {}", invitation); setSizeFull(); GazpachoViewDisplay viewDisplay = new GazpachoViewDisplay(); setContent(viewDisplay); navigator = new Navigator(this, (ViewDisplay) viewDisplay); navigator.addProvider(viewProvider); navigator.setErrorProvider(new GazpachoErrorViewProvider()); if (isUserSignedIn()) { navigator.navigateTo(QuestionnaireView.NAME); } else { navigator.navigateTo(LoginView.NAME); } }
QuestionnairesUI extends UI { @Override public void init(VaadinRequest request) { logger.info("New Vaadin UI created"); String invitation = request.getParameter("invitation"); logger.info("Invitation: {} of sessions : {}", invitation); setSizeFull(); GazpachoViewDisplay viewDisplay = new GazpachoViewDisplay(); setContent(viewDisplay); navigator = new Navigator(this, (ViewDisplay) viewDisplay); navigator.addProvider(viewProvider); navigator.setErrorProvider(new GazpachoErrorViewProvider()); if (isUserSignedIn()) { navigator.navigateTo(QuestionnaireView.NAME); } else { navigator.navigateTo(LoginView.NAME); } } }
QuestionnairesUI extends UI { @Override public void init(VaadinRequest request) { logger.info("New Vaadin UI created"); String invitation = request.getParameter("invitation"); logger.info("Invitation: {} of sessions : {}", invitation); setSizeFull(); GazpachoViewDisplay viewDisplay = new GazpachoViewDisplay(); setContent(viewDisplay); navigator = new Navigator(this, (ViewDisplay) viewDisplay); navigator.addProvider(viewProvider); navigator.setErrorProvider(new GazpachoErrorViewProvider()); if (isUserSignedIn()) { navigator.navigateTo(QuestionnaireView.NAME); } else { navigator.navigateTo(LoginView.NAME); } }  }
QuestionnairesUI extends UI { @Override public void init(VaadinRequest request) { logger.info("New Vaadin UI created"); String invitation = request.getParameter("invitation"); logger.info("Invitation: {} of sessions : {}", invitation); setSizeFull(); GazpachoViewDisplay viewDisplay = new GazpachoViewDisplay(); setContent(viewDisplay); navigator = new Navigator(this, (ViewDisplay) viewDisplay); navigator.addProvider(viewProvider); navigator.setErrorProvider(new GazpachoErrorViewProvider()); if (isUserSignedIn()) { navigator.navigateTo(QuestionnaireView.NAME); } else { navigator.navigateTo(LoginView.NAME); } }  @Override void init(VaadinRequest request); boolean isUserInRole(String role); String getPrincipalName(); boolean isUserSignedIn(); }
QuestionnairesUI extends UI { @Override public void init(VaadinRequest request) { logger.info("New Vaadin UI created"); String invitation = request.getParameter("invitation"); logger.info("Invitation: {} of sessions : {}", invitation); setSizeFull(); GazpachoViewDisplay viewDisplay = new GazpachoViewDisplay(); setContent(viewDisplay); navigator = new Navigator(this, (ViewDisplay) viewDisplay); navigator.addProvider(viewProvider); navigator.setErrorProvider(new GazpachoErrorViewProvider()); if (isUserSignedIn()) { navigator.navigateTo(QuestionnaireView.NAME); } else { navigator.navigateTo(LoginView.NAME); } }  @Override void init(VaadinRequest request); boolean isUserInRole(String role); String getPrincipalName(); boolean isUserSignedIn();  }