Project

General

Profile

Download (1.9 KB) Statistics
| Branch: | Tag: | Revision:
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.annotation.SpringUI;
21
import com.vaadin.spring.server.SpringVaadinServlet;
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
@SpringUI(path="/app/concept")
33
@Widgetset("eu.etaxonomy.cdm.vaadin.AppWidgetSet")
34
public class ConceptRelationshipUI extends AbstractAuthenticatedUI {
35

    
36
    Navigator navigator;
37

    
38
    private static final String FIRST_VIEW = "editcr";
39

    
40
    private final static Logger logger = Logger.getLogger(ConceptRelationshipUI.class);
41

    
42
    @WebServlet(value = {"/*"}, asyncSupported = true)
43
    public static class Servlet extends SpringVaadinServlet {
44
    }
45

    
46
    @Override
47
    protected void doInit(VaadinRequest request) {
48
        // FIXME: remove this when testing is done
49
        //setIgnoreAuthentication(true);
50

    
51
        getPage().setTitle("Concept Relationship Editor");
52
        logger.warn("original classification : " + request.getParameter("oc"));
53
        logger.warn("copy classification : " + request.getParameter("cc"));
54
        String oc = request.getParameter("oc");
55
        String cc = request.getParameter("cc");
56

    
57
        ConceptRelationshipView crEditor = new ConceptRelationshipView(oc,cc);
58
        UI.getCurrent().getNavigator().addView(FIRST_VIEW, crEditor);
59

    
60
    }
61

    
62
    @Override
63
    public String getFirstViewName() {
64
        return FIRST_VIEW;
65
    }
66

    
67
}
(3-3/7)