@HandlerInput(name="Realms", type=String.class),
@HandlerInput(name="AddProps", type=Map.class),
@HandlerInput(name="RemoveProps", type=ArrayList.class)})
public static void saveSecuritySettings(HandlerContext handlerCtx) {
ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
SecurityServiceConfig sConfig = config.getSecurityServiceConfig();
ArrayList removeProps = (ArrayList)handlerCtx.getInputValue("RemoveProps");
Map addProps = (Map)handlerCtx.getInputValue("AddProps");
String[] remove = (String[])removeProps.toArray(new String[ removeProps.size()]);
for(int i=0; i<remove.length; i++){
sConfig.removeProperty(remove[i]);
}
if(addProps != null ){
Iterator additer = addProps.keySet().iterator();
while(additer.hasNext()){
Object key = additer.next();
String addvalue = (String)addProps.get(key);
sConfig.setPropertyValue((String)key, addvalue);
}
}
sConfig.setAuditEnabled(((Boolean)handlerCtx.getInputValue("Audit")).booleanValue());
sConfig.setDefaultPrincipal(((String)handlerCtx.getInputValue("Principal")));
sConfig.setDefaultPrincipalPassword(((String)handlerCtx.getInputValue("Password")));
sConfig.setActivateDefaultPrincipalToRoleMapping(((Boolean)handlerCtx.getInputValue("RoleMapping")).booleanValue());
sConfig.setMappedPrincipalClass(((String)handlerCtx.getInputValue("Mapped")));
sConfig.setJACC((String)handlerCtx.getInputValue("Jaccs"));
sConfig.setAuditModules((String)handlerCtx.getInputValue("Modules"));
sConfig.setDefaultRealm((String)handlerCtx.getInputValue("Realms"));
}