Codota Logo
TextTemplate.processText
Code IndexAdd Codota to your IDE (free)

How to use
processText
method
in
org.nuxeo.common.utils.TextTemplate

Best Java code snippets using org.nuxeo.common.utils.TextTemplate.processText (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: org.nuxeo.common/nuxeo-common

public String processText(InputStream in) throws IOException {
  String text = IOUtils.toString(in, UTF_8);
  return processText(text);
}
origin: org.nuxeo.common/nuxeo-common

public void processText(InputStream is, OutputStreamWriter os) throws IOException {
  String text = IOUtils.toString(is, UTF_8);
  text = processText(text);
  os.write(text);
}
origin: org.nuxeo.elasticsearch/nuxeo-elasticsearch-audit

public String expandQueryVariables(String query, Map<String, Object> params) {
  if (params != null && params.size() > 0) {
    TextTemplate tmpl = new TextTemplate();
    for (String key : params.keySet()) {
      Object val = params.get(key);
      if (val == null) {
        continue;
      } else if (val instanceof Calendar) {
        tmpl.setVariable(key, Long.toString(((Calendar) val).getTime().getTime()));
      } else if (val instanceof Date) {
        tmpl.setVariable(key, Long.toString(((Date) val).getTime()));
      } else {
        tmpl.setVariable(key, val.toString());
      }
    }
    query = tmpl.processText(query);
  }
  return query;
}
origin: org.nuxeo.common/nuxeo-common

try (InputStream is = new FileInputStream(in);
   OutputStreamWriter os = new OutputStreamWriter(new FileOutputStream(out), "UTF-8")) {
  processText(is, os);
origin: org.nuxeo.runtime/nuxeo-launcher-commons

ttProps.put(PARAM_DB_PWD, dbPassword);
TextTemplate tt = new TextTemplate(ttProps);
String url = tt.processText(connectionUrl);
Properties conProps = new Properties();
conProps.put("user", dbUser);
origin: org.nuxeo.runtime/nuxeo-launcher-commons

/**
 * Read the classpath parameter from the template and expand parameters with their value. It allow classpath of the
 * form ${nuxeo.home}/nxserver/bundles/...
 *
 * @param template The name of the template
 */
// VisibleForTesting
String getClasspathForTemplate(String template) {
  String classPath = configurationGenerator.getUserConfig().getProperty(template + PARAM_CHECK_CLASSPATH_SUFFIX);
  TextTemplate templateParser = new TextTemplate(configurationGenerator.getUserConfig());
  return templateParser.processText(classPath);
}
origin: org.nuxeo.runtime/nuxeo-launcher-commons

ttProps.put(PARAM_DB_PWD, dbPassword);
TextTemplate tt = new TextTemplate(ttProps);
String url = tt.processText(connectionUrl);
Properties conProps = new Properties();
conProps.put("user", dbUser);
org.nuxeo.common.utilsTextTemplateprocessText

Popular methods of TextTemplate

  • <init>
  • processDirectory
    Recursively process each file from "in" directory to "out" directory.
  • initFreeMarker
    Initialize FreeMarker data model from Java properties. Variables in the form " foo.bar" (String with
  • preprocessVars
  • processFreemarker
  • processString
    That method is not recursive. It processes the given text only once.
  • setFreemarkerParsingExtensions
  • setKeepEncryptedAsVar
    Whether to replace or not the variables which value is encrypted.
  • setTextParsingExtensions
  • setTrim
    Set to true in order to trim invisible characters (spaces) from values.
  • setVariable
    If adding multiple variables, prefer use of #setVariables(Map)
  • unescape
    unescape variables
  • setVariable,
  • unescape

Popular in Java

  • Finding current android device location
  • startActivity (Activity)
  • getSharedPreferences (Context)
  • onCreateOptionsMenu (Activity)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now