use of org.kie.server.controller.api.model.spec.ServerConfig in project kie-wb-common by kiegroup.
the class NewServerTemplateWizard method buildServerTemplate.
private ServerTemplate buildServerTemplate() {
final Collection<String> capabilities = new ArrayList<String>();
final Map<Capability, ServerConfig> capabilityConfig = new HashMap<Capability, ServerConfig>();
final Map<Capability, ContainerConfig> capabilityContainerConfig = new HashMap<Capability, ContainerConfig>();
final Collection<ContainerSpec> containersSpec = new ArrayList<ContainerSpec>();
if (newTemplatePresenter.isProcessCapabilityChecked()) {
capabilities.add(Capability.PROCESS.toString());
if (!newContainerFormPresenter.isEmpty()) {
capabilityContainerConfig.put(Capability.PROCESS, processConfigPagePresenter.buildProcessConfig());
}
}
capabilityContainerConfig.put(Capability.RULE, new RuleConfig(null, KieScannerStatus.STOPPED));
if (newTemplatePresenter.isRuleCapabilityChecked()) {
capabilities.add(Capability.RULE.toString());
}
if (newTemplatePresenter.isPlanningCapabilityChecked()) {
capabilities.add(Capability.PLANNING.toString());
}
if (!newContainerFormPresenter.isEmpty()) {
containersSpec.add(newContainerFormPresenter.buildContainerSpec(newTemplatePresenter.getTemplateName(), capabilityContainerConfig));
}
return new ServerTemplate(newTemplatePresenter.getTemplateName(), newTemplatePresenter.getTemplateName(), capabilities, capabilityConfig, containersSpec);
}
Aggregations