public static PasswordValidator buildExpireValidator(Map<String,String> properties){
  List<Rule> ruleList=new ArrayList<Rule>();
  ruleList.add(new ExpireRule(NumberUtils.toInt(properties.get(PASSWORD_EXPIRE_DAYS),0)));
  PasswordValidator validator=new PasswordValidator(ruleList);
  return validator;
}

public static PasswordValidator buildExpireValidator ( Map < String , String > properties ) { List < Rule > ruleList = new ArrayList < Rule > ( ) ; ruleList . add ( new ExpireRule ( NumberUtils . toInt ( properties . get ( PASSWORD_EXPIRE_DAYS ) , 0 ) ) ) ; PasswordValidator validator = new PasswordValidator ( ruleList ) ; return validator ; }
build validator for expirerule , which used in login .
