@HandlerInput(name="accessLoggingFlag", type=String.class),
@HandlerInput(name="sso", type=Boolean.class)})
public static void saveVirtualServerSettings(HandlerContext handlerCtx) {
ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
Map newProps = (Map)handlerCtx.getInputValue("newProps");
try{
Boolean edit = (Boolean) handlerCtx.getInputValue("Edit");
if(!edit){
Map convertedMap = AMXUtil.convertToPropertiesOptionMap(newProps, null);
putOptionalValue((String) handlerCtx.getInputValue("accesslog"), convertedMap, "accesslog");
putOptionalValue((String) handlerCtx.getInputValue("docroot"), convertedMap, "docroot");
putOptionalValue((String) handlerCtx.getInputValue("accessLogBufferSize"), convertedMap, "accessLogBufferSize");
putOptionalValue((String) handlerCtx.getInputValue("accessLogWriteInterval"), convertedMap, "accessLogWriteInterval");
putOptionalValue(""+ handlerCtx.getInputValue("sso"), convertedMap, "sso-enabled");
String accessLoggingFlag = (String)handlerCtx.getInputValue("accessLoggingFlag");
if (!accessLoggingFlag.equals("off")){
putOptionalValue(accessLoggingFlag, convertedMap, "accessLoggingEnabled");
}
VirtualServerConfig server = config.getHTTPServiceConfig().createVirtualServerConfig(
(String)handlerCtx.getInputValue("Name"), ((String)handlerCtx.getInputValue("Hosts")), convertedMap);
server.setHosts(((String)handlerCtx.getInputValue("Hosts")));
server.setHTTPListeners(((String)handlerCtx.getInputValue("Http")));
server.setDefaultWebModule(((String)handlerCtx.getInputValue("Web")));
server.setLogFile(((String)handlerCtx.getInputValue("LogFile")));
//server.setState(((String)handlerCtx.getInputValue("StateOption")));
String tmp = (String)handlerCtx.getInputValue("StateOption");
server.setState(tmp);
return;
}
Map<String,VirtualServerConfig>vservers = config.getHTTPServiceConfig().getVirtualServerConfigMap();
VirtualServerConfig vs = (VirtualServerConfig)vservers.get((String)handlerCtx.getInputValue("Name"));
AMXUtil.updateProperties(vs, newProps, vsSkipPropsList);
vs.setHosts(((String)handlerCtx.getInputValue("Hosts")));
vs.setState(((String)handlerCtx.getInputValue("StateOption")));