Coverage Report - org.kuali.student.lum.program.client.credential.view.CredentialCatalogDetailsViewConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
CredentialCatalogDetailsViewConfiguration
0%
0/14
0%
0/2
1.25
 
 1  
 package org.kuali.student.lum.program.client.credential.view;
 2  
 
 3  
 import org.kuali.student.common.ui.client.configurable.mvc.Configurer;
 4  
 import org.kuali.student.common.ui.client.configurable.mvc.SectionTitle;
 5  
 import org.kuali.student.common.ui.client.configurable.mvc.sections.TableSection;
 6  
 import org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView;
 7  
 import org.kuali.student.lum.common.client.configuration.AbstractSectionConfiguration;
 8  
 import org.kuali.student.lum.program.client.ProgramConstants;
 9  
 import org.kuali.student.lum.program.client.ProgramMsgConstants;
 10  
 import org.kuali.student.lum.program.client.ProgramSections;
 11  
 import org.kuali.student.lum.program.client.credential.CredentialEditableHeader;
 12  
 
 13  
 /**
 14  
  * @author Igor
 15  
  */
 16  
 public class CredentialCatalogDetailsViewConfiguration extends AbstractSectionConfiguration {
 17  
 
 18  
     public static CredentialCatalogDetailsViewConfiguration create(Configurer configurer) {
 19  0
         return new CredentialCatalogDetailsViewConfiguration(configurer, false);
 20  
     }
 21  
 
 22  
     public static CredentialCatalogDetailsViewConfiguration createSpecial(Configurer configurer) {
 23  0
         return new CredentialCatalogDetailsViewConfiguration(configurer, false);
 24  
     }
 25  
 
 26  0
     private CredentialCatalogDetailsViewConfiguration(Configurer configurer, boolean isSpecial) {
 27  0
         this.setConfigurer(configurer);
 28  0
         String title = getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS_CATALOGINFO);
 29  0
         if (!isSpecial){
 30  0
             this.rootSection = new VerticalSectionView(ProgramSections.CATALOG_INFO_VIEW, title, 
 31  
                     ProgramConstants.PROGRAM_MODEL_ID);
 32  
         } else {
 33  0
             this.rootSection = new VerticalSectionView(ProgramSections.CATALOG_INFO_VIEW, title, 
 34  
                     ProgramConstants.PROGRAM_MODEL_ID, new CredentialEditableHeader(title, ProgramSections.CATALOG_INFO_EDIT));
 35  
         }
 36  0
     }
 37  
 
 38  
     @Override
 39  
     protected void buildLayout() {
 40  0
         TableSection section = new TableSection(SectionTitle.generateEmptyTitle());
 41  0
         configurer.addReadOnlyField(section, ProgramConstants.DESCRIPTION + "/plain", generateMessageInfo(ProgramMsgConstants.CATALOGINFORMATION_DESCR));
 42  0
         configurer.addReadOnlyField(section, ProgramConstants.MORE_INFORMATION, generateMessageInfo(ProgramMsgConstants.CATALOGINFORMATION_REFERENCEURL));
 43  0
         rootSection.addSection(section);
 44  0
     }
 45  
 }