datasurvey/src/main/java/org/datasurvey/web/rest/vm/ManagedUserVM.java

36 lines
860 B
Java
Raw Normal View History

2021-07-03 21:48:27 +00:00
package org.datasurvey.web.rest.vm;
import javax.validation.constraints.Size;
import org.datasurvey.service.dto.AdminUserDTO;
/**
* View Model extending the AdminUserDTO, which is meant to be used in the user management UI.
*/
public class ManagedUserVM extends AdminUserDTO {
public static final int PASSWORD_MIN_LENGTH = 4;
public static final int PASSWORD_MAX_LENGTH = 100;
@Size(min = PASSWORD_MIN_LENGTH, max = PASSWORD_MAX_LENGTH)
private String password;
public ManagedUserVM() {
// Empty constructor needed for Jackson.
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
// prettier-ignore
@Override
public String toString() {
return "ManagedUserVM{" + super.toString() + "} ";
}
}