HashMap userMap = new HashMap();
HashMap groupMap = new HashMap();
// Add user-backendPrincipal mappings to Map1
for (int i = 0; i < securityMaps.length; i++) {
ConnectorSecurityMap map = securityMaps[i];
ResourcePrincipal principal = generateResourcePrincipal(map);
String[] principalNames = map.getPrincipals();
for (int j = 0; j < principalNames.length; j++) {
userMap.put(principalNames[j], principal);
}
String[] groupNames = map.getUserGroups();
for (int j = 0; j < groupNames.length; j++) {
groupMap.put(groupNames[j], principal);
}
}