Coverage Report - org.kuali.student.lum.program.client.core.view.CoreManagingBodiesViewConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
CoreManagingBodiesViewConfiguration
0%
0/18
0%
0/2
1.2
 
 1  
 package org.kuali.student.lum.program.client.core.view;
 2  
 
 3  
 import org.kuali.student.common.ui.client.configurable.mvc.Configurer;
 4  
 import org.kuali.student.common.ui.client.configurable.mvc.sections.VerticalSection;
 5  
 import org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView;
 6  
 import org.kuali.student.lum.common.client.configuration.AbstractSectionConfiguration;
 7  
 import org.kuali.student.lum.program.client.ProgramConstants;
 8  
 import org.kuali.student.lum.program.client.ProgramMsgConstants;
 9  
 import org.kuali.student.lum.program.client.ProgramSections;
 10  
 import org.kuali.student.lum.program.client.core.CoreEditableHeader;
 11  
 
 12  
 /**
 13  
  * @author Igor
 14  
  */
 15  
 public class CoreManagingBodiesViewConfiguration extends AbstractSectionConfiguration {
 16  
     
 17  
     public static CoreManagingBodiesViewConfiguration create(Configurer configurer) {
 18  0
         return new CoreManagingBodiesViewConfiguration(configurer, false);
 19  
     }
 20  
 
 21  
     public static CoreManagingBodiesViewConfiguration createSpecial(Configurer configurer) {
 22  0
         return new CoreManagingBodiesViewConfiguration(configurer, true);
 23  
     }
 24  
 
 25  0
     private CoreManagingBodiesViewConfiguration(Configurer configurer, boolean isSpecial) {
 26  0
         this.setConfigurer(configurer);
 27  0
         String title = getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS_MANAGINGBODIES);
 28  0
         if (!isSpecial){
 29  0
             this.rootSection = new VerticalSectionView(ProgramSections.MANAGE_BODIES_VIEW, title, ProgramConstants.PROGRAM_MODEL_ID);
 30  
         } else {
 31  0
             this.rootSection = new VerticalSectionView(ProgramSections.MANAGE_BODIES_VIEW, title, 
 32  
                     ProgramConstants.PROGRAM_MODEL_ID, new CoreEditableHeader(title, ProgramSections.MANAGE_BODIES_EDIT));
 33  
         }
 34  0
     }
 35  
 
 36  
     @Override
 37  
     protected void buildLayout() {
 38  0
         VerticalSection section = createMainSection();
 39  0
         rootSection.addSection(section);
 40  0
     }
 41  
 
 42  
     private VerticalSection createMainSection() {
 43  0
         VerticalSection section = new VerticalSection();
 44  0
         configurer.addReadOnlyField(section, ProgramConstants.CURRICULUM_OVERSIGHT_DIVISION, generateMessageInfo(ProgramMsgConstants.MANAGINGBODIES_CURRICULUMOVERSIGHTDIVISION));
 45  0
         configurer.addReadOnlyField(section, ProgramConstants.CURRICULUM_OVERSIGHT_UNIT, generateMessageInfo(ProgramMsgConstants.MANAGINGBODIES_CURRICULUMOVERSIGHTUNIT));
 46  0
         configurer.addReadOnlyField(section, ProgramConstants.STUDENT_OVERSIGHT_DIVISION, generateMessageInfo(ProgramMsgConstants.MANAGINGBODIES_STUDENTOVERSIGHTDIVISION));
 47  0
         configurer.addReadOnlyField(section, ProgramConstants.STUDENT_OVERSIGHT_UNIT, generateMessageInfo(ProgramMsgConstants.MANAGINGBODIES_STUDENTOVERSIGHTUNIT));
 48  0
         return section;
 49  
     }
 50  
 }