Coverage Report - org.kuali.student.lum.program.client.variation.view.VariationInformationViewConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
VariationInformationViewConfiguration
0%
0/42
N/A
1
 
 1  
 package org.kuali.student.lum.program.client.variation.view;
 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.TableSection;
 6  
 import org.kuali.student.common.ui.client.configurable.mvc.views.SectionView;
 7  
 import org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView;
 8  
 import org.kuali.student.common.ui.client.widgets.field.layout.element.MessageKeyInfo;
 9  
 import org.kuali.student.lum.common.client.configuration.AbstractSectionConfiguration;
 10  
 import org.kuali.student.lum.program.client.ProgramConstants;
 11  
 import org.kuali.student.lum.program.client.ProgramSections;
 12  
 import org.kuali.student.lum.program.client.major.MajorEditableHeader;
 13  
 import org.kuali.student.lum.program.client.properties.ProgramProperties;
 14  
 
 15  
 /**
 16  
  * @author Igor
 17  
  */
 18  
 public class VariationInformationViewConfiguration extends AbstractSectionConfiguration {
 19  
 
 20  
     public static VariationInformationViewConfiguration create() {
 21  0
         return new VariationInformationViewConfiguration(new VerticalSectionView(ProgramSections.PROGRAM_DETAILS_VIEW, ProgramProperties.get().program_menu_sections_programInformation(), ProgramConstants.PROGRAM_MODEL_ID));
 22  
     }
 23  
 
 24  
     public static VariationInformationViewConfiguration createSpecial() {
 25  0
         String title = ProgramProperties.get().program_menu_sections_programInformation();
 26  0
         return new VariationInformationViewConfiguration(new VerticalSectionView(ProgramSections.PROGRAM_DETAILS_VIEW, title, ProgramConstants.PROGRAM_MODEL_ID, new MajorEditableHeader(title, ProgramSections.PROGRAM_DETAILS_EDIT)));
 27  
     }
 28  
 
 29  0
     private VariationInformationViewConfiguration(SectionView sectionView) {
 30  0
         rootSection = sectionView;
 31  0
         rootSection.addStyleName("programInformationView");
 32  0
     }
 33  
 
 34  
     @Override
 35  
     protected void buildLayout() {
 36  0
         HorizontalSection section = new HorizontalSection();
 37  0
         section.addSection(createIdentifyingDetailsSection());
 38  0
         section.addSection(createProgramTitleSection());
 39  0
         section.nextRow();
 40  0
         section.addSection(createDatesSection());
 41  0
         section.addSection(createOtherInformationSection());
 42  0
         rootSection.addSection(section);
 43  0
     }
 44  
 
 45  
     private TableSection createIdentifyingDetailsSection() {
 46  0
         TableSection section = new TableSection(SectionTitle.generateH4Title(ProgramProperties.get().programInformation_identifyingDetails()));
 47  0
         configurer.addReadOnlyField(section, ProgramConstants.CODE, new MessageKeyInfo(ProgramProperties.get().programInformation_code()));
 48  0
         configurer.addReadOnlyField(section, ProgramConstants.CREDENTIAL_RUNTIME_PROGRAM_LEVEL, new MessageKeyInfo(
 49  
                 ProgramProperties.get().programInformation_level()));
 50  0
         configurer.addReadOnlyField(section, ProgramConstants.CREDENTIAL_PROGRAM_TYPE_NAME, new MessageKeyInfo(ProgramProperties.get().programInformation_credentialProgram()));
 51  0
         configurer.addReadOnlyField(section, ProgramConstants.PROGRAM_CLASSIFICATION, new MessageKeyInfo(ProgramProperties.get().programInformation_classification()));
 52  0
         configurer.addReadOnlyField(section, ProgramConstants.DEGREE_TYPE, new MessageKeyInfo(ProgramProperties.get().programInformation_degreeType()));
 53  0
         return section;
 54  
     }
 55  
 
 56  
     private TableSection createProgramTitleSection() {
 57  0
         TableSection section = new TableSection(SectionTitle.generateH4Title(ProgramProperties.get().programInformation_programTitle()));
 58  0
         configurer.addReadOnlyField(section, ProgramConstants.LONG_TITLE, new MessageKeyInfo(ProgramProperties.get().programInformation_titleFull()));
 59  0
         configurer.addReadOnlyField(section, ProgramConstants.SHORT_TITLE, new MessageKeyInfo(ProgramProperties.get().programInformation_titleShort()));
 60  0
         configurer.addReadOnlyField(section, ProgramConstants.TRANSCRIPT, new MessageKeyInfo(ProgramProperties.get().programInformation_titleTranscript()));
 61  0
         configurer.addReadOnlyField(section, ProgramConstants.DIPLOMA, new MessageKeyInfo(ProgramProperties.get().programInformation_titleDiploma()));
 62  0
         return section;
 63  
     }
 64  
 
 65  
     private TableSection createDatesSection() {
 66  0
         TableSection section = new TableSection(SectionTitle.generateH4Title(ProgramProperties.get().programInformation_dates()));
 67  0
         configurer.addReadOnlyField(section, ProgramConstants.START_TERM, new MessageKeyInfo(ProgramProperties.get().programInformation_startTerm()));
 68  0
         configurer.addReadOnlyField(section, ProgramConstants.END_INSTITUTIONAL_ADMIT_TERM, new MessageKeyInfo(ProgramProperties.get().programInformation_admitTerm()));
 69  0
         configurer.addReadOnlyField(section, ProgramConstants.END_PROGRAM_ENTRY_TERM, new MessageKeyInfo(ProgramProperties.get().programInformation_entryTerm()));
 70  0
         configurer.addReadOnlyField(section, ProgramConstants.END_PROGRAM_ENROLL_TERM, new MessageKeyInfo(ProgramProperties.get().programInformation_enrollTerm()));
 71  0
         configurer.addReadOnlyField(section, ProgramConstants.PROGRAM_APPROVAL_DATE, new MessageKeyInfo(ProgramProperties.get().programInformation_approvalDate()));
 72  0
         return section;
 73  
     }
 74  
 
 75  
     private TableSection createOtherInformationSection() {
 76  0
         TableSection section = new TableSection(SectionTitle.generateH4Title(ProgramProperties.get().programInformation_otherInformation()));
 77  0
         configurer.addReadOnlyField(section, ProgramConstants.LOCATION, new MessageKeyInfo(ProgramProperties.get().programInformation_location()));
 78  0
         configurer.addReadOnlyField(section, ProgramConstants.CIP_2000, new MessageKeyInfo(ProgramProperties.get().programInformation_cip2000()));
 79  0
         configurer.addReadOnlyField(section, ProgramConstants.CIP_2010, new MessageKeyInfo(ProgramProperties.get().programInformation_cip2010()));
 80  0
         configurer.addReadOnlyField(section, ProgramConstants.HEGIS_CODE, new MessageKeyInfo(ProgramProperties.get().programInformation_hegis()));
 81  0
         configurer.addReadOnlyField(section, ProgramConstants.CREDENTIAL_PROGRAM_INSTITUTION_ID, new MessageKeyInfo(ProgramProperties.get().programInformation_institution()));
 82  0
         return section;
 83  
     }
 84  
 
 85  
 }