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