Package org.apache.velocity.tools.generic

Examples of org.apache.velocity.tools.generic.ValueParser


    context.put("sorter", new SortTool());
    context.put("math", new MathTool());
    context.put("alternator", new AlternatorTool());
    context.put("comparisonDate", new ComparisonDateTool());
    context.put("iterator", new IteratorTool());
    context.put("parser", new ValueParser());
  }
View Full Code Here


     */
    public void configure(Map params)
    {
        if (params != null)
        {
            ValueParser parser = new ValueParser(params);
            safeMode = parser.getBoolean(SAFE_MODE_KEY, true);
        }

        this.context = (ViewContext)params.get(ViewToolContext.CONTEXT_KEY);
        this.request = (HttpServletRequest)params.get(ViewContext.REQUEST);
        this.session = request.getSession(false);
View Full Code Here

     */
    public void configure(Map params)
    {
        if (params != null)
        {
            ValueParser parser = new ValueParser(params);
            safeMode = parser.getBoolean(SAFE_MODE_KEY, true);

            this.context = (ViewContext)params.get(ViewToolContext.CONTEXT_KEY);
            this.request = (HttpServletRequest)params.get(ViewContext.REQUEST);
            this.session = request.getSession(false);
            this.application = (ServletContext)params.get(ViewContext.SERVLET_CONTEXT_KEY);
View Full Code Here

     * @param params Map of configuration parameters
     * @since VelocityTools 1.3
     */
    public void configure(Map params)
    {
        ValueParser parser = new ValueParser(params);
        Boolean selfAbsolute = parser.getBoolean(SELF_ABSOLUTE_KEY);
        if (selfAbsolute != null)
        {
            setSelfAbsolute(selfAbsolute.booleanValue());
        }
        Boolean selfParams = parser.getBoolean(SELF_INCLUDE_PARAMETERS_KEY);
        if (selfParams != null)
        {
            setSelfIncludeParameters(selfParams.booleanValue());
        }
        Boolean autoIgnoreParams = parser.getBoolean(AUTO_IGNORE_PARAMETERS_KEY);
        if (autoIgnoreParams != null)
        {
            setAutoIgnoreParameters(autoIgnoreParams.booleanValue());
        }
    }
View Full Code Here

     */
    public void configure(Map params)
    {
        if (params != null)
        {
            ValueParser parser = new ValueParser(params);
            safeMode = parser.getBoolean(SAFE_MODE_KEY, true);
        }
    }
View Full Code Here

     * @param params Map of configuration parameters
     * @since VelocityTools 1.3
     */
    public void configure(Map params)
    {
        ValueParser parser = new ValueParser(params);
        Boolean selfAbsolute = parser.getBoolean(SELF_ABSOLUTE_KEY);
        if (selfAbsolute != null)
        {
            setSelfAbsolute(selfAbsolute.booleanValue());
        }
        Boolean selfParams = parser.getBoolean(SELF_INCLUDE_PARAMETERS_KEY);
        if (selfParams != null)
        {
            setSelfIncludeParameters(selfParams.booleanValue());
        }
    }
View Full Code Here

     * @param subkey subkey to search for
     * @return the map of found values
     */
    @Override
    protected ValueParser getSubkey(String subkey) {
        ValueParser submap = super.getSubkey(subkey);
        if (submap != null)
        {
            /* expand singleton arrays to reflect request.getParameter behaviour */
            submap = new ValueParser(expandSingletonArrays(submap));
        }
        return submap;
    }
View Full Code Here

    public static final String AUTO_IGNORE_PARAMETERS_KEY = "auto-ignore-parameters";

    @Deprecated
    public void configure(Map params)
    {
        ValueParser parser = new ValueParser(params);
        Boolean selfAbsolute = parser.getBoolean(SELF_ABSOLUTE_KEY);
        if (selfAbsolute != null)
        {
            setSelfAbsolute(selfAbsolute.booleanValue());
        }
        Boolean selfParams = parser.getBoolean(SELF_INCLUDE_PARAMETERS_KEY);
        if (selfParams != null)
        {
            setSelfIncludeParameters(selfParams.booleanValue());
        }
        Boolean autoIgnoreParams = parser.getBoolean(AUTO_IGNORE_PARAMETERS_KEY);
        if (autoIgnoreParams != null)
        {
            setAutoIgnoreParameters(autoIgnoreParams.booleanValue());
        }
    }
View Full Code Here

        }
    }

    public void configure(Map params)
    {
        ValueParser parser = new ValueParser(params);
        int depth = parser.getInt(KEY_PARSE_DEPTH, DEFAULT_PARSE_DEPTH);
        setParseDepth(depth);
    }
View Full Code Here

     * @param subkey subkey to search for
     * @return the map of found values
     */
    @Override
    protected ValueParser getSubkey(String subkey) {
        ValueParser submap = super.getSubkey(subkey);
        if (submap != null)
        {
            /* expand singleton arrays to reflect request.getParameter behaviour */
            submap = new ValueParser(expandSingletonArrays(submap));
        }
        return submap;
    }
View Full Code Here

TOP

Related Classes of org.apache.velocity.tools.generic.ValueParser

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.