use of lucee.runtime.type.QueryImpl in project Lucee by lucee.
the class Admin method doGetRestMappings.
private void doGetRestMappings() throws PageException {
lucee.runtime.rest.Mapping[] mappings = config.getRestMappings();
lucee.runtime.type.Query qry = new QueryImpl(new String[] { "physical", "strphysical", "virtual", "hidden", "readonly", "default" }, mappings.length, "query");
lucee.runtime.rest.Mapping m;
for (int i = 0; i < mappings.length; i++) {
m = mappings[i];
int row = i + 1;
qry.setAt("physical", row, m.getPhysical());
qry.setAt("strphysical", row, m.getStrPhysical());
qry.setAt("virtual", row, m.getVirtual());
qry.setAt("hidden", row, Caster.toBoolean(m.isHidden()));
qry.setAt("readonly", row, Caster.toBoolean(m.isReadonly()));
qry.setAt("default", row, Caster.toBoolean(m.isDefault()));
}
pageContext.setVariable(getString("admin", action, "returnVariable"), qry);
}
use of lucee.runtime.type.QueryImpl in project Lucee by lucee.
the class Admin method doGetPlugins.
private void doGetPlugins() throws PageException {
Resource dir = config.getPluginDirectory();
String[] list = dir.list(new XMLConfigAdmin.PluginFilter());
lucee.runtime.type.Query qry = new QueryImpl(new Collection.Key[] { KeyConstants._name }, list.length, getString("admin", action, "returnVariable"));
pageContext.setVariable(getString("admin", action, "returnVariable"), qry);
for (int i = 0; i < list.length; i++) {
int row = i + 1;
qry.setAtEL(KeyConstants._name, row, list[i]);
}
}
use of lucee.runtime.type.QueryImpl in project Lucee by lucee.
the class Admin method doGetJDBCDrivers.
private void doGetJDBCDrivers() throws PageException {
JDBCDriver[] drivers = config.getJDBCDrivers();
lucee.runtime.type.Query qry = new QueryImpl(new Key[] { KeyConstants._label, KeyConstants._class, KeyConstants._bundleName, KeyConstants._bundleVersion }, drivers.length, "jdbc");
JDBCDriver driver;
for (int row = 0; row < drivers.length; row++) {
driver = drivers[row];
qry.setAt(KeyConstants._label, row, driver.label);
qry.setAt(KeyConstants._class, row, driver.cd.getClassName());
qry.setAt(KeyConstants._bundleName, row, driver.cd.getName());
qry.setAt(KeyConstants._bundleVersion, row, driver.cd.getVersion().toString());
}
pageContext.setVariable(getString("admin", action, "returnVariable"), qry);
}
use of lucee.runtime.type.QueryImpl in project Lucee by lucee.
the class Admin method doGetCFXTags.
/**
* @throws PageException
*/
private void doGetCFXTags() throws PageException {
Map map = config.getCFXTagPool().getClasses();
lucee.runtime.type.Query qry = new QueryImpl(new String[] { "displayname", "sourcename", "readonly", "isvalid", "name", "procedure_class", "procedure_bundleName", "procedure_bundleVersion", "keep_alive" }, map.size(), "query");
Iterator it = map.keySet().iterator();
int row = 0;
while (it.hasNext()) {
row++;
CFXTagClass tag = (CFXTagClass) map.get(it.next());
qry.setAt("displayname", row, tag.getDisplayType());
qry.setAt("sourcename", row, tag.getSourceName());
qry.setAt("readonly", row, Caster.toBoolean(tag.isReadOnly()));
qry.setAt("isvalid", row, Caster.toBoolean(tag.isValid()));
if (tag instanceof CPPCFXTagClass) {
CPPCFXTagClass ctag = (CPPCFXTagClass) tag;
qry.setAt(KeyConstants._name, row, ctag.getName());
qry.setAt("procedure_class", row, ctag.getProcedure());
qry.setAt("keepalive", row, Caster.toBoolean(ctag.getKeepAlive()));
} else if (tag instanceof JavaCFXTagClass) {
JavaCFXTagClass jtag = (JavaCFXTagClass) tag;
qry.setAt(KeyConstants._name, row, jtag.getName());
qry.setAt("procedure_class", row, jtag.getClassDefinition().getClassName());
qry.setAt("procedure_bundleName", row, jtag.getClassDefinition().getName());
qry.setAt("procedure_bundleVersion", row, jtag.getClassDefinition().getVersionAsString());
}
}
pageContext.setVariable(getString("admin", action, "returnVariable"), qry);
}
use of lucee.runtime.type.QueryImpl in project Lucee by lucee.
the class Admin method doGetMappings.
private void doGetMappings() throws PageException {
Mapping[] mappings = config.getMappings();
lucee.runtime.type.Query qry = new QueryImpl(new String[] { "archive", "strarchive", "physical", "strphysical", "virtual", "hidden", "physicalFirst", "readonly", "inspect", "toplevel" }, mappings.length, "query");
for (int i = 0; i < mappings.length; i++) {
MappingImpl m = (MappingImpl) mappings[i];
int row = i + 1;
qry.setAt("archive", row, m.getArchive());
qry.setAt("strarchive", row, m.getStrArchive());
qry.setAt("physical", row, m.getPhysical());
qry.setAt("strphysical", row, m.getStrPhysical());
qry.setAt("virtual", row, m.getVirtual());
qry.setAt("hidden", row, Caster.toBoolean(m.isHidden()));
qry.setAt("physicalFirst", row, Caster.toBoolean(m.isPhysicalFirst()));
qry.setAt("readonly", row, Caster.toBoolean(m.isReadonly()));
qry.setAt("inspect", row, ConfigWebUtil.inspectTemplate(m.getInspectTemplateRaw(), ""));
qry.setAt("toplevel", row, Caster.toBoolean(m.isTopLevel()));
}
pageContext.setVariable(getString("admin", action, "returnVariable"), qry);
}
Aggregations