001 package org.kuali.student.lum.program.client.credential.edit; 002 003 import org.kuali.student.common.ui.client.configurable.mvc.sections.Section; 004 import org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView; 005 import org.kuali.student.lum.common.client.configuration.AbstractControllerConfiguration; 006 import org.kuali.student.lum.common.client.configuration.Configuration; 007 import org.kuali.student.lum.common.client.configuration.ConfigurationManager; 008 import org.kuali.student.lum.program.client.ProgramConstants; 009 import org.kuali.student.lum.program.client.ProgramSections; 010 import org.kuali.student.lum.program.client.credential.CredentialManager; 011 import org.kuali.student.lum.program.client.credential.view.*; 012 import org.kuali.student.lum.program.client.properties.ProgramProperties; 013 import org.kuali.student.lum.program.client.widgets.SummaryActionPanel; 014 015 /** 016 * @author Igor 017 */ 018 public class CredentialSummaryConfiguration extends AbstractControllerConfiguration { 019 020 public CredentialSummaryConfiguration() { 021 rootSection = new VerticalSectionView(ProgramSections.SUMMARY, ProgramProperties.get().program_menu_sections_summary(), ProgramConstants.PROGRAM_MODEL_ID, true); 022 } 023 024 @Override 025 protected void buildLayout() { 026 ConfigurationManager configurationManager = new ConfigurationManager(configurer); 027 CredentialInformationViewConfiguration credentialInfoViewConfig = CredentialInformationViewConfiguration.createSpecial(); 028 configurationManager.registerConfiguration(credentialInfoViewConfig); 029 configurationManager.registerConfiguration(CredentialManagingBodiesViewConfiguration.createSpecial()); 030 configurationManager.registerConfiguration(CredentialCatalogDetailsViewConfiguration.createSpecial()); 031 configurationManager.registerConfiguration(new CredentialRequirementsViewConfiguration(true)); 032 configurationManager.registerConfiguration(CredentialLearningObjectivesViewConfiguration.createSpecial()); 033 configurationManager.registerConfiguration(CredentialDocsViewConfiguration.createSpecial()); 034 035 rootSection.addWidget(new SummaryActionPanel(credentialInfoViewConfig.createActivateProgramSection(), CredentialManager.getEventBus())); 036 for (Configuration configuration : configurationManager.getConfigurations()) { 037 if (configuration instanceof AbstractControllerConfiguration) { 038 ((AbstractControllerConfiguration) configuration).setController(controller); 039 } 040 rootSection.addSection((Section) configuration.getView()); 041 } 042 rootSection.addWidget(new SummaryActionPanel(credentialInfoViewConfig.createActivateProgramSection(), CredentialManager.getEventBus())); 043 } 044 }