ref #5285 replacing VaadinServlet by SpringVaadinServlet
[cdm-vaadin.git] / src / main / java / eu / etaxonomy / cdm / vaadin / ui / ConceptRelationshipUI.java
1 /**
2 * Copyright (C) 2015 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.cdm.vaadin.ui;
10
11
12 import javax.servlet.annotation.WebServlet;
13
14 import org.apache.log4j.Logger;
15
16 import com.vaadin.annotations.Theme;
17 import com.vaadin.annotations.Widgetset;
18 import com.vaadin.navigator.Navigator;
19 import com.vaadin.server.VaadinRequest;
20 import com.vaadin.spring.server.SpringVaadinServlet;
21 import com.vaadin.ui.UI;
22
23 import eu.etaxonomy.cdm.vaadin.view.ConceptRelationshipView;
24
25 /**
26 * @author cmathew
27 * @date 9 Apr 2015
28 *
29 */
30 @Theme("edit")
31 @Widgetset("eu.etaxonomy.cdm.vaadin.AppWidgetSet")
32 public class ConceptRelationshipUI extends AbstractAuthenticatedUI {
33
34 Navigator navigator;
35
36 private static final String FIRST_VIEW = "editcr";
37
38 private final static Logger logger = Logger.getLogger(ConceptRelationshipUI.class);
39
40 @WebServlet(value = {"/app/concept/*"}, asyncSupported = true)
41 public static class Servlet extends SpringVaadinServlet {
42 }
43
44 @Override
45 protected void doInit(VaadinRequest request) {
46 // FIXME: remove this when testing is done
47 //setIgnoreAuthentication(true);
48
49 getPage().setTitle("Concept Relationship Editor");
50 logger.warn("original classification : " + request.getParameter("oc"));
51 logger.warn("copy classification : " + request.getParameter("cc"));
52 String oc = request.getParameter("oc");
53 String cc = request.getParameter("cc");
54
55 ConceptRelationshipView crEditor = new ConceptRelationshipView(oc,cc);
56 UI.getCurrent().getNavigator().addView(FIRST_VIEW, crEditor);
57
58 }
59
60 @Override
61 public String getFirstViewName() {
62 return FIRST_VIEW;
63 }
64
65 }