Coverage Report - org.kuali.student.lum.program.client.credential.view.CredentialCatalogDetailsViewConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
CredentialCatalogDetailsViewConfiguration
0%
0/11
N/A
1
 
 1  
 package org.kuali.student.lum.program.client.credential.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.credential.CredentialEditableHeader;
 12  
 import org.kuali.student.lum.program.client.properties.ProgramProperties;
 13  
 
 14  
 /**
 15  
  * @author Igor
 16  
  */
 17  
 public class CredentialCatalogDetailsViewConfiguration extends AbstractSectionConfiguration {
 18  
 
 19  
     public static CredentialCatalogDetailsViewConfiguration create() {
 20  0
         return new CredentialCatalogDetailsViewConfiguration(new VerticalSectionView(ProgramSections.CATALOG_INFO_VIEW, ProgramProperties.get().program_menu_sections_catalogInfo(), ProgramConstants.PROGRAM_MODEL_ID));
 21  
     }
 22  
 
 23  
     public static CredentialCatalogDetailsViewConfiguration createSpecial() {
 24  0
         String title = ProgramProperties.get().program_menu_sections_catalogInfo();
 25  0
         return new CredentialCatalogDetailsViewConfiguration(new VerticalSectionView(ProgramSections.CATALOG_INFO_VIEW, title, ProgramConstants.PROGRAM_MODEL_ID, new CredentialEditableHeader(title, ProgramSections.CATALOG_INFO_EDIT)));
 26  
     }
 27  
 
 28  0
     private CredentialCatalogDetailsViewConfiguration(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.MORE_INFORMATION, new MessageKeyInfo(ProgramProperties.get().catalogInformation_referenceUrl()));
 37  0
         rootSection.addSection(section);
 38  0
     }
 39  
 }