Search in sources :

Example 21 with StringEx

use of com.twinsoft.util.StringEx in project convertigo by convertigo.

the class DatabaseCacheManager method escapeString.

private String escapeString(String s) {
    StringEx sx = new StringEx(s);
    sx.replaceAll("'", "''");
    return sx.toString();
}
Also used : StringEx(com.twinsoft.util.StringEx)

Example 22 with StringEx

use of com.twinsoft.util.StringEx in project convertigo by convertigo.

the class TransactionWithVariables method generateXsdResponseData.

@Override
protected String generateXsdResponseData(Document document, boolean extract) throws Exception {
    StringEx sx = new StringEx(extract ? extractXsdType(document) : generateWsdlType(document));
    // sx.replace(getName() + "Response", getName() + "ResponseData");
    sx.replace(getName() + "Response\"", getName() + "ResponseData\"");
    sx.replaceAll("\"p_ns:", "\"" + getProject().getName() + "_ns:");
    String xsdResponseData = "  " + sx.toString();
    return xsdResponseData;
}
Also used : StringEx(com.twinsoft.util.StringEx)

Example 23 with StringEx

use of com.twinsoft.util.StringEx in project convertigo by convertigo.

the class StringUtils method escape.

public static String escape(String str) {
    StringEx sx = new StringEx(str);
    sx.replaceAll("&", "&");
    sx.replaceAll("\"", """);
    sx.replaceAll("<", "&#60;");
    sx.replaceAll(">", "&#62;");
    sx.replaceAll("^", "&#94;");
    sx.replaceAll("%", "&#37;");
    return sx.toString();
}
Also used : StringEx(com.twinsoft.util.StringEx)

Example 24 with StringEx

use of com.twinsoft.util.StringEx in project convertigo by convertigo.

the class XMLUtils method simplePrettyPrintDOM.

public static String simplePrettyPrintDOM(String sDocument) {
    StringEx sxDocument = new StringEx(sDocument);
    sxDocument.replaceAll(">", ">\n");
    return sxDocument.toString();
}
Also used : StringEx(com.twinsoft.util.StringEx)

Example 25 with StringEx

use of com.twinsoft.util.StringEx in project convertigo by convertigo.

the class HTTPStatement method parse.

private String parse(String httpVariableName) {
    StringEx variableName = new StringEx(httpVariableName);
    variableName.replaceAll(".", "");
    variableName.replaceAll("[", "");
    variableName.replaceAll("]", "");
    variableName.replaceAll("(", "");
    variableName.replaceAll(")", "");
    return variableName.toString();
}
Also used : StringEx(com.twinsoft.util.StringEx)

Aggregations

StringEx (com.twinsoft.util.StringEx)30 EngineException (com.twinsoft.convertigo.engine.EngineException)14 IOException (java.io.IOException)13 Statement (java.sql.Statement)10 SQLException (java.sql.SQLException)9 File (java.io.File)7 PreparedStatement (java.sql.PreparedStatement)7 Document (org.w3c.dom.Document)5 ResultSet (java.sql.ResultSet)4 HttpConnector (com.twinsoft.convertigo.beans.connectors.HttpConnector)3 Element (org.w3c.dom.Element)3 AbstractHttpTransaction (com.twinsoft.convertigo.beans.transactions.AbstractHttpTransaction)2 RequestableHttpVariable (com.twinsoft.convertigo.beans.variables.RequestableHttpVariable)2 RequestableVariable (com.twinsoft.convertigo.beans.variables.RequestableVariable)2 StringReader (java.io.StringReader)2 StringWriter (java.io.StringWriter)2 MalformedURLException (java.net.MalformedURLException)2 SimpleDateFormat (java.text.SimpleDateFormat)2 ArrayList (java.util.ArrayList)2 DocumentBuilder (javax.xml.parsers.DocumentBuilder)2