Examples of MessageModel


Examples of com.agiletec.plugins.jpwebdynamicform.aps.system.services.message.model.MessageModel

      assertEquals("PER", newPerConfig.getTypeCode());
      assertTrue(newPerConfig.isStore());
      assertEquals("eMail", newPerConfig.getMailAttrName());
      assertTrue(newPerConfig.isNotifiable());
      assertEquals("CODE1", newPerConfig.getSenderCode());
      MessageModel model = newPerConfig.getMessageModel();
      assertEquals("Mail Body", model.getBodyModel());
      assertEquals("Mail Subject", model.getSubjectModel());
      this.checkStrings(recipientsTo, newPerConfig.getRecipientsTo());
      this.checkStrings(recipientsCc, newPerConfig.getRecipientsCc());
      this.checkStrings(recipientsBcc, newPerConfig.getRecipientsBcc());
    } catch (Throwable t) {
      throw t;
View Full Code Here

Examples of com.agiletec.plugins.jpwebdynamicform.aps.system.services.message.model.MessageModel

    assertEquals(expected.getTypeCode(), received.getTypeCode());
    assertEquals(expected.getMailAttrName(), received.getMailAttrName());
    assertEquals(expected.isStore(), received.isStore());
    assertEquals(expected.isNotifiable(), received.isNotifiable());
    assertEquals(expected.getSenderCode(), received.getSenderCode());
    MessageModel expectedModel = expected.getMessageModel();
    MessageModel receivedModel = received.getMessageModel();
    assertEquals(expectedModel.getBodyModel(), receivedModel.getBodyModel());
    assertEquals(expectedModel.getSubjectModel(), receivedModel.getSubjectModel());
    this.checkStrings(expected.getRecipientsTo(), received.getRecipientsTo());
    this.checkStrings(expected.getRecipientsCc(), received.getRecipientsCc());
    this.checkStrings(expected.getRecipientsBcc(), received.getRecipientsBcc());
  }
View Full Code Here

Examples of com.agiletec.plugins.jpwebdynamicform.aps.system.services.message.model.MessageModel

    assertEquals("eMail", config2.getMailAttrName());
    assertEquals(3, config2.getRecipientsTo().length);
    assertEquals(2, config2.getRecipientsCc().length);
    assertEquals(1, config2.getRecipientsBcc().length);
   
    MessageModel messageModelIt = config2.getMessageModel();
    assertEquals("Corpo della mail COM", messageModelIt.getBodyModel());
    assertEquals("Oggetto della mail COM", messageModelIt.getSubjectModel());
  }
View Full Code Here

Examples of com.agiletec.plugins.jpwebdynamicform.aps.system.services.message.model.MessageModel

    messageTypeConfig.setRecipientsTo(this.extractRecipients(recipentsElem, RECIPIENTS_TO_CHILD));
    messageTypeConfig.setRecipientsCc(this.extractRecipients(recipentsElem, RECIPIENTS_CC_CHILD));
    messageTypeConfig.setRecipientsBcc(this.extractRecipients(recipentsElem, RECIPIENTS_BCC_CHILD));
   
    Element modelElem = messageTypeElem.getChild(MODEL_ELEM);
    MessageModel messageModel = this.extractMessageModel(modelElem);
    messageTypeConfig.setMessageModel(messageModel);
   
    return messageTypeConfig;
  }
View Full Code Here

Examples of com.agiletec.plugins.jpwebdynamicform.aps.system.services.message.model.MessageModel

    }
    return recipents;
  }
 
  protected MessageModel extractMessageModel(Element langModelElem) {
    MessageModel messageModel = new MessageModel();
    messageModel.setBodyModel(langModelElem.getChildText(MODEL_BODY_CHILD));
    messageModel.setSubjectModel(langModelElem.getChildText(MODEL_SUBJECT_CHILD));
    return messageModel;
  }
View Full Code Here

Examples of com.agiletec.plugins.jpwebdynamicform.aps.system.services.message.model.MessageModel

    }
   
    Element recipientsElem = this.createRecipientsElement(config);
    configElem.addContent(recipientsElem);
   
    MessageModel model = config.getMessageModel();
    Element modelElem = this.createModelElement(model);
    configElem.addContent(modelElem);
   
    return configElem;
  }
View Full Code Here

Examples of com.agiletec.plugins.jpwebdynamicform.aps.system.services.message.model.MessageModel

      this.setSenderCode(config.getSenderCode());
      this.setRecipientsTo(this.convertRecipients(config.getRecipientsTo()));
      this.setRecipientsCc(this.convertRecipients(config.getRecipientsCc()));
      this.setRecipientsBcc(this.convertRecipients(config.getRecipientsBcc()));
     
      MessageModel messageModel = config.getMessageModel();
      if (messageModel!=null) {
        this.setBodyModel(messageModel.getBodyModel());
        this.setSubjectModel(messageModel.getSubjectModel());
      }
    }
  }
View Full Code Here

Examples of com.agiletec.plugins.jpwebdynamicform.aps.system.services.message.model.MessageModel

    config.setNotifiable(notifiable!=null && notifiable.booleanValue());
    config.setRecipientsTo(this.convertRecipients(this.getRecipientsTo()));
    config.setRecipientsCc(this.convertRecipients(this.getRecipientsCc()));
    config.setRecipientsBcc(this.convertRecipients(this.getRecipientsBcc()));
   
    MessageModel messageModel = new MessageModel();
    messageModel.setSubjectModel(this.getSubjectModel());
    messageModel.setBodyModel(this.getBodyModel());
    config.setMessageModel(messageModel);
   
    return config;
  }
View Full Code Here

Examples of com.agiletec.plugins.jpwebdynamicform.aps.system.services.message.model.MessageModel

  protected boolean sendMessageNotification(Message message) throws ApsSystemException {
    boolean sent = false;
    try {
      MessageTypeNotifierConfig config = this.getNotifierConfig(message.getTypeCode());
      if (config != null && config.isNotifiable()) {
        MessageModel messageModel = config.getMessageModel();
        String renderingLangCode = this.getLangManager().getDefaultLang().getCode();
        String subject = this.getEntityRenderer().render(message, messageModel.getSubjectModel(), renderingLangCode, false);
        String text = this.getEntityRenderer().render(message, messageModel.getBodyModel(), renderingLangCode, true);

        String[] recipientsTo = config.getRecipientsTo();
        String[] recipientsCc = config.getRecipientsCc();
        String[] recipientsBcc = config.getRecipientsBcc();
        String senderCode = config.getSenderCode();
View Full Code Here

Examples of com.agiletec.plugins.jpwebdynamicform.aps.system.services.message.model.MessageModel

        if (null!=email) {
          String renderingLangCode = message.getLangCode();
          if (renderingLangCode==null || this.getLangManager().getLang(renderingLangCode)==null) {
            renderingLangCode = this.getLangManager().getDefaultLang().getCode();
          }
          MessageModel messageModel = config.getMessageModel();
          String subject = this.getEntityRenderer().render(message, messageModel.getSubjectModel(), renderingLangCode, false);
          subject = "RE: " + subject;
          String text = answer.getText();
          String senderCode = config.getSenderCode();
          String[] recipientsTo = new String[] { email };
          Properties attachmentFiles = answer.getAttachments();
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.