1 package org.kuali.student.lum.program.client.variation.view;
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.lum.common.client.configuration.AbstractControllerConfiguration;
6 import org.kuali.student.lum.common.client.configuration.Configuration;
7 import org.kuali.student.lum.common.client.configuration.ConfigurationManager;
8 import org.kuali.student.lum.program.client.ProgramConstants;
9 import org.kuali.student.lum.program.client.ProgramSections;
10 import org.kuali.student.lum.program.client.major.view.CatalogInformationViewConfiguration;
11 import org.kuali.student.lum.program.client.major.view.LearningObjectivesViewConfiguration;
12 import org.kuali.student.lum.program.client.major.view.ManagingBodiesViewConfiguration;
13 import org.kuali.student.lum.program.client.major.view.ProgramRequirementsViewConfiguration;
14 import org.kuali.student.lum.program.client.properties.ProgramProperties;
15
16
17
18
19 public class VariationViewAllConfiguration extends AbstractControllerConfiguration {
20
21 public VariationViewAllConfiguration() {
22 rootSection = new VerticalSectionView(ProgramSections.VIEW_ALL, ProgramProperties.get().program_menu_sections_viewAll(), ProgramConstants.PROGRAM_MODEL_ID, false);
23 }
24
25 @Override
26 protected void buildLayout() {
27 ConfigurationManager configurationManager = new ConfigurationManager(configurer);
28 configurationManager.registerConfiguration(VariationInformationViewConfiguration.create());
29 configurationManager.registerConfiguration(ManagingBodiesViewConfiguration.create());
30 configurationManager.registerConfiguration(CatalogInformationViewConfiguration.create());
31 configurationManager.registerConfiguration(new ProgramRequirementsViewConfiguration(false));
32 configurationManager.registerConfiguration(LearningObjectivesViewConfiguration.create());
33 for (Configuration configuration : configurationManager.getConfigurations()) {
34 if (configuration instanceof AbstractControllerConfiguration) {
35 ((AbstractControllerConfiguration) configuration).setController(controller);
36 }
37 rootSection.addSection((Section) configuration.getView());
38 }
39 }
40 }