private boolean createMissingElementFor(Class configBeanType, ActionReport report) throws Exception { boolean defaultConfigCreated = false; if (ConfigExtension.class.isAssignableFrom(configBeanType)) { if (config.checkIfExtensionExists(configBeanType)) { report.appendMessage(localStrings.getLocalString("create.module.config.already.exists", "Configuration for {0} already exists. The command didn't change the existing configuration.", Dom.convertName(configBeanType.getSimpleName()))); report.appendMessage(LINE_SEPARATOR); return false; } config.getExtensionByType(configBeanType); report.appendMessage(localStrings.getLocalString("create.module.config.done", "Configuration for {0} added to domain.xml", Dom.convertName(configBeanType.getSimpleName()))); report.appendMessage(LINE_SEPARATOR); defaultConfigCreated = true; } else if (configBeanType.isAssignableFrom(DomainExtension.class)) { if (domain.checkIfExtensionExists(configBeanType)) { report.appendMessage(localStrings.getLocalString("create.module.config.already.exists", "Configuration for {0} already exists. The command didn't change the existing configuration.", Dom.convertName(configBeanType.getSimpleName()))); report.appendMessage(LINE_SEPARATOR); return false; } domain.getExtensionByType(configBeanType); report.appendMessage(localStrings.getLocalString("create.module.config.done", "Configuration for {0} added to domain.xml", Dom.convertName(configBeanType.getSimpleName()))); report.appendMessage(LINE_SEPARATOR); defaultConfigCreated = true; } return defaultConfigCreated; }
aggregateReporter.appendMessage("\nComputed Aggregate Data for " + i + " instances: " + instanceListStr + " in cluster " + targetName + " :\n"); boolean noData = true; HashMap<String, String> h = data.get(0); avg = (float) total / (float) data.size(); String descKey = s.substring(0, s.length() - 5) + "description"; aggregateReporter.appendMessage(targetName + "." + s + "-total = " + total + "\n"); aggregateReporter.appendMessage(targetName + "." + s + "-avg = " + avg + "\n"); aggregateReporter.appendMessage(targetName + "." + s + "-max = " + max + "\n"); aggregateReporter.appendMessage(targetName + "." + s + "-min = " + min + "\n"); aggregateReporter.appendMessage(targetName + "." + descKey + " = " + clusterInfo.get(descKey) + "\n"); String lastSampleTimeKey = s.substring(0, s.length() - 5) + "lastsampletime"; long sampletime = getLastSampleTime(clusterInfo, lastSampleTimeKey, data.size()); aggregateReporter.appendMessage(targetName + "." + lastSampleTimeKey + " = " + sampletime + "\n"); aggregateReporter.appendMessage("No aggregated cluster data to report\n");
report.appendMessage(colfm.toString());
ar.appendMessage(strings.getLocalString("attach.finished", "Command {0} executed with status {1}",attached.getName(),attached.getActionReport().getActionExitCode())); ar.appendMessage(strings.getLocalString("attach.finished", "Command {0} executed{1}",jobName,jobInfo.exitCode));
sb.append(LINE_SEPARATOR); report.appendMessage(sb.toString()); } catch (Exception e) { String msg = localStrings.getLocalString("get.active.config.getting.active.config.for.service.failed",
report.appendMessage(localStrings.getLocalString("create.module.config.creating.all", "Creating all default configuration elements that are not present in the domain.xml under target {0}.", target)); report.appendMessage(LINE_SEPARATOR); synchronized (configModularityUtils) { boolean oldv = configModularityUtils.isCommandInvocation();