Package com.dotmarketing.portlets.campaigns.model

Examples of com.dotmarketing.portlets.campaigns.model.Click


      Campaign c = (Campaign) InodeFactory.getParentOfClass(r, Campaign.class);
      if (InodeUtils.isSet(r.getInode())) {

        //update recipient click through-links
        try {
          Click click = ClickFactory.getClickByLinkAndRecipient(redir, r);
          click.setClickCount((click.getClickCount() + 1));
          click.setLink(redir);
          HibernateUtil.saveOrUpdate(click);
          r.addChild(click);
          HibernateUtil.saveOrUpdate(r);

          //update queue clickthrough links
          click = ClickFactory.getClickByLinkAndCampaign(redir, c);
          click.setClickCount((click.getClickCount() + 1));
          click.setLink(redir);
          HibernateUtil.saveOrUpdate(click);
          c.addChild(click);
          HibernateUtil.saveOrUpdate(c);
        } catch (DotHibernateException e1) {
          Logger.error(this, e1.getMessage(), e1);
View Full Code Here



  }*/
  public static final Click getClick(String id) {
    HibernateUtil dh = new HibernateUtil(Click.class);
    Click click ;
    try {
      click = (Click) dh.load(id);
    } catch (DotHibernateException e) {
      Logger.error(ClickFactory.class, "Unable to get object", e);
      throw new DotRuntimeException(e.getMessage(), e);
View Full Code Here

    }
    return click;
  }
  public static final Click getClickByLinkAndRecipient(String link, Recipient r) {
    if (link == null || (!InodeUtils.isSet(r.getInode()))) {
      return new Click();
    }
   
    //i have errors with hibernate replacing the http:// with http?// so im removing it from the url and doing a like!!!!
    link = link.replaceAll("http(s)?://","");
View Full Code Here

    return click;
  }
   
    public static final Click getClickByLinkAndCampaign(String link, Campaign q) {
        if (link == null || (!InodeUtils.isSet(q.getInode()))) {
            return new Click();
        }
    //i have errors with hibernate replacing the http:// with http?// so im removing it from the url and doing a like!!!!
    link = link.replaceAll("http(s)?://","");

    String condition = "link like '%"+link+"'";
View Full Code Here

                Recipient r = (Recipient) i.next();
                List clicks = ClickFactory.getClicksByParent(r);
                Iterator i2 = clicks.iterator();

                while (i2.hasNext()) {
                    Click click = (Click) i2.next();
                    InodeFactory.deleteInode(click);
                }

                InodeFactory.deleteInode(r);
            }
View Full Code Here

  }

  private void _viewCampaignReportLink(ActionRequest req, ActionResponse res,ActionForm form,User user) throws Exception  {
   
    Campaign c = (Campaign) req.getAttribute(WebKeys.CAMPAIGN_EDIT);
    Click click = (Click) InodeFactory.getInode(req.getParameter("clickId"), Click.class);
    req.setAttribute(WebKeys.RECIPIENT_LIST, RecipientFactory.getRecipientsByCampaignAndClick(c, click));
    req.setAttribute(WebKeys.RECIPIENT_LIST_TITLE, "Users who clicked:" +click.getLink());
        req.setAttribute(WebKeys.CLICK_EDIT, click);
   
  }
View Full Code Here

TOP

Related Classes of com.dotmarketing.portlets.campaigns.model.Click

Copyright © 2018 www.massapicom. 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.