/** * Checks whether breeze output is correct for all articles. In case there are errors from Breeze * it generates the list of articles with Error. * * @param issue * @return */ private String identifyErrorneouArticleFromBreeze(Issue issue) { log.debug("identifyErrorneouArticleFromBreeze: Start; Issue: " + issue); StringBuilder strb = new StringBuilder(); // strb.append(IConstants.MSG_AAU_REJECT_ARTICLE_LIST); List<Article> issueArticles = issue.getArticles(); for (Object element : issueArticles) { Article article = (Article) element; if (article.getString(Article.ARTICLE_STATUS).equalsIgnoreCase(IConstants.MSG_ERROR_PDF_GEN) || article .getString(Article.ARTICLE_STATUS) .equalsIgnoreCase(IConstants.MSG_BREEZE_FILE_MISSING) || article .getString(Article.ARTICLE_STATUS) .equalsIgnoreCase(IConstants.MSG_CORRUPT_PACKAGE_BREEZE) || article .getString(Article.ARTICLE_STATUS) .equalsIgnoreCase(IConstants.MSG_ERROR_UNEXPECTED_FILES)) { try { strb.append( (article.getObjectName().substring(0, article.getObjectName().lastIndexOf("_"))) + ","); } catch (DfException e) { // TODO Auto-generated catch block log.debug("Error while fetching the Object name for article in Issue: " + issue); e.printStackTrace(); } } } String errorArticleList = strb.toString().substring(0, strb.toString().lastIndexOf(",")); log.debug("identifyErrorneouArticleFromBreeze: End; Issue: " + issue); return errorArticleList; }
/** * @param issue * @return */ private boolean checkIfPdfGenerationCompleted(Issue issue, BreezeImportToken breezeToken) { List<Article> issueArticles = issue.getArticles(); boolean breezeStatus = false; for (Article article : issueArticles) { // breezeStatus = IConstants.MSG_SUCCESS_PDF_GEN.equals(article // .getString(Article.ARTICLE_STATUS)); // IConstants.MSG_BREEZE_PDF_INI breezeStatus = AppConfig.getConfigValue(AppConfigContant.AJWF_BREEZE_STATUS_, breezeToken.getSession()) .equals(article.getString(Article.ARTICLE_STATUS)); // if (breezeStatus == false) { // return false; // } if (breezeStatus == true) { return false; } } // return breezeStatus; return true; }