Package com.medallia.spider.sttools

Examples of com.medallia.spider.sttools.StTool


    pageStGroup = new StringTemplateGroup("PageStGroup") {
      @Override public String getFileNameFromTemplateName(String name) {
        return super.getFileNameFromTemplateName(findPathForTemplate(name));
      }
      @Override public StringTemplate getEmbeddedInstanceOf(StringTemplate enclosingInstance, String name) throws IllegalArgumentException {
        final StTool t = getStTool(name);
        if (t != null) return new StringTemplate() {
          @Override public int write(StringTemplateWriter out) throws IOException {
            String s = t.render(this).toString();
            out.write(s);
            return s.length();
          }
        };
        return super.getEmbeddedInstanceOf(enclosingInstance, name);
View Full Code Here


    final StringTemplateGroup stGroup = new StringTemplateGroup("StRenderer") {
      @Override public String getFileNameFromTemplateName(String name) {
        return super.getFileNameFromTemplateName(ST_TEMPLATE_PATH_TL.get().findPathForTemplate(name));
      }
      @Override public StringTemplate getEmbeddedInstanceOf(StringTemplate enclosingInstance, String name) throws IllegalArgumentException {
        final StTool t = stToolProvider.getStTool(name);
        if (t != null) return withEnclosing(enclosingInstance, new StringTemplate(this, name) {
          @Override public int write(StringTemplateWriter out) throws IOException {
            // Use ASTExpr to render since the code for using AttributeRenderer is there
            return new ASTExpr(null, null, null).writeAttribute(this, t.render(this), out);
          }
        });
        return super.getEmbeddedInstanceOf(enclosingInstance, name);
      }
      private StringTemplate withEnclosing(StringTemplate enclosingInstance, StringTemplate st) {
View Full Code Here

    final StringTemplateGroup stGroup = new StringTemplateGroup("StRenderer") {
      @Override public String getFileNameFromTemplateName(String name) {
        return super.getFileNameFromTemplateName(ST_TEMPLATE_PATH_TL.get().findPathForTemplate(name));
      }
      @Override public StringTemplate getEmbeddedInstanceOf(StringTemplate enclosingInstance, String name) throws IllegalArgumentException {
        final StTool t = stToolProvider.getStTool(name);
        if (t != null) return withEnclosing(enclosingInstance, new StringTemplate(this, name) {
          @Override public int write(StringTemplateWriter out) throws IOException {
            // Use ASTExpr to render since the code for using AttributeRenderer is there
            return new ASTExpr(null, null, null).writeAttribute(this, t.render(this), out);
          }
        });
        return super.getEmbeddedInstanceOf(enclosingInstance, name);
      }
      private StringTemplate withEnclosing(StringTemplate enclosingInstance, StringTemplate st) {
View Full Code Here

    pageStGroup = new StringTemplateGroup("PageStGroup") {
      @Override public String getFileNameFromTemplateName(String name) {
        return super.getFileNameFromTemplateName(findPathForTemplate(name));
      }
      @Override public StringTemplate getEmbeddedInstanceOf(StringTemplate enclosingInstance, String name) throws IllegalArgumentException {
        final StTool t = getStTool(name);
        if (t != null) return new StringTemplate() {
          @Override public int write(StringTemplateWriter out) throws IOException {
            String s = t.render(this).toString();
            out.write(s);
            return s.length();
          }
        };
        return super.getEmbeddedInstanceOf(enclosingInstance, name);
View Full Code Here

TOP

Related Classes of com.medallia.spider.sttools.StTool

Copyright © 2018 www.massapicom. 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.