8687888990919293949596
// TODO: i18n all of this // TODO: Add color if (name == null) { name = prompt.readLine("User name: "); } user.setName(name); if (email == null) { email = prompt.readLine("User email: ");
919293949596979899100101
name = prompt.readLine("User name: "); } user.setName(name); if (email == null) { email = prompt.readLine("User email: "); } user.setEmail(email); if (active == null) { String tmp = prompt.readLine("User active: ");
96979899100101102103104105106
email = prompt.readLine("User email: "); } user.setEmail(email); if (active == null) { String tmp = prompt.readLine("User active: "); active = Boolean.parseBoolean(tmp); } if (active) { user.setStatus("active"); }
107108109110111112113114115116117
else { user.setStatus("disabled"); } if (userManaged == null) { String tmp = prompt.readLine("User managed: "); userManaged = Boolean.parseBoolean(tmp); } user.setUserManaged(userManaged); if (roles == null) {
116117118119120121122123124125126
if (roles == null) { roles = new ArrayList<String>(); String tmp; while ((tmp = prompt.readLine("User role: ")) != null && tmp.trim().length() != 0) { roles.add(tmp); } } user.getRoles().addAll(roles);
8283848586878889909192
// TODO: i18n all of this // TODO: Add color if (userId == null) { userId = prompt.readLine("User ID: "); } user.setUserId(userId); if (name == null) { name = prompt.readLine("User name: ");
8788899091929394959697
userId = prompt.readLine("User ID: "); } user.setUserId(userId); if (name == null) { name = prompt.readLine("User name: "); } user.setName(name); if (email == null) { email = prompt.readLine("User email: ");
9293949596979899100101102
979899100101102103104105106107
108109110111112113114115116117118