question.append("Do you want to add these " + transferData.getDestinations().size() + " destinations to " + hermes.getId() + " ?");
}
if (JOptionPane.showConfirmDialog(HermesBrowser.getBrowser(), question.toString(), "Please confirm.", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
for (Iterator iter = transferData.getDestinations().iterator(); iter.hasNext();) {
DestinationConfig dConfig = (DestinationConfig) iter.next();
if (dConfig.getDomain() == Domain.UNKNOWN.getId()) {
Object options[] = { "Queue", "Topic" };
int n = JOptionPane.showOptionDialog(HermesBrowser.getBrowser(), "The destination " + dConfig.getName()
+ " implements both Queue and Topic interfaces, please select the domain you wish to use it in.", "Select domain",
JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]);
if (n == JOptionPane.YES_OPTION) {
dConfig.setDomain(Domain.QUEUE.getId());
HermesBrowser.getBrowser().addDestinationConfig(hermes, dConfig);
} else if (n == JOptionPane.NO_OPTION) {
dConfig.setDomain(Domain.TOPIC.getId());
HermesBrowser.getBrowser().addDestinationConfig(hermes, dConfig);
} else {
// NOP
}
} else {