Project

General

Profile

1
package eu.dnetlib.repo.manager.client.validator.test;
2

    
3
import com.google.gwt.user.client.ui.FlowPanel;
4
import com.google.gwt.user.client.ui.HTML;
5
import com.google.gwt.user.client.ui.RootPanel;
6
import eu.dnetlib.repo.manager.client.RepositoryManager;
7
import eu.dnetlib.repo.manager.client.TokenController;
8

    
9
/**
10
 * Created by stefania on 2/10/16.
11
 */
12
public class RunCompatibilityTestController extends TokenController {
13

    
14
    private static RunCompatibilityTestController instance = null;
15
    private SelectRepositoryTypeWidget selectRepositoryTypeWidget = SelectRepositoryTypeWidget.getInstance();
16

    
17
    public static RunCompatibilityTestController getInstance() {
18
        if (instance == null)
19
            instance = new RunCompatibilityTestController();
20

    
21
        return instance;
22
    }
23

    
24
    private RunCompatibilityTestController() {
25
        this.subControllers.put("literature", LiteratureController.getInstance());
26
        this.subControllers.put("data", DataController.getInstance());
27
        this.subControllers.put("cris", CrisController.getInstance());
28
    }
29

    
30
    @Override
31
    public void showWidget(FlowPanel contentPanel, String parent, String rest) {
32

    
33
        if (rest == null)
34
            redrawWidget(contentPanel, selectRepositoryTypeWidget, parent, rest);
35
        else {
36
            super.showWidget(contentPanel, parent, rest);
37
        }
38
    }
39

    
40
//    @Override
41
//    public void drawHeader(String token) {
42
//
43
//        RootPanel.get("pageHeader").addStyleName("row wrapper border-bottom white-bg page-heading");
44
//        if (token == null) {
45
//            RepositoryManager.pageHeader.clear();
46
//            RepositoryManager.pageHeader.add(new HTML("<div class=\"col-sm-9\"><h2>Validate your datasource</h2><ol class=\"breadcrumb\">" +
47
//                    "<li><a href=\"#dashboard\">Home</a></li><li class=\"active\"><strong>Run Compatibility Test</strong></li></ol></div>"));
48
//        } else {
49
//            super.drawHeader(token);
50
//        }
51
//    }
52

    
53
    @Override
54
    public String[] getMenuPath(String parent, String rest) {
55
        return new String[] {"validate"};
56
    }
57
}
(5-5/12)