getWarningLabel().setVisible(visible);
}
private void updateEquivalentCommand(UserData userData)
{
HtmlProgressMessageFormatter formatter =
new HtmlProgressMessageFormatter();
StringBuilder sb = new StringBuilder();
String s = getEquivalentJavaPropertiesProcedure(userData, formatter);
if (s != null && s.length() > 0)
{
sb.append(s);
sb.append(formatter.getTaskSeparator());
}
sb.append(formatter.getFormattedProgress(
INFO_INSTALL_SETUP_EQUIVALENT_COMMAND_LINE.get()));
sb.append(formatter.getLineBreak());
sb.append("<b>"+Utils.getFormattedEquivalentCommandLine(
Utils.getSetupEquivalentCommandLine(userData), formatter)+
"</b>");
if (userData.getReplicationOptions().getType() ==
DataReplicationOptions.Type.IN_EXISTING_TOPOLOGY)
{
sb.append(formatter.getTaskSeparator());
ArrayList<ArrayList<String>> cmdLines =
Utils.getDsReplicationEnableEquivalentCommandLines(userData);
if (cmdLines.size() == 1)
{
sb.append(formatter.getFormattedProgress(
INFO_INSTALL_ENABLE_REPLICATION_EQUIVALENT_COMMAND_LINE.get()));
}
else if (cmdLines.size() > 1)
{
sb.append(formatter.getFormattedProgress(
INFO_INSTALL_ENABLE_REPLICATION_EQUIVALENT_COMMAND_LINES.get()));
}
for (ArrayList<String> cmdLine : cmdLines)
{
sb.append(formatter.getLineBreak());
sb.append("<b>"+
Utils.getFormattedEquivalentCommandLine(cmdLine, formatter)+
"</b>");
}
sb.append(formatter.getLineBreak());
sb.append(formatter.getLineBreak());
cmdLines =
Utils.getDsReplicationInitializeEquivalentCommandLines(userData);
if (cmdLines.size() == 1)
{
sb.append(formatter.getFormattedProgress(
INFO_INSTALL_INITIALIZE_REPLICATION_EQUIVALENT_COMMAND_LINE.get()));
}
else if (cmdLines.size() > 1)
{
sb.append(formatter.getFormattedProgress(
INFO_INSTALL_INITIALIZE_REPLICATION_EQUIVALENT_COMMAND_LINES.get()));
}
for (ArrayList<String> cmdLine : cmdLines)
{
sb.append(formatter.getLineBreak());
sb.append("<b>"+
Utils.getFormattedEquivalentCommandLine(cmdLine, formatter)+
"</b>");
}
}
else if (userData.getReplicationOptions().getType() ==
DataReplicationOptions.Type.FIRST_IN_TOPOLOGY)
{
sb.append(formatter.getTaskSeparator());
sb.append(formatter.getFormattedProgress(
INFO_INSTALL_ENABLE_REPLICATION_EQUIVALENT_COMMAND_LINES.get()));
ArrayList<ArrayList<String>> cmdLines =
Utils.getDsConfigReplicationEnableEquivalentCommandLines(userData);
for (ArrayList<String> cmdLine : cmdLines)
{
sb.append(formatter.getLineBreak());
sb.append("<b>"+
Utils.getFormattedEquivalentCommandLine(cmdLine, formatter)+
"</b>");
}
}
if (userData.getReplicationOptions().getType() !=
DataReplicationOptions.Type.STANDALONE &&
!userData.getStartServer())
{
sb.append(formatter.getTaskSeparator());
String cmd =
Utils.getPath(Installation.getLocal().getServerStopCommandFile());
sb.append(formatter.getFormattedProgress(
INFO_INSTALL_STOP_SERVER_EQUIVALENT_COMMAND_LINE.get()));
sb.append(formatter.getLineBreak());
sb.append("<b>"+formatter.getFormattedProgress(Message.raw(cmd))+"</b>");
}
equivalentCommandPane.setText(sb.toString());
}