private CodeTypeDao codeTypeDao;
@Override
public boolean checkPasswordRule(String userId, String password,
String password2, boolean forcePwdChange) {
SysParm parmPwdRule = commonDao.findById(SysParm.class,
PwdPloicyKeys.PWD_RULE.toString().toLowerCase());
SysParm parmPwdMinLen = commonDao.findById(SysParm.class,
PwdPloicyKeys.PWD_MIN_LENGTH.toString().toLowerCase());
SysParm parmPwdMaxHistory = commonDao.findById(SysParm.class,
PwdPloicyKeys.PWD_MAX_HISTORY.toString().toLowerCase());
SysParm parmPwdChangeInteval = commonDao.findById(SysParm.class,
PwdPloicyKeys.PWD_CHANGE_INTERVAL.toString().toLowerCase());
int minLen = Integer.parseInt(parmPwdMinLen.getParmValue());
int maxHistory = Integer.parseInt(parmPwdMaxHistory.getParmValue());
int changeInteval = Integer.parseInt(parmPwdChangeInteval
.getParmValue());
String ruleType = parmPwdRule.getParmValue();
CodeType rule = codeTypeDao.findByCodeTypeAndCodeValue("pwdrule",
ruleType, CapSecurityContext.getLocale().toString());
if (StringUtils.isBlank(password) || StringUtils.isBlank(password2)) {