if (pool == null){
GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.NoSuchConnectorConnectionPool"));
return;
}
String securityMapName = (String) handlerCtx.getInputValue("securityMapName");
SecurityMapConfig securityMap = pool.getSecurityMapConfigMap().get(securityMapName);
String[] groups = securityMap.getUserGroupNames();
if (groups != null && groups.length >0){
String userGroups = groups[0];
for(int i=1; i<groups.length; i++){
userGroups=userGroups.concat("," + groups[i]);
}
handlerCtx.setOutputValue("userGroups", userGroups);
handlerCtx.setOutputValue("hasUserGroups", true);
}else{
handlerCtx.setOutputValue("hasUserGroups", false);
handlerCtx.setOutputValue("userGroups", "");
}
String[] principalNames = securityMap.getPrincipalNames();
if (principalNames != null && principalNames.length >0){
String principals = principalNames[0];
for(int i=1; i<principalNames.length; i++){
principals=principals.concat(","+ principalNames[i]);
}
handlerCtx.setOutputValue("principals", principals);
}else{
handlerCtx.setOutputValue("hasUserGroups", true);
handlerCtx.setOutputValue("principals", "");
}
BackendPrincipalConfig bpc = securityMap.getBackendPrincipalConfig();
if (bpc != null){
handlerCtx.setOutputValue("userName", bpc.getUserName());
handlerCtx.setOutputValue("password", bpc.getPassword());
}
}