Coverage Report - org.kuali.student.lum.program.client.major.edit.MajorProposalSummaryConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
MajorProposalSummaryConfiguration
0%
0/22
0%
0/6
2.5
 
 1  
 package org.kuali.student.lum.program.client.major.edit;
 2  
 
 3  
 import org.kuali.student.common.ui.client.configurable.mvc.sections.Section;
 4  
 import org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView;
 5  
 import org.kuali.student.core.workflow.ui.client.widgets.WorkflowUtilities;
 6  
 import org.kuali.student.lum.common.client.configuration.AbstractControllerConfiguration;
 7  
 import org.kuali.student.lum.common.client.configuration.Configuration;
 8  
 import org.kuali.student.lum.common.client.configuration.ConfigurationManager;
 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.major.MajorManager;
 12  
 import org.kuali.student.lum.program.client.major.proposal.MajorProposalController;
 13  
 import org.kuali.student.lum.program.client.major.view.*;
 14  
 import org.kuali.student.lum.program.client.properties.ProgramProperties;
 15  
 import org.kuali.student.lum.program.client.widgets.SummaryActionPanel;
 16  
 
 17  
 import com.google.gwt.user.client.ui.Widget;
 18  
 
 19  
 /**
 20  
  * This configuration is used to define what widgets should appear on the screen
 21  
  * for the major proposal controller.  
 22  
  * <p>
 23  
  * Note that this is pretty much a copy of the major discipline controller, 
 24  
  * but this controller has a couple extra tabs .
 25  
  * 
 26  
  * @author cmann
 27  
  */
 28  
 public class MajorProposalSummaryConfiguration extends AbstractControllerConfiguration {
 29  
 
 30  0
     public MajorProposalSummaryConfiguration() {
 31  0
         rootSection = new VerticalSectionView(ProgramSections.SUMMARY, ProgramProperties.get().program_menu_sections_summary(), ProgramConstants.PROGRAM_MODEL_ID, true);
 32  0
     }
 33  
 
 34  
     /**
 35  
      * This is an inherited method called by the framework to layout components on the screen.
 36  
      */
 37  
     @Override
 38  
     protected void buildLayout() {
 39  0
         ConfigurationManager configurationManager = new ConfigurationManager(configurer);
 40  
             
 41  
         // Initialize tabs on left of screen
 42  0
         MajorInformationViewConfiguration majorInfoViewConfig = MajorInformationViewConfiguration.createSpecial();
 43  0
         configurationManager.registerConfiguration(majorInfoViewConfig);
 44  0
         configurationManager.registerConfiguration(ManagingBodiesViewConfiguration.createSpecial());
 45  0
         configurationManager.registerConfiguration(SpecializationsViewConfiguration.createSpecial());
 46  0
         configurationManager.registerConfiguration(CatalogInformationViewConfiguration.createSpecial());
 47  0
         configurationManager.registerConfiguration(new ProgramRequirementsViewConfiguration(true,true));
 48  0
         configurationManager.registerConfiguration(LearningObjectivesViewConfiguration.createSpecial());
 49  0
         configurationManager.registerConfiguration(SupportingDocsViewConfiguration.createSpecial());
 50  
 
 51  
         // Add the work flow utilities to the screen light box to the screen
 52  
         // Instance of check ensures we only do this for majors
 53  0
         if (controller instanceof MajorProposalController){
 54  
             
 55  
             // Grab the work flow utilities widget we initialized in the controller
 56  0
             WorkflowUtilities workflowUtilities = ((MajorProposalController)controller).getWfUtilities();
 57  
             
 58  
             // Get a reference to the widget so we can add it to the root section of the screen
 59  0
             Widget widget = workflowUtilities.getWorkflowActionsWidget();
 60  
             
 61  
             // Enable widget so it is visible
 62  
             // TODO: Is this needed here or can we do this when displaying widget
 63  0
             workflowUtilities.enableWorkflowActionsWidgets(true);
 64  
             
 65  
             // Add the widget to the root section of the screen
 66  0
             rootSection.addWidget(widget); 
 67  
         }
 68  
  
 69  
         
 70  
         // Loop over all configurations in the configuration manager
 71  0
         for (Configuration configuration : configurationManager.getConfigurations()) {
 72  0
             if (configuration instanceof AbstractControllerConfiguration) {
 73  0
                 ((AbstractControllerConfiguration) configuration).setController(controller);
 74  
             }
 75  0
             rootSection.addSection((Section) configuration.getView());
 76  
         }    
 77  0
      }
 78  
 }