* or have mismatched password attributes.
*/
private void validateUser(CreateSeteUserVo vo) throws BusinessRuleException {
/* Verify Non violation of Business Rules */
if(vo.getPassword().equals("") || vo.getPassword2().equals("")){
BusinessRuleException bre = new BusinessRuleException();
bre.addCodedMessage("seteUser.PasswordEmpty", new String[]{""});
throw bre;
}
else if(userDao.findByLoginName(vo.getLoginName()) != null){
BusinessRuleException bre = new BusinessRuleException();
bre.addCodedMessage("seteUser.LoginAlreadyExists", new String[]{vo.getLoginName()});
throw bre;
}
else if(!vo.getPassword().equals(vo.getPassword2())){
BusinessRuleException bre = new BusinessRuleException();
bre.addCodedMessage("seteUser.PasswordMismatch", new String[]{""});
throw bre;
}
else if(vo.getUserRoles().length < 1){
BusinessRuleException bre = new BusinessRuleException();
bre.addCodedMessage("seteUser.NoRolesSelected", new String[]{vo.getLoginName()});
throw bre;
}
}