Package org.smslib.helper

Examples of org.smslib.helper.ExtStringBuilder.replaceAll()


  }

  private String updateInboundTemplateString(String template, InboundMessage msg) throws UnsupportedEncodingException
  {
    ExtStringBuilder sb = new ExtStringBuilder(template);
    sb.replaceAll("%gatewayId%", URLEncoder.encode(msg.getGatewayId(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%encoding%", (msg.getEncoding() == MessageEncodings.ENC7BIT ? "7-bit" : (msg.getEncoding() == MessageEncodings.ENC8BIT ? "8-bit" : "UCS2 (Unicode)")));
    if(msg.getDate() != null) sb.replaceAll("%date%", URLEncoder.encode(msg.getDate().toString(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%text%", URLEncoder.encode(msg.getText(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%originator%", msg.getOriginator());
    sb.replaceAll("%memIndex%", msg.getMemIndex());
View Full Code Here


  private String updateInboundTemplateString(String template, InboundMessage msg) throws UnsupportedEncodingException
  {
    ExtStringBuilder sb = new ExtStringBuilder(template);
    sb.replaceAll("%gatewayId%", URLEncoder.encode(msg.getGatewayId(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%encoding%", (msg.getEncoding() == MessageEncodings.ENC7BIT ? "7-bit" : (msg.getEncoding() == MessageEncodings.ENC8BIT ? "8-bit" : "UCS2 (Unicode)")));
    if(msg.getDate() != null) sb.replaceAll("%date%", URLEncoder.encode(msg.getDate().toString(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%text%", URLEncoder.encode(msg.getText(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%originator%", msg.getOriginator());
    sb.replaceAll("%memIndex%", msg.getMemIndex());
    sb.replaceAll("%mpMemIndex%", msg.getMpMemIndex());
View Full Code Here

  private String updateInboundTemplateString(String template, InboundMessage msg) throws UnsupportedEncodingException
  {
    ExtStringBuilder sb = new ExtStringBuilder(template);
    sb.replaceAll("%gatewayId%", URLEncoder.encode(msg.getGatewayId(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%encoding%", (msg.getEncoding() == MessageEncodings.ENC7BIT ? "7-bit" : (msg.getEncoding() == MessageEncodings.ENC8BIT ? "8-bit" : "UCS2 (Unicode)")));
    if(msg.getDate() != null) sb.replaceAll("%date%", URLEncoder.encode(msg.getDate().toString(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%text%", URLEncoder.encode(msg.getText(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%originator%", msg.getOriginator());
    sb.replaceAll("%memIndex%", msg.getMemIndex());
    sb.replaceAll("%mpMemIndex%", msg.getMpMemIndex());
    return sb.toString();
View Full Code Here

  {
    ExtStringBuilder sb = new ExtStringBuilder(template);
    sb.replaceAll("%gatewayId%", URLEncoder.encode(msg.getGatewayId(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%encoding%", (msg.getEncoding() == MessageEncodings.ENC7BIT ? "7-bit" : (msg.getEncoding() == MessageEncodings.ENC8BIT ? "8-bit" : "UCS2 (Unicode)")));
    if(msg.getDate() != null) sb.replaceAll("%date%", URLEncoder.encode(msg.getDate().toString(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%text%", URLEncoder.encode(msg.getText(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%originator%", msg.getOriginator());
    sb.replaceAll("%memIndex%", msg.getMemIndex());
    sb.replaceAll("%mpMemIndex%", msg.getMpMemIndex());
    return sb.toString();
  }
View Full Code Here

    ExtStringBuilder sb = new ExtStringBuilder(template);
    sb.replaceAll("%gatewayId%", URLEncoder.encode(msg.getGatewayId(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%encoding%", (msg.getEncoding() == MessageEncodings.ENC7BIT ? "7-bit" : (msg.getEncoding() == MessageEncodings.ENC8BIT ? "8-bit" : "UCS2 (Unicode)")));
    if(msg.getDate() != null) sb.replaceAll("%date%", URLEncoder.encode(msg.getDate().toString(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%text%", URLEncoder.encode(msg.getText(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%originator%", msg.getOriginator());
    sb.replaceAll("%memIndex%", msg.getMemIndex());
    sb.replaceAll("%mpMemIndex%", msg.getMpMemIndex());
    return sb.toString();
  }
View Full Code Here

    sb.replaceAll("%gatewayId%", URLEncoder.encode(msg.getGatewayId(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%encoding%", (msg.getEncoding() == MessageEncodings.ENC7BIT ? "7-bit" : (msg.getEncoding() == MessageEncodings.ENC8BIT ? "8-bit" : "UCS2 (Unicode)")));
    if(msg.getDate() != null) sb.replaceAll("%date%", URLEncoder.encode(msg.getDate().toString(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%text%", URLEncoder.encode(msg.getText(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%originator%", msg.getOriginator());
    sb.replaceAll("%memIndex%", msg.getMemIndex());
    sb.replaceAll("%mpMemIndex%", msg.getMpMemIndex());
    return sb.toString();
  }

  private String updateOutboundTemplateString(String template, OutboundMessage msg) throws UnsupportedEncodingException
View Full Code Here

    sb.replaceAll("%encoding%", (msg.getEncoding() == MessageEncodings.ENC7BIT ? "7-bit" : (msg.getEncoding() == MessageEncodings.ENC8BIT ? "8-bit" : "UCS2 (Unicode)")));
    if(msg.getDate() != null) sb.replaceAll("%date%", URLEncoder.encode(msg.getDate().toString(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%text%", URLEncoder.encode(msg.getText(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%originator%", msg.getOriginator());
    sb.replaceAll("%memIndex%", msg.getMemIndex());
    sb.replaceAll("%mpMemIndex%", msg.getMpMemIndex());
    return sb.toString();
  }

  private String updateOutboundTemplateString(String template, OutboundMessage msg) throws UnsupportedEncodingException
  {
View Full Code Here

  }

  private String updateOutboundTemplateString(String template, OutboundMessage msg) throws UnsupportedEncodingException
  {
    ExtStringBuilder sb = new ExtStringBuilder(template);
    sb.replaceAll("%gatewayId%", URLEncoder.encode(msg.getGatewayId(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%encoding%", (msg.getEncoding() == MessageEncodings.ENC7BIT ? "7-bit" : (msg.getEncoding() == MessageEncodings.ENC8BIT ? "8-bit" : "UCS2 (Unicode)")));
    if(msg.getDate() != null) sb.replaceAll("%date%", URLEncoder.encode(msg.getDate().toString(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%text%", URLEncoder.encode(msg.getText(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%refNo%", URLEncoder.encode(msg.getRefNo(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%recipient%", msg.getRecipient());
View Full Code Here

  private String updateOutboundTemplateString(String template, OutboundMessage msg) throws UnsupportedEncodingException
  {
    ExtStringBuilder sb = new ExtStringBuilder(template);
    sb.replaceAll("%gatewayId%", URLEncoder.encode(msg.getGatewayId(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%encoding%", (msg.getEncoding() == MessageEncodings.ENC7BIT ? "7-bit" : (msg.getEncoding() == MessageEncodings.ENC8BIT ? "8-bit" : "UCS2 (Unicode)")));
    if(msg.getDate() != null) sb.replaceAll("%date%", URLEncoder.encode(msg.getDate().toString(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%text%", URLEncoder.encode(msg.getText(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%refNo%", URLEncoder.encode(msg.getRefNo(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%recipient%", msg.getRecipient());
    sb.replaceAll("%from%", msg.getFrom());
View Full Code Here

  private String updateOutboundTemplateString(String template, OutboundMessage msg) throws UnsupportedEncodingException
  {
    ExtStringBuilder sb = new ExtStringBuilder(template);
    sb.replaceAll("%gatewayId%", URLEncoder.encode(msg.getGatewayId(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%encoding%", (msg.getEncoding() == MessageEncodings.ENC7BIT ? "7-bit" : (msg.getEncoding() == MessageEncodings.ENC8BIT ? "8-bit" : "UCS2 (Unicode)")));
    if(msg.getDate() != null) sb.replaceAll("%date%", URLEncoder.encode(msg.getDate().toString(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%text%", URLEncoder.encode(msg.getText(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%refNo%", URLEncoder.encode(msg.getRefNo(), getProperty("encoding", "ISO-8859-1")));
    sb.replaceAll("%recipient%", msg.getRecipient());
    sb.replaceAll("%from%", msg.getFrom());
    sb.replaceAll("%failureCause%", URLEncoder.encode(msg.getFailureCause().toString(), getProperty("encoding", "ISO-8859-1")));
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.