use of lucee.runtime.config.ConfigServerImpl in project Lucee by lucee.
the class Admin method doListAuthKey.
private void doListAuthKey() throws PageException {
ConfigServerImpl cs = (ConfigServerImpl) config;
pageContext.setVariable(getString("admin", action, "returnVariable"), Caster.toArray(cs.getAuthenticationKeys()));
}
use of lucee.runtime.config.ConfigServerImpl in project Lucee by lucee.
the class Admin method doGetMonitors.
private void doGetMonitors() throws PageException {
if (!(config instanceof ConfigServerImpl))
throw new ApplicationException("invalid context for this action");
ConfigServerImpl cs = (ConfigServerImpl) config;
IntervallMonitor[] intervalls = cs.getIntervallMonitors();
RequestMonitor[] requests = cs.getRequestMonitors();
lucee.runtime.type.Query qry = new QueryImpl(new Collection.Key[] { KeyConstants._name, KeyConstants._type, LOG_ENABLED, CLASS }, 0, "monitors");
doGetMonitors(qry, intervalls);
doGetMonitors(qry, requests);
pageContext.setVariable(getString("admin", action, "returnVariable"), qry);
}
use of lucee.runtime.config.ConfigServerImpl in project Lucee by lucee.
the class Admin method doGetContexts.
/**
* @throws PageException
*/
private void doGetContexts() throws PageException {
CFMLFactory[] factories;
if (config instanceof ConfigServerImpl) {
ConfigServerImpl cs = (ConfigServerImpl) config;
factories = cs.getJSPFactories();
} else {
ConfigWebImpl cw = (ConfigWebImpl) config;
factories = new CFMLFactory[] { cw.getFactory() };
}
lucee.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().getIdentification().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());
}
}
use of lucee.runtime.config.ConfigServerImpl in project Lucee by lucee.
the class Admin method doGetMonitor.
private void doGetMonitor() throws PageException {
if (!(config instanceof ConfigServerImpl))
throw new ApplicationException("invalid context for this action");
ConfigServerImpl cs = (ConfigServerImpl) config;
String type = getString("admin", action, "monitorType");
String name = getString("admin", action, "name");
type = type.trim();
Monitor m;
if ("request".equalsIgnoreCase(type))
m = cs.getRequestMonitor(name);
else
m = cs.getIntervallMonitor(name);
Struct sct = new StructImpl();
sct.setEL(KeyConstants._name, m.getName());
sct.setEL(KeyConstants._type, m.getType() == Monitor.TYPE_INTERVAL ? "intervall" : "request");
sct.setEL(LOG_ENABLED, m.isLogEnabled());
sct.setEL(CLASS, m.getClazz().getName());
pageContext.setVariable(getString("admin", action, "returnVariable"), sct);
}
Aggregations