/** * @see org.apache.velocity.runtime.parser.node.SimpleNode#evaluate(org.apache.velocity.context.InternalContextAdapter) */ public boolean evaluate( InternalContextAdapter context) { return !rsvc.getBoolean(RuntimeConstants.CHECK_EMPTY_OBJECTS, true) || children != null && children.length > 0; } }
/** * @see org.apache.velocity.runtime.parser.node.SimpleNode#evaluate(org.apache.velocity.context.InternalContextAdapter) */ public boolean evaluate( InternalContextAdapter context) { return !rsvc.getBoolean(RuntimeConstants.CHECK_EMPTY_OBJECTS, true) || children != null && children.length > 0; } }
public Object init(InternalContextAdapter context, Object data) throws TemplateInitException { super.init(context, data); strictRef = rsvc.getBoolean(RuntimeConstants.RUNTIME_REFERENCES_STRICT, false); return data; }
/** * @see org.apache.velocity.runtime.parser.node.SimpleNode#evaluate(org.apache.velocity.context.InternalContextAdapter) */ public boolean evaluate( InternalContextAdapter context) { return !rsvc.getBoolean(RuntimeConstants.CHECK_EMPTY_OBJECTS, true) || !MathUtils.isZero(value); }
/** * {@inheritDoc} */ public Object init(InternalContextAdapter context, Object data) throws TemplateInitException { super.init(context, data); strictMode = rsvc.getBoolean(RuntimeConstants.STRICT_MATH, false); return data; }
/** * CTOR, wraps an ICA */ public VMContext( InternalContextAdapter inner, RuntimeServices rsvc ) { localcontextscope = rsvc.getBoolean( RuntimeConstants.VM_CONTEXT_LOCALSCOPE, false ); wrappedContext = inner; innerContext = inner.getBaseContext(); }
/** * @see org.apache.velocity.runtime.parser.node.SimpleNode#evaluate(org.apache.velocity.context.InternalContextAdapter) */ public boolean evaluate( InternalContextAdapter context) { String str = (String)value(context); return str != null && (!rsvc.getBoolean(RuntimeConstants.CHECK_EMPTY_OBJECTS, true) || !str.isEmpty()); }
/** * @see org.apache.velocity.runtime.parser.node.SimpleNode#evaluate(org.apache.velocity.context.InternalContextAdapter) */ public boolean evaluate( InternalContextAdapter context) { return !rsvc.getBoolean(RuntimeConstants.CHECK_EMPTY_OBJECTS, true) || !MathUtils.isZero(value); } }
/** * {@inheritDoc} */ public Object init(InternalContextAdapter context, Object data) throws TemplateInitException { super.init(context, data); strictMode = rsvc.getBoolean(RuntimeConstants.STRICT_MATH, false); return data; }
@Override public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException { super.init(rs, context, node); log = rs.getLog(); //set compressor properties enabled = rs.getBoolean("userdirective.compressJs.enabled", true); jsCompressor = rs.getString("userdirective.compressHtml.jsCompressor", HtmlCompressor.JS_COMPRESSOR_YUI); yuiJsNoMunge = rs.getBoolean("userdirective.compressJs.yuiJsNoMunge", false); yuiJsPreserveAllSemiColons = rs.getBoolean("userdirective.compressJs.yuiJsPreserveAllSemiColons", false); yuiJsLineBreak = rs.getInt("userdirective.compressJs.yuiJsLineBreak", -1); closureOptLevel = rs.getString("userdirective.compressHtml.closureOptLevel", ClosureJavaScriptCompressor.COMPILATION_LEVEL_SIMPLE); }
@Override public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException { super.init(rs, context, node); log = rs.getLog(); //set compressor properties xmlCompressor.setEnabled(rs.getBoolean("userdirective.compressXml.enabled", true)); xmlCompressor.setRemoveComments(rs.getBoolean("userdirective.compressXml.removeComments", true)); xmlCompressor.setRemoveIntertagSpaces(rs.getBoolean("userdirective.compressXml.removeIntertagSpaces", true)); }
@Override public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException { super.init(rs, context, node); log = rs.getLog(); // set compressor properties xmlCompressor.setEnabled(rs.getBoolean("userdirective.compressXml.enabled", true)); xmlCompressor.setRemoveComments(rs.getBoolean("userdirective.compressXml.removeComments", true)); xmlCompressor.setRemoveIntertagSpaces(rs.getBoolean("userdirective.compressXml.removeIntertagSpaces", true)); }
public boolean compareNonNumber(Object left, Object right) { // by default, log and bail String msg = (right instanceof Number ? "Left" : "Right") + " side of comparison operation is not a number at " + StringUtils.formatFileString(this); if (rsvc.getBoolean(RuntimeConstants.RUNTIME_REFERENCES_STRICT, false)) { throw new VelocityException(msg); } log.error(msg); return false; }
@Override public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException { super.init(rs, context, node); log = rs.getLog(); // set compressor properties enabled = rs.getBoolean("userdirective.compressJs.enabled", true); jsCompressor = rs.getString("userdirective.compressHtml.jsCompressor", HtmlCompressor.JS_COMPRESSOR_YUI); yuiJsNoMunge = rs.getBoolean("userdirective.compressJs.yuiJsNoMunge", false); yuiJsPreserveAllSemiColons = rs.getBoolean("userdirective.compressJs.yuiJsPreserveAllSemiColons", false); yuiJsLineBreak = rs.getInt("userdirective.compressJs.yuiJsLineBreak", -1); closureOptLevel = rs.getString("userdirective.compressHtml.closureOptLevel", ClosureJavaScriptCompressor.COMPILATION_LEVEL_SIMPLE); }
/** * {@inheritDoc} */ public Object init(InternalContextAdapter context, Object data) throws TemplateInitException { super.init(context, data); strictMode = rsvc.getBoolean(RuntimeConstants.STRICT_MATH, false); cleanupParserAndTokens(); return data; }
public Object init(InternalContextAdapter context, Object data) throws TemplateInitException { super.init(context, data); strictRef = rsvc.getBoolean(RuntimeConstants.RUNTIME_REFERENCES_STRICT, false); cleanupParserAndTokens(); return data; }
/** * {@inheritDoc} */ public Object init(InternalContextAdapter context, Object data) throws TemplateInitException { super.init(context, data); /* save a literal image now (needed in case of error) */ strictMode = rsvc.getBoolean(RuntimeConstants.STRICT_MATH, false); cleanupParserAndTokens(); return data; }
@Override public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException { super.init(rs, context, node); log = rs.getLog(); //set compressor properties enabled = rs.getBoolean("userdirective.compressCss.enabled", true); yuiCssLineBreak = rs.getInt("userdirective.compressCss.yuiCssLineBreak", -1); }
@Override public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException { super.init(rs, context, node); log = rs.getLog(); // set compressor properties enabled = rs.getBoolean("userdirective.compressCss.enabled", true); yuiCssLineBreak = rs.getInt("userdirective.compressCss.yuiCssLineBreak", -1); }
/** * Initialize members of VelocimacroProxy. called from MacroEntry */ public void init(RuntimeServices rs) { rsvc = rs; log = rs.getLog("macro"); strictArguments = rsvc.getBoolean( RuntimeConstants.VM_ARGUMENTS_STRICT, false); // get the macro call depth limit maxCallDepth = rsvc.getInt(RuntimeConstants.VM_MAX_DEPTH); // get name of the reference that refers to AST block passed to block macro call bodyReference = rsvc.getString(RuntimeConstants.VM_BODY_REFERENCE, "bodyContent"); }