Project

General

Profile

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

    
3
import com.google.gwt.user.client.ui.FlowPanel;
4
import eu.dnetlib.repo.manager.client.TokenController;
5

    
6
/**
7
 * Created by stefania on 2/10/16.
8
 */
9
public class RunCompatibilityTestController extends TokenController {
10

    
11
    private static RunCompatibilityTestController instance = null;
12
    private SelectRepositoryTypeWidget selectRepositoryTypeWidget = SelectRepositoryTypeWidget.getInstance();
13

    
14
    public static RunCompatibilityTestController getInstance() {
15
        if (instance == null)
16
            instance = new RunCompatibilityTestController();
17

    
18
        return instance;
19
    }
20

    
21
    private RunCompatibilityTestController() {
22
        this.subControllers.put("literature", LiteratureController.getInstance());
23
        this.subControllers.put("data", DataController.getInstance());
24
        this.subControllers.put("cris", CrisController.getInstance());
25
    }
26

    
27
    @Override
28
    public void showWidget(FlowPanel contentPanel, String parent, String rest) {
29

    
30
        if (rest == null)
31
            redrawWidget(contentPanel, selectRepositoryTypeWidget, parent, rest);
32
        else {
33
            super.showWidget(contentPanel, parent, rest);
34
        }
35
    }
36

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

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