Examples of ConfigurationInterpolator


Examples of org.apache.commons.configuration.interpol.ConfigurationInterpolator

     *
     * @return the {@code ConfigurationInterpolator}
     */
    protected ConfigurationInterpolator getInterpolator()
    {
        ConfigurationInterpolator result;
        boolean done;

        // This might create multiple instances under high load,
        // however, always the same instance is returned.
        do
View Full Code Here

Examples of org.apache.commons.configuration.interpol.ConfigurationInterpolator

     * @return the name of the configuration file to be loaded
     */
    protected String constructFileName(
            MultiFileBuilderParametersImpl multiParams)
    {
        ConfigurationInterpolator ci = getInterpolator();
        return String.valueOf(ci.interpolate(multiParams.getFilePattern()));
    }
View Full Code Here

Examples of org.apache.commons.configuration.interpol.ConfigurationInterpolator

         * @return The normalized URI reference.
         */
        @Override
        protected String normalizeURI(String uriref)
        {
            ConfigurationInterpolator ci = ((CatalogManager) catalogManager).getInterpolator();
            String resolved = (ci != null) ? String.valueOf(ci.interpolate(uriref)) : uriref;
            return super.normalizeURI(resolved);
        }
View Full Code Here

Examples of org.apache.commons.configuration.interpol.ConfigurationInterpolator

            lookups.put(key, lookup);
        }

        if (!lookups.isEmpty())
        {
            ConfigurationInterpolator defCI = defConfig.getInterpolator();
            if (defCI != null)
            {
                defCI.registerLookups(lookups);
            }
            resultConfig.getInterpolator().registerLookups(lookups);
        }
    }
View Full Code Here

Examples of org.apache.commons.configuration.interpol.ConfigurationInterpolator

            String basePath = xmlParams.getFileHandler().getBasePath();
            if (basePath != null)
            {
                BeanHelper.setProperty(resolver, "baseDir", basePath);
            }
            ConfigurationInterpolator ci = new ConfigurationInterpolator();
            ci.registerLookups(fetchPrefixLookups());
            BeanHelper.setProperty(resolver, "interpolator", ci);

            xmlParams.setEntityResolver(resolver);
        }
    }
View Full Code Here

Examples of org.apache.commons.configuration.interpol.ConfigurationInterpolator

     * @param defConfig the definition configuration
     */
    private void setUpParentInterpolator(Configuration resultConfig,
            Configuration defConfig)
    {
        parentInterpolator = new ConfigurationInterpolator();
        parentInterpolator.addDefaultLookup(new ConfigurationLookup(
                resultConfig));
        ConfigurationInterpolator defInterpolator = defConfig.getInterpolator();
        if (defInterpolator != null)
        {
            defInterpolator.setParentInterpolator(parentInterpolator);
        }
    }
View Full Code Here

Examples of org.apache.commons.configuration.interpol.ConfigurationInterpolator

     *
     * @return the {@code ConfigurationInterpolator}
     */
    private ConfigurationInterpolator initLocalInterpolator()
    {
        ConfigurationInterpolator ci = new ConfigurationInterpolator()
        {
            @Override
            protected Lookup fetchLookupForPrefix(String prefix)
            {
                return ConfigurationInterpolator
View Full Code Here

Examples of org.apache.commons.configuration.interpol.ConfigurationInterpolator

     * @param value the value that is to be interpolated
     * @return the interpolated value
     */
    protected Object interpolate(Object value)
    {
        ConfigurationInterpolator interpolator =
                getConfiguration().getInterpolator();
        return (interpolator != null) ? interpolator.interpolate(value) : value;
    }
View Full Code Here

Examples of org.apache.commons.configuration2.interpol.ConfigurationInterpolator

    {
        parent.addProperty("tablespaces.tablespace.name", "default");
        parent.addProperty("tablespaces.tablespace(-1).name", "test");
        parent.addProperty("tables.table(0).var", "${brackets:x}");

        ConfigurationInterpolator interpolator = parent.getInterpolator();
        interpolator.registerLookup("brackets", new Lookup() {

            public String lookup(String key) {
                return "(" + key + ")";
            }
View Full Code Here

Examples of org.apache.commons.configuration2.interpol.ConfigurationInterpolator

     * @param value the value to interpolate
     * @return the value with variables substituted
     */
    protected Object interpolate(Object value)
    {
        ConfigurationInterpolator ci = getInterpolator();
        return (ci != null) ? ci.interpolate(value) : value;
    }
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.