Examples of NewsletterContentReportVO


Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.model.NewsletterContentReportVO

    }
  }
 
  @Override
  public NewsletterContentReportVO loadContentReport(String contentId) {
    NewsletterContentReportVO contentReport = null;
    Connection conn = null;
    try {
      conn = this.getConnection();
      contentReport = this.getContentReport(contentId, conn);
      if (contentReport != null) {
        Map<String, String> recipients = this.getContentRecipients(contentReport.getId(), conn);
        contentReport.setRecipients(recipients);
      }
    } catch (Throwable t) {
      this.processDaoException(t, "Error loading content report", "loadContentReport");
    } finally {
      closeConnection(conn);
View Full Code Here

Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.model.NewsletterContentReportVO

      closeDaoResources(null, stat);
    }
  }
 
  private NewsletterContentReportVO getContentReport(String contentId, Connection conn) {
    NewsletterContentReportVO contentReport = null;
    PreparedStatement stat = null;
    ResultSet res = null;
    try {
      stat = conn.prepareStatement(LOAD_CONTENT_REPORT);
      stat.setString(1, contentId);
View Full Code Here

Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.model.NewsletterContentReportVO

    }
    return recipients;
  }
 
  private NewsletterContentReportVO createContentReportFromRecord(ResultSet res) throws SQLException {
    NewsletterContentReportVO contentReport = new NewsletterContentReportVO();
    contentReport.setId(res.getInt(1));
    contentReport.setNewsletterId(res.getInt(2));
    contentReport.setContentId(res.getString(3));
    contentReport.setTextBody(res.getString(4));
    contentReport.setHtmlBody(res.getString(5));
    contentReport.setSendDate(res.getTimestamp(6));
    contentReport.setSubject(res.getString(7));
    return contentReport;
  }
View Full Code Here

Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.model.NewsletterContentReportVO

    newsletterReport2.addContentReport(contentReport3);
    ContentReport contentReport4 = this._helper.createContentReport(4, newsletterReport2.getId(), "ART102", "textBody2", "htmlBody2");
    newsletterReport2.addContentReport(contentReport4);
    try {
      this._newsletterDAO.addNewsletterReport(newsletterReport1);
      NewsletterContentReportVO report1 = this._newsletterManager.getContentReport("ART1");
      this.compareContentReports(newsletterReport1, contentReport1, report1);
      NewsletterContentReportVO report2 = this._newsletterManager.getContentReport("ART102");
      this.compareContentReports(newsletterReport1, contentReport2, report2);
     
      this._newsletterDAO.addNewsletterReport(newsletterReport2);
      NewsletterContentReportVO report3 = this._newsletterManager.getContentReport("ART1");
      this.compareContentReports(newsletterReport2, contentReport3, report3);
      NewsletterContentReportVO report4 = this._newsletterManager.getContentReport("ART102");
      this.compareContentReports(newsletterReport2, contentReport4, report4);
     
      List<String> contentIds = this._newsletterManager.getSentContentIds();
      this.compareIds(contentIds, new String[] { "ART1", "ART102" });
View Full Code Here

Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.model.NewsletterContentReportVO

      assertNull(this._newsletterManager.getContentReport("ART180"));
     
      this._newsletterManager.sendNewsletter();
      this.waitForSentNewsletter();
     
      NewsletterContentReportVO contentReport1 = this._newsletterManager.getContentReport("ART1");
      assertNotNull(contentReport1);
      assertEquals(0, contentReport1.getRecipients().size());
      NewsletterContentReportVO contentReport2 = this._newsletterManager.getContentReport("ART102");
      assertNotNull(contentReport2);
      assertEquals(0, contentReport2.getRecipients().size());
      NewsletterContentReportVO contentReport3 = this._newsletterManager.getContentReport("ART180");
      assertEquals("ART180", contentReport3.getContentId());
      assertTrue(contentReport3.getSendDate().compareTo(new Date())<0);
      assertEquals("ART180", contentReport3.getContentId());
      assertEquals("Oggetto della mail", contentReport3.getSubject());
      String textBody = contentReport3.getTextBody();
      assertFalse(textBody.contains("Header text"));
      assertFalse(textBody.contains("Footer text"));
      String htmlBody = contentReport3.getHtmlBody();
      assertFalse(htmlBody.contains("Header html"));
      assertFalse(htmlBody.contains("Footer html"));
      assertEquals(2, contentReport3.getRecipients().size());
      assertEquals(email, contentReport3.getRecipients().get("editorCoach_temp"));
      assertEquals(email, contentReport3.getRecipients().get("editorCustomers_temp"));
    } catch (Throwable t) {
      throw t;
    } finally {
      this._helper.deleteUser("editorCoach_temp");
      this._helper.deleteUser("editorCustomers_temp");
View Full Code Here

Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.model.NewsletterContentReportVO

        "ART102", "textBody2", "htmlBody2");
    newsletterReport2.addContentReport(contentReport4);
   
    try {
      this._newsletterDAO.addNewsletterReport(newsletterReport1);
      NewsletterContentReportVO report1 = this._newsletterDAO.loadContentReport("ART1");
      this.compareContentReports(newsletterReport1, contentReport1, report1);
      NewsletterContentReportVO report2 = this._newsletterDAO.loadContentReport("ART102");
      this.compareContentReports(newsletterReport1, contentReport2, report2);
     
      this._newsletterDAO.addNewsletterReport(newsletterReport2);
      NewsletterContentReportVO report3 = this._newsletterDAO.loadContentReport("ART1");
      this.compareContentReports(newsletterReport2, contentReport3, report3);
      NewsletterContentReportVO report4 = this._newsletterDAO.loadContentReport("ART102");
      this.compareContentReports(newsletterReport2, contentReport4, report4);
     
      List<String> contentIds = this._newsletterDAO.loadSentContentIds();
      this.compareIds(contentIds, new String[] { "ART1", "ART102" });
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.