Examples of Communication


Examples of com.dotmarketing.portlets.communications.model.Communication

    }

    listArray[7] = String.valueOf(c.getParentCampaign());

    listArray[8] = "false";
    Communication comm = (Communication) InodeFactory.getChildOfClass(c, Communication.class);
    if (comm.getCommunicationType().equalsIgnoreCase("alert")) {
      listArray[8] = "true";
    }

    return listArray;
  }
View Full Code Here

Examples of com.dotmarketing.portlets.communications.model.Communication

    return getCommunication(inode,userId, "");
  }
 
  public static Communication getCommunication(String inode, String userId, String orderby) {
    HibernateUtil dh = new HibernateUtil(Communication.class);
    Communication commun = null;
    if(!UtilMethods.isSet(orderby)){
      orderby = "mod_date";
    }
    try {
      dh.setQuery(
View Full Code Here

Examples of com.dotmarketing.portlets.communications.model.Communication

    return commun;
  }
 
  public static Communication getCommunication(String inode) {
    HibernateUtil dh = new HibernateUtil(Communication.class);
    Communication communication = null;
    try {
      dh.setQuery(
      "from inode in class com.dotmarketing.portlets.communications.model.Communication where inode = ?");
      dh.setParam(inode);
      communication = (Communication) dh.load();
View Full Code Here

Examples of com.dotmarketing.portlets.communications.model.Communication

    }
    return communication;
  }
 
  public static Communication newInstance() {
    Communication c = new Communication();
    c.setType("communication");
    c.setModDate(new java.util.Date());
    return c;
  }
View Full Code Here

Examples of com.dotmarketing.portlets.communications.model.Communication

    InodeFactory.deleteInode(c);
   
  }
 
  public static void deleteCommunication(String inode) throws DotHibernateException {
    Communication c = getCommunication(inode);
    DotConnect db = new DotConnect();
    db.setSQL("delete from permission where inode_id = ?");
    db.addParam(inode);
    db.getResult();
    InodeFactory.deleteInode(c);
View Full Code Here

Examples of com.dotmarketing.portlets.communications.model.Communication

  throws Exception {

    Campaign c = (Campaign) req.getAttribute(WebKeys.CAMPAIGN_EDIT);
    MailingList ml = (MailingList) InodeFactory.getChildOfClass(c, MailingList.class);
    HTMLPage page = (HTMLPage) InodeFactory.getChildOfClass(c, HTMLPage.class);
    Communication comm = (Communication) InodeFactory.getChildOfClass(c, Communication.class);
    UserFilter userfilter = (UserFilter) InodeFactory.getChildOfClass(c, UserFilter.class);

    Campaign copy = CampaignFactory.newInstance();

    copy.setTitle( c.getTitle() + " (copy)");
    copy.setFromEmail(c.getFromEmail());
    copy.setFromName(c.getFromName());
    copy.setCStartDate(c.getCStartDate());
    copy.setSubject(c.getSubject());
    copy.setMessage(c.getMessage());
    copy.setOwner(c.getOwner());
    copy.setUserId(c.getUserId());
    copy.setCommunicationInode(c.getCommunicationInode());
    copy.setUserFilterInode(c.getUserFilterInode());

    //no sure if this is needed
    HibernateUtil.saveOrUpdate(copy);

    if(InodeUtils.isSet(ml.getInode())){
      copy.addChild(ml);
    }
    if(InodeUtils.isSet(page.getInode())){
      copy.addChild(page);
    }
    if (InodeUtils.isSet(comm.getInode())) {
      copy.addChild(comm);
    }
    if (InodeUtils.isSet(userfilter.getInode())) {
      copy.addChild(userfilter);
    }
View Full Code Here

Examples of com.dotmarketing.portlets.communications.model.Communication

      if (InodeUtils.isSet(ml.getInode())) {
        c.addChild(ml);
      }

      // wipe the old communication that was the child
      Communication comm = (Communication) InodeFactory.getChildOfClass(c, Communication.class);
      c.deleteChild(comm);

      //try to get the campaign's new communication
      comm = (Communication) InodeFactory.getInode(String.valueOf(cfform.getCommunicationInode()), Communication.class);
      if (InodeUtils.isSet(comm.getInode())) {
        c.addChild(comm);
      }

      // wipe the old user filter that was the child
      UserFilter userfilter = (UserFilter) InodeFactory.getChildOfClass(c, UserFilter.class);
View Full Code Here

Examples of communication.Communication

        }
    }

    public static void setUpSerial() throws Exception, IOException, InterruptedException {
        if (con!=null) con.close();
        con = new Communication();
        con.connect("COM17", 57600);
        sw=new SerialWriter(con.getOutputStream());
        sr=new SerialReader(con.getInputStream());
        con.addEventListener(sr);
        Thread t0=new Thread(sw);
View Full Code Here

Examples of org.spw.model.Communication

        Contact contact = new Contact();
        contact.setIdContact(TEST_ID_CONTACT);
        contact.setFirstName(getName());
        contactCtrl.create(contact);
        //Action completed with a participant
        Communication com1 = new Communication();
        com1.setIdCommunication(TEST_ID_COMPLETED_WITH_CONTACT);
        com1.setActionToBeConducted("Test already done");
        com1.setDateOfCompletion(new Date());
        com1.setTopic(getName());
        List participants = new ArrayList();
        participants.add(contact);
        com1.setParticipants(participants);
        comCtrl.create(com1);
        contact.getParticipate().add(com1);
        contactCtrl.update(contact);
        //No action to complete
        Communication com2 = new Communication();
        com2.setIdCommunication(TEST_ID_NO_ACTION);
        com2.setTopic(getName());
        comCtrl.create(com2);
        //Action to complete
        Communication com3 = new Communication();
        com3.setIdCommunication(TEST_ID_NOT_COMPLETED);
        com3.setActionToBeConducted("Test to be done");
        com3.setTopic(getName());
        comCtrl.create(com3);
    }
View Full Code Here

Examples of org.spw.model.Communication

        List<Communication> result = instance.getList();
        assertFalse("The list must not be empty",
                result.isEmpty());
        assertFalse("The list must contain only one item",
                result.size() > 1);
        Communication retrievedCom = result.get(0);
        assertEquals(TEST_ID_COMPLETED_WITH_CONTACT, (long)retrievedCom.getIdCommunication());
        List<Contact> participants = retrievedCom.getParticipants();
        assertFalse("The list of participants must not be empty",
                participants.isEmpty());
        assertFalse("The list of participants must contain only one item",
                participants.size() > 1);
        Contact retrievedContact = participants.get(0);
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.