Examples of PublishStateException


Examples of com.dotmarketing.business.PublishStateException

            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)
                }
              }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.