cleanup
[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 org.apache.logging.log4j.LogManager;
13 import org.apache.logging.log4j.Logger;
14
15 import com.vaadin.annotations.Theme;
16 import com.vaadin.annotations.Widgetset;
17 import com.vaadin.navigator.Navigator;
18 import com.vaadin.server.VaadinRequest;
19 import com.vaadin.spring.annotation.SpringUI;
20 import com.vaadin.ui.UI;
21
22 import eu.etaxonomy.cdm.vaadin.view.ConceptRelationshipView;
23
24 /**
25 * @author cmathew
26 * @since 9 Apr 2015
27 *
28 */
29 @Theme("valo")
30 @SpringUI(path=ConceptRelationshipUI.NAME)
31 @Widgetset("eu.etaxonomy.cdm.vaadin.AppWidgetSet")
32 public class ConceptRelationshipUI extends AbstractAuthenticatedUI {
33
34 private static final long serialVersionUID = 7356721273326682601L;
35
36 private static final Logger logger = LogManager.getLogger();
37
38 public static final String NAME = "concept";
39
40 private static final String FIRST_VIEW = "editcr";
41
42 Navigator navigator;
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 }