});
}
private void addScopedRole(final Roles roles, final Property property, final String scopeName,
final ScopeType type) {
ScopedRole scopedRole = beanFactory.scopedRole().as();
scopedRole.setName(property.getName());
scopedRole.setType(type);
ModelNode node = property.getValue();
String baseRoleName = node.get("base-role").asString();
scopedRole.setBaseRole(StandardRole.fromString(baseRoleName));
List<String> scope = new ArrayList<String>();
List<ModelNode> scopeNodes = node.get(scopeName).asList();
for (ModelNode scopeNode : scopeNodes) {
scope.add(scopeNode.asString());
}
scopedRole.setScope(scope);
roles.add(scopedRole);
}