Coverage Report - org.kuali.student.lum.program.client.credential.edit.CredentialInformationEditConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
CredentialInformationEditConfiguration
0%
0/29
N/A
1
 
 1  
 package org.kuali.student.lum.program.client.credential.edit;
 2  
 
 3  
 import org.kuali.student.common.ui.client.configurable.mvc.SectionTitle;
 4  
 import org.kuali.student.common.ui.client.configurable.mvc.sections.HorizontalSection;
 5  
 import org.kuali.student.common.ui.client.configurable.mvc.sections.VerticalSection;
 6  
 import org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView;
 7  
 import org.kuali.student.common.ui.client.widgets.field.layout.element.MessageKeyInfo;
 8  
 import org.kuali.student.lum.common.client.configuration.AbstractSectionConfiguration;
 9  
 import org.kuali.student.lum.program.client.ProgramConstants;
 10  
 import org.kuali.student.lum.program.client.ProgramSections;
 11  
 import org.kuali.student.lum.program.client.properties.ProgramProperties;
 12  
 
 13  
 /**
 14  
  * @author Igor
 15  
  */
 16  
 public class CredentialInformationEditConfiguration extends AbstractSectionConfiguration {
 17  
 
 18  0
     public CredentialInformationEditConfiguration() {
 19  0
         rootSection = new VerticalSectionView(ProgramSections.PROGRAM_DETAILS_EDIT, ProgramProperties.get().program_menu_sections_programInformation(), ProgramConstants.PROGRAM_MODEL_ID);
 20  0
     }
 21  
 
 22  
     @Override
 23  
     protected void buildLayout() {
 24  0
         HorizontalSection horizontalSection = new HorizontalSection();
 25  0
         horizontalSection.addSection(createLeftSection());
 26  0
         rootSection.addSection(horizontalSection);
 27  0
     }
 28  
 
 29  
     private VerticalSection createLeftSection() {
 30  0
         VerticalSection section = new VerticalSection();
 31  0
         section.addSection(createKeyProgramInformationSection());
 32  0
         section.addSection(createProgramTitleSection());
 33  0
         section.addSection(createDatesSection());
 34  0
         section.addSection(createOtherInformationSection());
 35  0
         return section;
 36  
     }
 37  
 
 38  
     private VerticalSection createKeyProgramInformationSection() {
 39  0
         VerticalSection section = new VerticalSection();
 40  0
         configurer.addField(section, ProgramConstants.CODE, new MessageKeyInfo(ProgramProperties.get().programInformation_code()));
 41  0
         configurer.addField(section, ProgramConstants.DEGREE_TYPE, new MessageKeyInfo(ProgramProperties.get().programInformation_degreeType()));
 42  0
         return section;
 43  
     }
 44  
 
 45  
     private VerticalSection createProgramTitleSection() {
 46  0
         VerticalSection section = new VerticalSection();
 47  0
         configurer.addField(section, ProgramConstants.LONG_TITLE, new MessageKeyInfo(ProgramProperties.get().programInformation_titleFull()));
 48  0
         configurer.addField(section, ProgramConstants.SHORT_TITLE, new MessageKeyInfo(ProgramProperties.get().programInformation_titleShort()));
 49  0
         return section;
 50  
     }
 51  
 
 52  
     private VerticalSection createDatesSection() {
 53  0
         VerticalSection section = new VerticalSection(SectionTitle.generateH3Title(ProgramProperties.get().programInformation_dates()));
 54  0
         configurer.addField(section, ProgramConstants.START_TERM, new MessageKeyInfo(ProgramProperties.get().programInformation_startTerm()));
 55  0
         configurer.addField(section, ProgramConstants.END_PROGRAM_ENTRY_TERM, new MessageKeyInfo(ProgramProperties.get().programInformation_entryTerm()));
 56  0
         configurer.addField(section, ProgramConstants.END_PROGRAM_ENROLL_TERM, new MessageKeyInfo(ProgramProperties.get().programInformation_enrollTerm()));
 57  0
         return section;
 58  
     }
 59  
 
 60  
     private VerticalSection createOtherInformationSection() {
 61  0
         VerticalSection section = new VerticalSection(SectionTitle.generateH3Title(ProgramProperties.get().programInformation_otherInformation()));
 62  0
         configurer.addField(section, ProgramConstants.INSTITUTION + "/" + ProgramConstants.ORG_ID, new MessageKeyInfo(ProgramProperties.get().programInformation_institution()));
 63  0
         return section;
 64  
     }
 65  
 }