this.roles = (roles == null) ? new ArrayList<String>()
: new ArrayList<String>(roles);
}
-
+
public String getUser() {
return user;
}
return new Status(StatusCode.BADREQUEST,
"Current password is incorrect");
}
-
+
// Create a new object with the proposed modifications
UserConfig proposed = new UserConfig();
proposed.user = this.user;
proposed.password = (newPassword != null)? newPassword : this.password;
proposed.roles = (newRoles != null)? newRoles : this.roles;
-
+
// Validate it
Status status = proposed.validate();
if (!status.isSuccess()) {
return status;
}
-
+
// Accept the modifications
this.user = proposed.user;
this.password = proposed.password;
this.roles = new ArrayList<String>(proposed.roles);
-
+
return status;
}
}
return locResponse;
}
-
+
protected String getRolesString() {
StringBuffer buffer = new StringBuffer();
if (!roles.isEmpty()) {