public static PasswordValidator buildUpdateValidator(Map<String,String> properties,PasswordUtils passwordUtils){
  List<Rule> ruleList=buildBaseRuleList(properties);
  ruleList.add(new HistoryRule(NumberUtils.toInt(properties.get(PASSWORD_REUSE_NUMBER),3),passwordUtils));
  ruleList.add(new ChangedNumberRule(NumberUtils.toInt(properties.get(PASSWORD_CHANGED_NUMBER),2)));
  ruleList.add(new ChangeIntervalRule(NumberUtils.toInt(properties.get(PASSWORD_CHANGE_INTERVAL),60)));
  PasswordValidator validator=new PasswordValidator(ruleList);
  return validator;
}

public static PasswordValidator buildUpdateValidator ( Map < String , String > properties , PasswordUtils passwordUtils ) { List < Rule > ruleList = buildBaseRuleList ( properties ) ; ruleList . add ( new HistoryRule ( NumberUtils . toInt ( properties . get ( PASSWORD_REUSE_NUMBER ) , 3 ) , passwordUtils ) ) ; ruleList . add ( new ChangedNumberRule ( NumberUtils . toInt ( properties . get ( PASSWORD_CHANGED_NUMBER ) , 2 ) ) ) ; ruleList . add ( new ChangeIntervalRule ( NumberUtils . toInt ( properties . get ( PASSWORD_CHANGE_INTERVAL ) , 60 ) ) ) ; PasswordValidator validator = new PasswordValidator ( ruleList ) ; return validator ; }
build validator for updatepassword api
