if( UtilMethods.isSet(structureForm.getExpireDateVar())){
Date pub = (Date)con.getMap().get(structureForm.getPublishDateVar());
Date exp = (Date) con.getMap().get(structureForm.getExpireDateVar());
if(UtilMethods.isSet(pub) && UtilMethods.isSet(exp)){
if(exp.before(new Date())){
throw new PublishStateException("'"+con.getTitle()+"'" + LanguageUtil.get(user, "found-expired-content-please-check-before-continue"));
}else if(exp.before(pub)){
throw new PublishStateException("'"+con.getTitle()+"'" + LanguageUtil.get(user, "expire-date-should-not-be-less-than-Publish-date-please-check-before-continue"));
}else if(con.isLive() && pub.after(new Date()) && exp.after(new Date())){
conAPI.unpublish(con, user, true);
}
}
}