Package evolaris.framework.async.business

Examples of evolaris.framework.async.business.TemplateEngine.computeMaxMessageLength()


    if (new Integer(3).equals(getDestinationSelection())
        && templateEngine.getPlaceholders(getMessage()).size() > 0) {  // message to isdn must not contain placeholders
      errors.add("message", new ActionMessage("smssvc.placeholdersNotAllowedHere"));
    } else if (!templateEngine.validateSmsTemplate(getMessage())) {
      errors.add("message", new ActionMessage("smssvc.illegalPlaceholdersFound"));
    } else if (templateEngine.computeMaxMessageLength(getMessage()) == Integer.MAX_VALUE) {
      errors.add("message", new ActionMessage("smssvc.missingPlaceholderLengths"));
    }
    return errors;
  }
View Full Code Here


    if (new Integer(6).equals(getDestinationSelection())) { // message to msisdn must not contain placeholders for (destination) user
      allowedPlaceholders.removeAll(TemplateEngine.VALID_SMS_MESSAGE_PLACEHOLDERS);
    }
    if (!templateEngine.validateTemplate(getMessage(), allowedPlaceholders)) {
      errors.add("message", new ActionMessage("smssvc.illegalPlaceholdersFound"));
    } else if (templateEngine.computeMaxMessageLength(getMessage()) == Integer.MAX_VALUE) {
      errors.add("message", new ActionMessage("smssvc.missingPlaceholderLengths"));
    } else if (templateEngine.computeMaxMessageLength(getMessage()) > SmsInteractionEnterOrEditAction.MAX_MESSAGE_TEXT_LENGTH) {
      errors.add("message", new ActionMessage("smssvc.messageLongerThan450characters"));     
    }
    return errors;
View Full Code Here

    }
    if (!templateEngine.validateTemplate(getMessage(), allowedPlaceholders)) {
      errors.add("message", new ActionMessage("smssvc.illegalPlaceholdersFound"));
    } else if (templateEngine.computeMaxMessageLength(getMessage()) == Integer.MAX_VALUE) {
      errors.add("message", new ActionMessage("smssvc.missingPlaceholderLengths"));
    } else if (templateEngine.computeMaxMessageLength(getMessage()) > SmsInteractionEnterOrEditAction.MAX_MESSAGE_TEXT_LENGTH) {
      errors.add("message", new ActionMessage("smssvc.messageLongerThan450characters"));     
    }
    return errors;
  }
 
View Full Code Here

        } else if (c != '\r'){
          messageLength++;
        }
      }
      TemplateEngine templateEngine = new TemplateEngine();
      int computedLength = templateEngine.computeMaxMessageLength(message);
      if (computedLength == Integer.MAX_VALUE) {
        return computedLength;
      } else {
        messageLength = computedLength + (messageLength - message.length());
      }
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.