Clover Coverage Report - Kuali Student 1.2.1-SNAPSHOT (Aggregated)
Coverage timestamp: Wed Nov 2 2011 04:03:58 EST
../../../../../../../../../img/srcFileCovDistChart0.png 42% of files have more coverage
24   66   10   4
6   54   0.42   3
6     1.67  
2    
 
  ViewCourseParentController       Line # 9 24 0% 10 36 0% 0.0
  ViewCourseParentController.Views       Line # 11 0 - 0 0 - -1.0
 
No Tests
 
1    package org.kuali.student.lum.lu.ui.course.client.controllers;
2   
3    import org.kuali.student.common.ui.client.application.ViewContext;
4    import org.kuali.student.common.ui.client.configurable.mvc.layouts.BasicLayout;
5    import org.kuali.student.common.ui.client.mvc.Callback;
6    import org.kuali.student.common.ui.client.mvc.breadcrumb.BreadcrumbManager;
7    import org.kuali.student.common.ui.client.mvc.history.HistoryManager;
8   
 
9    public class ViewCourseParentController extends BasicLayout{
10   
 
11    public static enum Views{VIEW, VERSIONS}
12   
13    private ViewCourseController view;
14    private VersionsController versions;
15   
 
16  0 toggle public ViewCourseParentController() {
17  0 super(ViewCourseParentController.class.toString());
18  0 this.setDefaultView(Views.VIEW);
19  0 setupDefaultView();
20    }
21   
 
22  0 toggle private void setupDefaultView() {
23  0 view = new ViewCourseController(Views.VIEW);
24  0 view.setParentController(this);
25  0 versions = new VersionsController(Views.VERSIONS);
26  0 view.setParentController(this);
27  0 this.addView(view);
28  0 this.addView(versions);
29    }
30   
 
31  0 toggle @Override
32    public void setViewContext(ViewContext viewContext) {
33    //super.setViewContext(viewContext);
34  0 view.setViewContext(viewContext);
35    }
36   
 
37  0 toggle @Override
38    public <V extends Enum<?>> void showView(final V viewType, final Callback<Boolean> onReadyCallback) {
39  0 if(viewType == Views.VERSIONS){
40  0 view.setName("");
41  0 this.setName(view.getCourseTitle());
42  0 versions.setVersionIndId(view.getVersionIndId());
43  0 versions.setCurrentVersionId(view.getCurrentId());
44  0 versions.setCurrentTitle(view.getCourseTitle());
45    }
46  0 else if(viewType == Views.VIEW){
47  0 view.setName(view.getCourseTitle());
48  0 this.setName("");
49    }
50  0 super.showView(viewType, onReadyCallback);
51    }
52   
 
53  0 toggle @Override
54    public Enum<?> getViewEnumValue(String enumValue) {
55  0 return Views.valueOf(enumValue);
56    }
57   
 
58  0 toggle @Override
59    public void beforeShow(Callback<Boolean> onReadyCallback) {
60  0 if(this.getName() != null && !this.getName().equals("")){
61  0 this.setName("");
62    }
63  0 super.beforeShow(onReadyCallback);
64    }
65   
66    }