protected void configure()

in velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LinkTool.java [153:218]


    protected void configure(ValueParser props)
    {
        String link = props.getString(URI_KEY);
        if (link != null)
        {
            setFromURI(link);
        }

        String schm = props.getString(SCHEME_KEY);
        if (schm != null)
        {
            setScheme(schm);
        }
        String info = props.getString(USER_KEY);
        if (info != null)
        {
            setUserInfo(info);
        }
        String hst = props.getString(HOST_KEY);
        if (hst != null)
        {
            setHost(hst);
        }
        Integer prt = props.getInteger(PORT_KEY);
        if (prt != null)
        {
            setPort(prt.intValue());
        }
        String pth = props.getString(PATH_KEY);
        if (pth != null)
        {
            setPath(pth);
        }
        String params = props.getString(QUERY_KEY);
        if (params != null)
        {
            setQuery(params);
        }
        String anchor = props.getString(FRAGMENT_KEY);
        if (anchor != null)
        {
            setFragment(anchor);
        }

        String chrst = props.getString(CHARSET_KEY);
        if (chrst != null)
        {
            setCharacterEncoding(chrst);
        }

        Boolean xhtml = props.getBoolean(XHTML_MODE_KEY);
        if (xhtml != null)
        {
            setXHTML(xhtml);
        }
        Boolean addParams = props.getBoolean(APPEND_PARAMS_KEY);
        if (addParams != null)
        {
            setAppendParams(addParams);
        }
        Boolean forceRelative = props.getBoolean(FORCE_RELATIVE_KEY);
        if (forceRelative != null)
        {
            setForceRelative(forceRelative);
        }
    }