Examples of ValueParser


Examples of net.windwards.options.valueparsers.ValueParser

    public void testAddParser() throws Exception {
        class MyOptions {
            @Option public BigInteger option;
        }

        OptionDescription.parsers.put(BigInteger.class, new ValueParser() {
            public Object parse(OptionDescription desc, Class<?> type, String value) {
                return new BigInteger(value);
            }
        });
View Full Code Here

Examples of org.apache.fulcrum.parser.ValueParser

        assertNotNull(group);
       
        Field userNameField = group.get("Username");
       
        ParserService ps = (ParserService) this.resolve( ParserService.class.getName() );
        ValueParser pp = ps.getParser(DefaultParameterParser.class);
       
        pp.setString(userNameField.getKey(), "Joe");
        userNameField.init(pp);
        userNameField.validate();
       
        LoginForm form = new LoginForm();
        group.setProperties(form);
View Full Code Here

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

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

     */
    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

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

     */
    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

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

     * @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

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

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

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

     * @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

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

     * @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

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

    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
TOP
Copyright © 2018 www.massapi.com. 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.