Coverage Report - org.kuali.student.lum.program.client.core.view.CoreCatalogInformationViewConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
CoreCatalogInformationViewConfiguration
0%
0/13
N/A
1
 
 1  
 package org.kuali.student.lum.program.client.core.view;
 2  
 
 3  
 import org.kuali.student.common.ui.client.configurable.mvc.SectionTitle;
 4  
 import org.kuali.student.common.ui.client.configurable.mvc.sections.TableSection;
 5  
 import org.kuali.student.common.ui.client.configurable.mvc.views.SectionView;
 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.core.CoreEditableHeader;
 12  
 import org.kuali.student.lum.program.client.properties.ProgramProperties;
 13  
 
 14  
 /**
 15  
  * @author Igor
 16  
  */
 17  
 public class CoreCatalogInformationViewConfiguration extends AbstractSectionConfiguration {
 18  
 
 19  
      public static CoreCatalogInformationViewConfiguration create() {
 20  0
         return new CoreCatalogInformationViewConfiguration(new VerticalSectionView(ProgramSections.CATALOG_INFO_VIEW, ProgramProperties.get().program_menu_sections_catalogInfo(), ProgramConstants.PROGRAM_MODEL_ID));
 21  
     }
 22  
 
 23  
     public static CoreCatalogInformationViewConfiguration createSpecial() {
 24  0
         String title = ProgramProperties.get().program_menu_sections_catalogInfo();
 25  0
         return new CoreCatalogInformationViewConfiguration(new VerticalSectionView(ProgramSections.CATALOG_INFO_VIEW, title, ProgramConstants.PROGRAM_MODEL_ID, new CoreEditableHeader(title, ProgramSections.CATALOG_INFO_EDIT)));
 26  
     }
 27  
 
 28  0
     private CoreCatalogInformationViewConfiguration(SectionView sectionView) {
 29  0
         rootSection = sectionView;
 30  0
     }
 31  
 
 32  
     @Override
 33  
     protected void buildLayout() {
 34  0
         TableSection section = new TableSection(SectionTitle.generateEmptyTitle());
 35  0
         configurer.addReadOnlyField(section, ProgramConstants.DESCRIPTION + "/plain", new MessageKeyInfo(ProgramProperties.get().catalogInformation_descr()));
 36  0
         configurer.addReadOnlyField(section, ProgramConstants.CATALOG_DESCRIPTION + "/plain", new MessageKeyInfo(ProgramProperties.get().catalogInformation_catalogDescr()));
 37  0
         configurer.addReadOnlyField(section, ProgramConstants.PUBLICATION_TARGETS, new MessageKeyInfo(ProgramProperties.get().catalogInformation_catalogPublicationTargets()));
 38  0
         configurer.addReadOnlyField(section, ProgramConstants.MORE_INFORMATION, new MessageKeyInfo(ProgramProperties.get().catalogInformation_referenceUrl()));
 39  0
         rootSection.addSection(section);
 40  0
     }
 41  
 }