private void doGetDatasources() throws PageException {
Map ds = config.getDataSourcesAsMap();
Iterator it = ds.keySet().iterator();
railo.runtime.type.Query qry=new QueryImpl(new String[]{"name","host","classname","dsn","DsnTranslated","database","port",
"timezone","username","password","readonly"
,"grant","drop","create","revoke","alter","select","delete","update","insert"
,"connectionLimit","connectionTimeout","clob","blob","validate","storage","customSettings"},ds.size(),"query");
int row=0;
while(it.hasNext()) {
Object key=it.next();
DataSource d=(DataSource) ds.get(key);
row++;
qry.setAt(KeyConstants._name,row,key);
qry.setAt(KeyConstants._host,row,d.getHost());
qry.setAt("classname",row,d.getClazz().getName());
//qry.setAt("driverversion",row,getDriverVersion(d.getClazz()));
qry.setAt("dsn",row,d.getDsnOriginal());
qry.setAt("database",row,d.getDatabase());
qry.setAt(KeyConstants._port,row,d.getPort()<1?"":Caster.toString(d.getPort()));
qry.setAt("dsnTranslated",row,d.getDsnTranslated());
qry.setAt("timezone",row,toStringTimeZone(d.getTimeZone()));
qry.setAt(KeyConstants._password,row,d.getPassword());
qry.setAt(KeyConstants._username,row,d.getUsername());
qry.setAt(KeyConstants._readonly,row,Caster.toBoolean(d.isReadOnly()));
qry.setAt(KeyConstants._select,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_SELECT)));
qry.setAt(KeyConstants._delete,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_DELETE)));
qry.setAt(KeyConstants._update,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_UPDATE)));
qry.setAt(KeyConstants._create,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_CREATE)));
qry.setAt(KeyConstants._insert,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_INSERT)));
qry.setAt(KeyConstants._drop,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_DROP)));
qry.setAt(KeyConstants._grant,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_GRANT)));
qry.setAt(KeyConstants._revoke,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_REVOKE)));
qry.setAt(KeyConstants._alter,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_ALTER)));
qry.setAt("connectionLimit",row,d.getConnectionLimit()<1?"":Caster.toString(d.getConnectionLimit()));
qry.setAt("connectionTimeout",row,d.getConnectionTimeout()<1?"":Caster.toString(d.getConnectionTimeout()));
qry.setAt("customSettings",row,d.getCustoms());
qry.setAt("blob",row,Boolean.valueOf(d.isBlob()));
qry.setAt("clob",row,Boolean.valueOf(d.isClob()));
qry.setAt("validate",row,Boolean.valueOf(d.validate()));
qry.setAt("storage",row,Boolean.valueOf(d.isStorage()));
}
pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
}