for (int i = 0; i < roleMappingsType.sizeOfRoleArray(); i++) {
GerRoleType roleType = roleMappingsType.getRoleArray(i);
String roleName = roleType.getRoleName().trim();
if (roleType.isSetRunAsSubject()) {
SubjectInfo subjectInfo = buildSubjectInfo(roleType.getRunAsSubject());
roleDesignates.put(roleName, subjectInfo);
}
for (int j = 0; j < roleType.sizeOfRealmPrincipalArray(); j++) {
Principal principal = buildRealmPrincipal(roleType.getRealmPrincipalArray(j), bundle);
add(roleName, principal, principalRoleMap);
}
for (int j = 0; j < roleType.sizeOfLoginDomainPrincipalArray(); j++) {
Principal principal = buildDomainPrincipal(roleType.getLoginDomainPrincipalArray(j), bundle);
add(roleName, principal, principalRoleMap);
}
for (int j = 0; j < roleType.sizeOfPrincipalArray(); j++) {
Principal principal = buildPrincipal(roleType.getPrincipalArray(j), bundle);
add(roleName, principal, principalRoleMap);
}
}
}
SubjectInfo defaultSubjectInfo = buildSubjectInfo(securityType.getDefaultSubject());
AbstractNameQuery credentialStoreName;
if (securityType.isSetCredentialStoreRef()) {
PatternType credentialStoreType = securityType.getCredentialStoreRef();
credentialStoreName = SingleGBeanBuilder.buildAbstractNameQuery(credentialStoreType, GBeanInfoBuilder.DEFAULT_J2EE_TYPE, Collections.singleton(CredentialStore.class.getName()));
} else {