UsersType users = factory.createUsersType();
deployment.setUsers(users);
// <user>
for (final UserInfo info : m_users) {
User user = factory.createUsersTypeUser();
users.getUser().add(user);
user.setName(info.name);
user.setPassword(info.password);
// build up user/@groups.
if (info.groups.length > 0) {
final StringBuilder groups = new StringBuilder();
for (final String group : info.groups) {
if (groups.length() > 0)
groups.append(",");
groups.append(group.toLowerCase());
}
user.setGroups(groups.toString());
}
}
}
// <httpd>. Disabled unless port # is configured by a testcase