if(config instanceof ConfigServerImpl) {
ConfigServerImpl cs=(ConfigServerImpl) config;
factories = cs.getJSPFactories();
}
else {
ConfigWebImpl cw=(ConfigWebImpl) config;
factories = new CFMLFactory[]{cw.getFactory()};
}
railo.runtime.type.Query qry=
new QueryImpl(
new Collection.Key[]{
KeyConstants._path,
KeyConstants._id,KeyConstants._hash,
KeyConstants._label,
HAS_OWN_SEC_CONTEXT,
KeyConstants._url,
CONFIG_FILE,
CLIENT_SIZE,CLIENT_ELEMENTS,SESSION_SIZE,SESSION_ELEMENTS},
factories.length,getString("admin",action,"returnVariable"));
pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
ConfigWebImpl cw;
for(int i=0;i<factories.length;i++) {
int row=i+1;
CFMLFactoryImpl factory = (CFMLFactoryImpl) factories[i];
cw = (ConfigWebImpl) factory.getConfig();
qry.setAtEL(KeyConstants._path,row,ReqRspUtil.getRootPath(factory.getConfigWebImpl().getServletContext()));
qry.setAtEL(CONFIG_FILE,row,factory.getConfigWebImpl().getConfigFile().getAbsolutePath());
if(factory.getURL()!=null)qry.setAtEL(KeyConstants._url,row,factory.getURL().toExternalForm());
qry.setAtEL(KeyConstants._id,row,factory.getConfig().getId());
qry.setAtEL(KeyConstants._hash,row,SystemUtil.hash(factory.getConfigWebImpl().getServletContext()));
qry.setAtEL(KeyConstants._label,row,factory.getLabel());
qry.setAtEL(HAS_OWN_SEC_CONTEXT,row,Caster.toBoolean(cw.hasIndividualSecurityManager()));
setScopeDirInfo(qry,row,CLIENT_SIZE,CLIENT_ELEMENTS,cw.getClientScopeDir());
setScopeDirInfo(qry,row,SESSION_SIZE,SESSION_ELEMENTS,cw.getSessionScopeDir());
}
}