use of lucee.runtime.config.ConfigImpl in project Lucee by lucee.
the class Admin method _doStartTag.
/**
* @throws PageException
*/
private void _doStartTag() throws PageException, IOException {
config = (ConfigImpl) pageContext.getConfig();
// getToken
if (action.equals("gettoken")) {
doGetToken();
return;
}
// schedule
if (action.equals("schedule")) {
doTagSchedule();
return;
}
// search
if (action.equals("collection")) {
doTagCollection();
return;
}
// index
if (action.equals("index")) {
doTagIndex();
return;
}
// cluster
if (action.equals("setcluster")) {
doSetCluster();
return;
}
if (action.equals("getcluster")) {
doGetCluster();
return;
}
if (check("hashpassword", ACCESS_FREE)) {
String raw = getString("admin", action, "pw");
Password pw = PasswordImpl.passwordToCompare(pageContext.getConfig(), type != TYPE_WEB, raw);
Password changed = ((ConfigWebImpl) pageContext.getConfig()).updatePasswordIfNecessary(type == TYPE_SERVER, raw);
if (changed != null)
pw = changed;
pageContext.setVariable(getString("admin", action, "returnVariable"), pw.getPassword());
// do not remove
return;
}
try {
// Password
String strPW = getString("password", "");
// hash password if
Password tmp = type == TYPE_SERVER ? ((ConfigWebImpl) config).isServerPasswordEqual(strPW) : config.isPasswordEqual(strPW);
// compatibility)
if (tmp != null)
password = tmp;
else
password = null;
// Config
if (type == TYPE_SERVER)
config = (ConfigImpl) pageContext.getConfig().getConfigServer(password);
adminSync = config.getAdminSync();
admin = XMLConfigAdmin.newInstance(config, password);
} catch (Exception e) {
throw Caster.toPageException(e);
}
if (check("connect", ACCESS_FREE)) {
ConfigWebUtil.checkPassword(config, null, password);
ConfigWebUtil.checkGeneralReadAccess(config, password);
try {
if (config instanceof ConfigServer)
((PageContextImpl) pageContext).setServerPassword(password);
} catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
}
} else if (check("getinfo", ACCESS_FREE) && check2(ACCESS_READ))
doGetInfo();
else if (check("surveillance", ACCESS_FREE) && check2(ACCESS_READ))
doSurveillance();
else if (check("getRegional", ACCESS_FREE) && check2(ACCESS_READ))
doGetRegional();
else if (check("isMonitorEnabled", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
doIsMonitorEnabled();
else if (check("resetORMSetting", ACCESS_FREE) && check2(ACCESS_READ))
doResetORMSetting();
else if (check("getORMSetting", ACCESS_FREE) && check2(ACCESS_READ))
doGetORMSetting();
else if (check("getORMEngine", ACCESS_FREE) && check2(ACCESS_READ))
doGetORMEngine();
else if (check("updateORMSetting", ACCESS_FREE) && check2(ACCESS_READ))
doUpdateORMSetting();
else if (check("getApplicationListener", ACCESS_FREE) && check2(ACCESS_READ))
doGetApplicationListener();
else if (check("getProxy", ACCESS_FREE) && check2(ACCESS_READ))
doGetProxy();
else if (check("getCharset", ACCESS_FREE) && check2(ACCESS_READ))
doGetCharset();
else if (check("getComponent", ACCESS_FREE) && check2(ACCESS_READ))
doGetComponent();
else if (check("getScope", ACCESS_FREE) && check2(ACCESS_READ))
doGetScope();
else if (check("getApplicationSetting", ACCESS_FREE) && check2(ACCESS_READ))
doGetApplicationSetting();
else if (check("getQueueSetting", ACCESS_FREE) && check2(ACCESS_READ))
doGetQueueSetting();
else if (check("getOutputSetting", ACCESS_FREE) && check2(ACCESS_READ))
doGetOutputSetting();
else if (check("getDatasourceSetting", ACCESS_FREE) && check2(ACCESS_READ))
doGetDatasourceSetting();
else if (check("getCustomTagSetting", ACCESS_FREE) && check2(ACCESS_READ))
doGetCustomTagSetting();
else if (check("getDatasource", ACCESS_FREE) && check2(ACCESS_READ))
doGetDatasource();
else if (check("getDatasources", ACCESS_FREE) && check2(ACCESS_READ))
doGetDatasources();
else if (check("getJDBCDrivers", ACCESS_FREE) && check2(ACCESS_READ))
doGetJDBCDrivers();
else if (check("getCacheConnections", ACCESS_FREE) && check2(ACCESS_READ))
doGetCacheConnections();
else if (check("getCacheConnection", ACCESS_FREE) && check2(ACCESS_READ))
doGetCacheConnection();
else if (check("getCacheDefaultConnection", ACCESS_FREE) && check2(ACCESS_READ))
doGetCacheDefaultConnection();
else if (check("getRemoteClients", ACCESS_FREE) && check2(ACCESS_READ))
doGetRemoteClients();
else if (check("getRemoteClient", ACCESS_FREE) && check2(ACCESS_READ))
doGetRemoteClient();
else if (check("hasRemoteClientUsage", ACCESS_FREE) && check2(ACCESS_READ))
doHasRemoteClientUsage();
else if (check("getRemoteClientUsage", ACCESS_FREE) && check2(ACCESS_READ))
doGetRemoteClientUsage();
else if (check("getSpoolerTasks", ACCESS_FREE) && check2(ACCESS_READ))
doGetSpoolerTasks();
else if (check("getPerformanceSettings", ACCESS_FREE) && check2(ACCESS_READ))
doGetPerformanceSettings();
else if (check("getLogSettings", ACCESS_FREE) && check2(ACCESS_READ))
doGetLogSettings();
else if (check("getCompilerSettings", ACCESS_FREE) && check2(ACCESS_READ))
doGetCompilerSettings();
else if (check("updatePerformanceSettings", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdatePerformanceSettings();
else if (check("updateCompilerSettings", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateCompilerSettings();
else if (check("getGatewayentries", ACCESS_NOT_WHEN_SERVER) && check2(ACCESS_READ))
doGetGatewayEntries();
else if (check("getGatewayentry", ACCESS_NOT_WHEN_SERVER) && check2(ACCESS_READ))
doGetGatewayEntry();
else if (check("getRunningThreads", ACCESS_FREE) && check2(ACCESS_READ))
doGetRunningThreads();
else if (check("getMonitors", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
doGetMonitors();
else if (check("getMonitor", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
doGetMonitor();
else if (check("getBundles", ACCESS_FREE) && check2(ACCESS_READ))
doGetBundles();
else if (check("getBundle", ACCESS_FREE) && check2(ACCESS_READ))
doGetBundle();
else if (check("getExecutionLog", ACCESS_FREE) && check2(ACCESS_READ))
doGetExecutionLog();
else if (check("gateway", ACCESS_NOT_WHEN_SERVER) && check2(ACCESS_READ))
doGateway();
else // alias for getSpoolerTasks
if (check("getRemoteClientTasks", ACCESS_FREE) && check2(ACCESS_READ))
doGetSpoolerTasks();
else if (check("getDatasourceDriverList", ACCESS_FREE) && check2(ACCESS_READ))
doGetDatasourceDriverList();
else if (check("getDebuggingList", ACCESS_FREE) && check2(ACCESS_READ))
doGetDebuggingList();
else if (check("getLoggedDebugData", ACCESS_FREE) && check2(ACCESS_READ))
doGetLoggedDebugData();
else if (check("getDebugSetting", ACCESS_FREE) && check2(ACCESS_READ))
doGetDebugSetting();
else if (check("getSSLCertificate", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
doGetSSLCertificate();
else if (check("getPluginDirectory", ACCESS_FREE) && check2(ACCESS_READ))
doGetPluginDirectory();
else if (check("getPlugins", ACCESS_FREE) && check2(ACCESS_READ))
doGetPlugins();
else if (check("updatePlugin", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdatePlugin();
else if (check("removePlugin", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemovePlugin();
else if (check("getContextDirectory", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
getContextDirectory();
else if (check("updateContext", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doUpdateContext();
else if (check("removeContext", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doRemoveContext();
else if (check("getJars", ACCESS_FREE) && check2(ACCESS_READ))
doGetJars();
else if (check("getFlds", ACCESS_FREE) && check2(ACCESS_READ))
doGetFLDs();
else if (check("getTlds", ACCESS_FREE) && check2(ACCESS_READ))
doGetTLDs();
else if (check("getRHExtensions", ACCESS_FREE) && check2(ACCESS_READ))
doGetRHExtensions();
else if (check("getRHServerExtensions", ACCESS_NOT_WHEN_SERVER) && check2(ACCESS_READ))
doGetRHServerExtensions();
else if (check("getLocalExtension", ACCESS_FREE) && check2(ACCESS_READ))
doGetLocalExtension();
else if (check("getLocalExtensions", ACCESS_FREE) && check2(ACCESS_READ))
doGetLocalExtensions();
else if (check("getMailSetting", ACCESS_FREE) && check2(ACCESS_READ))
doGetMailSetting();
else if (check("getTaskSetting", ACCESS_FREE) && check2(ACCESS_READ))
doGetTaskSetting();
else if (check("getMailServers", ACCESS_FREE) && check2(ACCESS_READ))
doGetMailServers();
else if (check("getMapping", ACCESS_FREE) && check2(ACCESS_READ))
doGetMapping();
else if (check("getMappings", ACCESS_FREE) && check2(ACCESS_READ))
doGetMappings();
else if (check("getRestMappings", ACCESS_FREE) && check2(ACCESS_READ))
doGetRestMappings();
else if (check("getRestSettings", ACCESS_FREE) && check2(ACCESS_READ))
doGetRestSettings();
else if (check("getExtensions", ACCESS_FREE) && check2(ACCESS_READ))
doGetExtensions();
else if (check("getExtensionProviders", ACCESS_FREE) && check2(ACCESS_READ))
doGetExtensionProviders();
else if (check("getRHExtensionProviders", ACCESS_FREE) && check2(ACCESS_READ))
doGetRHExtensionProviders();
else if (check("getExtensionInfo", ACCESS_FREE) && check2(ACCESS_READ))
doGetExtensionInfo();
else if (check("getCustomTagMappings", ACCESS_FREE) && check2(ACCESS_READ))
doGetCustomTagMappings();
else if (check("getComponentMappings", ACCESS_FREE) && check2(ACCESS_READ))
doGetComponentMappings();
else if (check("getCfxTags", ACCESS_FREE) && check2(ACCESS_READ))
doGetCFXTags();
else if (check("getCPPCfxTags", ACCESS_FREE) && check2(ACCESS_READ))
doGetCPPCFXTags();
else if (check("getJavaCfxTags", ACCESS_FREE) && check2(ACCESS_READ))
doGetJavaCFXTags();
else if (check("getDebug", ACCESS_FREE) && check2(ACCESS_READ))
doGetDebug();
else if (check("getDebugEntry", ACCESS_FREE) && check2(ACCESS_READ))
doGetDebugEntry();
else if (check("getError", ACCESS_FREE) && check2(ACCESS_READ))
doGetError();
else if (check("verifyremoteclient", ACCESS_FREE) && check2(ACCESS_READ))
doVerifyRemoteClient();
else if (check("verifyDatasource", ACCESS_FREE) && check2(ACCESS_READ))
doVerifyDatasource();
else if (check("verifyCacheConnection", ACCESS_FREE) && check2(ACCESS_READ))
doVerifyCacheConnection();
else if (check("verifyMailServer", ACCESS_FREE) && check2(ACCESS_READ))
doVerifyMailServer();
else if (check("verifyExtensionProvider", ACCESS_FREE) && check2(ACCESS_READ))
doVerifyExtensionProvider();
else if (check("verifyJavaCFX", ACCESS_FREE) && check2(ACCESS_READ))
doVerifyJavaCFX();
else if (check("verifyCFX", ACCESS_FREE) && check2(ACCESS_READ))
doVerifyCFX();
else if (check("resetId", ACCESS_FREE) && check2(ACCESS_WRITE))
doResetId();
else if (check("updateLoginSettings", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doUpdateLoginSettings();
else if (check("updateLogSettings", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateLogSettings();
else if (check("updateJar", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateJar();
else if (check("updateSSLCertificate", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doUpdateSSLCertificate();
else if (check("updateMonitorEnabled", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doUpdateMonitorEnabled();
else if (check("updateTLD", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateTLD();
else if (check("updateFLD", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateFLD();
else if (check("updateregional", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateRegional();
else if (check("updateApplicationListener", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateApplicationListener();
else if (check("updateCachedWithin", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateCachedWithin();
else if (check("updateproxy", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateProxy();
else if (check("updateCharset", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateCharset();
else if (check("updatecomponent", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateComponent();
else if (check("updatescope", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateScope();
else if (check("updateRestSettings", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateRestSettings();
else if (check("updateRestMapping", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateRestMapping();
else if (check("removeRestMapping", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveRestMapping();
else if (check("updateApplicationSetting", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateApplicationSettings();
else if (check("updateOutputSetting", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateOutputSettings();
else if (check("updateQueueSetting", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doUpdateQueueSettings();
else if (check("updatepsq", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdatePSQ();
else if (check("updatedatasource", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateDatasource();
else if (check("updateJDBCDriver", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateJDBCDriver();
else if (check("updateCacheDefaultConnection", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateCacheDefaultConnection();
else if (check("updateCacheConnection", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateCacheConnection();
else if (check("updateremoteclient", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateRemoteClient();
else if (check("updateRemoteClientUsage", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateRemoteClientUsage();
else if (check("updatemailsetting", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateMailSetting();
else if (check("updatemailserver", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateMailServer();
else if (check("updatetasksetting", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateTaskSetting();
else if (check("updatemapping", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateMapping();
else if (check("updatecustomtag", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateCustomTag();
else if (check("updateComponentMapping", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateComponentMapping();
else if (check("stopThread", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doStopThread();
else if (check("updatejavacfx", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateJavaCFX();
else if (check("updatecppcfx", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateCPPCFX();
else if (check("updatedebug", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateDebug();
else if (check("updatedebugentry", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateDebugEntry();
else if (check("updatedebugsetting", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateDebugSetting();
else if (check("updateerror", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateError();
else if (check("updateCustomTagSetting", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateCustomTagSetting();
else if (check("updateExtension", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateExtension();
else if (check("updateRHExtension", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateRHExtension();
else if (check("removeRHExtension", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveRHExtension();
else if (check("updateExtensionProvider", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateExtensionProvider();
else if (check("updateRHExtensionProvider", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateRHExtensionProvider();
else if (check("updateExtensionInfo", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateExtensionInfo();
else if (check("updateGatewayEntry", ACCESS_NOT_WHEN_SERVER) && check2(ACCESS_WRITE))
doUpdateGatewayEntry();
else // else if(check("updateLogSettings", ACCESS_FREE) && check2(ACCESS_WRITE )) doUpdateUpdateLogSettings();
if (check("updateMonitor", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doUpdateMonitor();
else if (check("updateCacheHandler", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doUpdateCacheHandler();
else if (check("updateORMEngine", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateORMEngine();
else if (check("updateExecutionLog", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateExecutionLog();
else // else if(check("removeproxy", ACCESS_NOT_WHEN_SERVER )) doRemoveProxy();
if (check("removeMonitor", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doRemoveMonitor();
else if (check("removeCacheHandler", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doRemoveCacheHandler();
else if (check("removeORMEngine", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveORMEngine();
else if (check("removebundle", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveBundle();
else if (check("removeTLD", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveTLD();
else if (check("removeFLD", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveFLD();
else if (check("removeJDBCDriver", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveJDBCDriver();
else if (check("removedatasource", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveDatasource();
else if (check("removeCacheConnection", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveCacheConnection();
else if (check("removeremoteclient", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveRemoteClient();
else if (check("removeRemoteClientUsage", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveRemoteClientUsage();
else if (check("removeSpoolerTask", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveSpoolerTask();
else if (check("removeAllSpoolerTask", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveAllSpoolerTask();
else // alias for executeSpoolerTask
if (check("removeRemoteClientTask", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveSpoolerTask();
else if (check("executeSpoolerTask", ACCESS_FREE) && check2(ACCESS_WRITE))
doExecuteSpoolerTask();
else // alias for executeSpoolerTask
if (check("executeRemoteClientTask", ACCESS_FREE) && check2(ACCESS_WRITE))
doExecuteSpoolerTask();
else if (check("removemailserver", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveMailServer();
else if (check("removemapping", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveMapping();
else if (check("removecustomtag", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveCustomTag();
else if (check("removecomponentmapping", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveComponentMapping();
else if (check("removecfx", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveCFX();
else if (check("removeExtension", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveExtension();
else if (check("removeExtensionProvider", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveExtensionProvider();
else if (check("removeRHExtensionProvider", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveRHExtensionProvider();
else if (check("removeDefaultPassword", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveDefaultPassword();
else if (check("removeGatewayEntry", ACCESS_NOT_WHEN_SERVER) && check2(ACCESS_WRITE))
doRemoveGatewayEntry();
else if (check("removeDebugEntry", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveDebugEntry();
else if (check("removeCacheDefaultConnection", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveCacheDefaultConnection();
else if (check("removeLogSetting", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveLogSetting();
else if (check("storageGet", ACCESS_FREE) && check2(ACCESS_READ))
doStorageGet();
else if (check("storageSet", ACCESS_FREE) && check2(ACCESS_WRITE))
doStorageSet();
else if (check("getdefaultpassword", ACCESS_FREE) && check2(ACCESS_READ))
doGetDefaultPassword();
else if (check("getContexts", ACCESS_FREE) && check2(ACCESS_READ))
doGetContexts();
else if (check("getContextes", ACCESS_FREE) && check2(ACCESS_READ))
doGetContexts();
else if (check("updatedefaultpassword", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateDefaultPassword();
else if (check("hasindividualsecurity", ACCESS_FREE) && check2(ACCESS_READ))
doHasIndividualSecurity();
else if (check("resetpassword", ACCESS_FREE) && check2(ACCESS_WRITE))
doResetPassword();
else if (check("stopThread", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doStopThread();
else if (check("updateAuthKey", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doUpdateAuthKey();
else if (check("removeAuthKey", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doRemoveAuthKey();
else if (check("listAuthKey", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doListAuthKey();
else if (check("updateAPIKey", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateAPIKey();
else if (check("removeAPIKey", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveAPIKey();
else if (check("getAPIKey", ACCESS_FREE) && check2(ACCESS_READ))
doGetAPIKey();
else if (check("createsecuritymanager", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doCreateSecurityManager();
else if (check("getsecuritymanager", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
doGetSecurityManager();
else if (check("removesecuritymanager", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doRemoveSecurityManager();
else if (check("getdefaultsecuritymanager", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
doGetDefaultSecurityManager();
else if (check("updatesecuritymanager", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doUpdateSecurityManager();
else if (check("updatedefaultsecuritymanager", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doUpdateDefaultSecurityManager();
else if (check("compileMapping", ACCESS_FREE) && check2(ACCESS_WRITE))
doCompileMapping();
else if (check("compileComponentMapping", ACCESS_FREE) && check2(ACCESS_WRITE))
doCompileComponentMapping();
else if (check("compileCTMapping", ACCESS_FREE) && check2(ACCESS_WRITE))
doCompileCTMapping();
else if (check("createArchive", ACCESS_FREE) && check2(ACCESS_WRITE))
doCreateArchive(MAPPING_REGULAR);
else if (check("createComponentArchive", ACCESS_FREE) && check2(ACCESS_WRITE))
doCreateArchive(MAPPING_CFC);
else if (check("createCTArchive", ACCESS_FREE) && check2(ACCESS_WRITE))
doCreateArchive(MAPPING_CT);
else if (check("reload", ACCESS_FREE) && check2(ACCESS_WRITE))
doReload();
else if (check("getResourceProviders", ACCESS_FREE) && check2(ACCESS_READ))
doGetResourceProviders();
else if (check("updateResourceProvider", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateResourceProvider();
else if (check("updateDefaultResourceProvider", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateDefaultResourceProvider();
else if (check("removeResourceProvider", ACCESS_FREE) && check2(ACCESS_WRITE))
doRemoveResourceProvider();
else if (check("getClusterClass", ACCESS_FREE) && check2(ACCESS_READ))
doGetClusterClass();
else if (check("updateClusterClass", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateClusterClass();
else if (check("getAdminSyncClass", ACCESS_FREE) && check2(ACCESS_READ))
doGetAdminSyncClass();
else if (check("updateAdminSyncClass", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateAdminSyncClass();
else if (check("getVideoExecuterClass", ACCESS_FREE) && check2(ACCESS_READ))
doGetVideoExecuterClass();
else if (check("updateVideoExecuterClass", ACCESS_FREE) && check2(ACCESS_WRITE))
doUpdateVideoExecuterClass();
else if (check("terminateRunningThread", ACCESS_FREE) && check2(ACCESS_WRITE))
doTerminateRunningThread();
else if (check("updateLabel", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doUpdateLabel();
else if (check("restart", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doRestart();
else if (check("runUpdate", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doRunUpdate();
else if (check("removeUpdate", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doRemoveUpdate();
else if (check("changeVersionTo", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doChangeVersionTo();
else if (check("getUpdate", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doGetUpdate();
else if (check("getMinVersion", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
getMinVersion();
else if (check("listPatches", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
listPatches();
else if (check("updateupdate", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doUpdateUpdate();
else if (check("getSerial", ACCESS_FREE) && check2(ACCESS_READ))
doGetSerial();
else if (check("updateSerial", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doUpdateSerial();
else if (check("heapDump", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
doHeapDump();
else if (check("securitymanager", ACCESS_FREE) && check2(ACCESS_READ))
doSecurityManager();
else
throw new ApplicationException("invalid action [" + action + "] for tag admin");
}
use of lucee.runtime.config.ConfigImpl in project Lucee by lucee.
the class Admin method doGetLoginSettings.
private void doGetLoginSettings() throws ApplicationException, PageException {
Struct sct = new StructImpl();
ConfigImpl c = (ConfigImpl) ThreadLocalPageContext.getConfig(config);
pageContext.setVariable(getString("admin", action, "returnVariable"), sct);
sct.set("captcha", Caster.toBoolean(c.getLoginCaptcha()));
sct.set("delay", Caster.toDouble(c.getLoginDelay()));
sct.set("rememberme", Caster.toBoolean(c.getRememberMe()));
}
use of lucee.runtime.config.ConfigImpl in project Lucee by lucee.
the class RHExtension method readManifestConfig.
private void readManifestConfig(Element el, String label, String _img) throws ApplicationException {
boolean isWeb = config instanceof ConfigWeb;
type = isWeb ? "web" : "server";
Log logger = ((ConfigImpl) config).getLog("deploy");
Info info = ConfigWebUtil.getEngine(config).getInfo();
readName(label, el.getAttribute("name"));
label = name;
readVersion(label, el.getAttribute("version"));
label += " : " + version;
readId(label, el.getAttribute("id"));
readReleaseType(label, el.getAttribute("release-type"), isWeb);
description = el.getAttribute("description");
trial = Caster.toBooleanValue(el.getAttribute("trial"), false);
if (_img == null)
_img = el.getAttribute("image");
image = _img;
String cat = el.getAttribute("category");
if (StringUtil.isEmpty(cat, true))
cat = el.getAttribute("categories");
readCategories(label, cat);
readCoreVersion(label, el.getAttribute("lucee-core-version"), info);
readLoaderVersion(label, el.getAttribute("lucee-loader-version"));
startBundles = Caster.toBooleanValue(el.getAttribute("start-bundles"), true);
readAMF(label, el.getAttribute("amf"), logger);
readResource(label, el.getAttribute("resource"), logger);
readSearch(label, el.getAttribute("search"), logger);
readORM(label, el.getAttribute("orm"), logger);
readMonitor(label, el.getAttribute("monitor"), logger);
readCache(label, el.getAttribute("cache"), logger);
readCacheHandler(label, el.getAttribute("cache-handler"), logger);
readJDBC(label, el.getAttribute("jdbc"), logger);
readMapping(label, el.getAttribute("mapping"), logger);
readEventGatewayInstances(label, el.getAttribute("event-gateway-instance"), logger);
}
use of lucee.runtime.config.ConfigImpl in project Lucee by lucee.
the class CacheGetDefaultCacheName method call.
public static String call(PageContext pc, String strType) throws PageException {
int type = CacheUtil.toType(strType, Config.CACHE_TYPE_NONE);
if (type == Config.CACHE_TYPE_NONE)
throw new FunctionException(pc, "CacheGetDefaultCacheName", 1, "type", "invalid type defintion [" + strType + "], valid types are [object,resource,template,query]");
ConfigImpl config = (ConfigImpl) pc.getConfig();
CacheConnection conn = config.getCacheDefaultConnection(type);
if (conn == null)
throw new ExpressionException("there is no default cache defined for type [" + strType + "]");
return conn.getName();
}
use of lucee.runtime.config.ConfigImpl in project Lucee by lucee.
the class DataSourceSupport method _initializeCD.
private static ClassDefinition _initializeCD(JDBCDriver jdbc, ClassDefinition cd, Config config) {
// try to link the class defintion with a jdbc driver defintion
if (!cd.isBundle()) {
if ("com.microsoft.jdbc.sqlserver.SQLServerDriver".equals(cd.getClassName())) {
cd = new ClassDefinitionImpl("com.microsoft.sqlserver.jdbc.SQLServerDriver", cd.getName(), cd.getVersionAsString(), null);
}
ConfigImpl ci = ((ConfigImpl) ThreadLocalPageContext.getConfig(config));
JDBCDriver tmp = jdbc != null ? ci.getJDBCDriverById(jdbc.cd.getId(), null) : null;
if (tmp == null)
tmp = ((ConfigImpl) config).getJDBCDriverByClassName(cd.getClassName(), null);
// we have a matching jdbc driver found
if (tmp != null) {
cd = tmp.cd;
}
}
return cd;
}
Aggregations