dcp.getProperty("::pentaho-reporting::port"),
p);
}
else if (currentJNDISource instanceof JndiConnectionProvider)
{
final JndiConnectionProvider jcp = (JndiConnectionProvider) currentJNDISource;
final ListModel model = dialogModel.getConnections();
for (int i = 0; i < model.getSize(); i++)
{
final JdbcConnectionDefinition definition = (JdbcConnectionDefinition) model.getElementAt(i);
if (definition instanceof JndiConnectionDefinition == false)
{
continue;
}
final JndiConnectionDefinition dcd = (JndiConnectionDefinition) definition;
if (ObjectUtilities.equal(dcd.getJndiName(), jcp.getConnectionPath()))
{
return dcd;
}
}
return new JndiConnectionDefinition(getBundleSupport().getString("JdbcConnectionPanel.CustomConnection"),
jcp.getConnectionPath(), null, jcp.getUsername(), jcp.getPassword());
}
return null;
}