View Javadoc

1   package org.kuali.student.lum.program.client.variation.edit;
2   
3   import org.kuali.student.common.ui.client.configurable.mvc.Configurer;
4   import org.kuali.student.common.ui.client.configurable.mvc.sections.Section;
5   import org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView;
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.ProgramMsgConstants;
11  import org.kuali.student.lum.program.client.ProgramSections;
12  import org.kuali.student.lum.program.client.major.view.*;
13  import org.kuali.student.lum.program.client.variation.view.VariationInformationViewConfiguration;
14  
15  /**
16   * @author Igor
17   */
18  public class VariationSummaryConfiguration extends AbstractControllerConfiguration {
19  
20      public VariationSummaryConfiguration(Configurer configurer) {
21          this.setConfigurer(configurer);
22          rootSection = new VerticalSectionView(ProgramSections.SUMMARY, getLabel(ProgramMsgConstants.VARIATION_SUMMARY), ProgramConstants.PROGRAM_MODEL_ID, true);
23      }
24  
25      @Override
26      protected void buildLayout() {
27          ConfigurationManager configurationManager = new ConfigurationManager();
28          configurationManager.registerConfiguration(VariationInformationViewConfiguration.createSpecial(configurer));
29          configurationManager.registerConfiguration(ManagingBodiesViewConfiguration.createSpecial(configurer, controller));
30          configurationManager.registerConfiguration(CatalogInformationViewConfiguration.createSpecial(configurer, controller));
31          configurationManager.registerConfiguration(new ProgramRequirementsViewConfiguration(configurer, true));
32          configurationManager.registerConfiguration(LearningObjectivesViewConfiguration.createSpecial(configurer, controller));
33          configurationManager.registerConfiguration(SupportingDocsViewConfiguration.createSpecial(configurer, controller));
34          for (Configuration configuration : configurationManager.getConfigurations()) {
35              if (configuration instanceof AbstractControllerConfiguration) {
36                  ((AbstractControllerConfiguration) configuration).setController(controller);
37              }
38              rootSection.addSection((Section) configuration.getView());
39          }
40      }
41  }
42