Examples of buildFromFile()


Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

        log.debug("Role File:   " + roleConfigFilename);

        // process configuration files

        DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
        Configuration sysConfig  = builder.buildFromFile(sysConfigFilename);
        Configuration roleConfig = builder.buildFromFile(roleConfigFilename);

        // Create the LoggerManager for Log4J
        LoggerManager lm = new Log4JLoggerManager();
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

        // process configuration files

        DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
        Configuration sysConfig  = builder.buildFromFile(sysConfigFilename);
        Configuration roleConfig = builder.buildFromFile(roleConfigFilename);

        // Create the LoggerManager for Log4J
        LoggerManager lm = new Log4JLoggerManager();

        // Setup the RoleManager
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

        Hierarchy hier = Hierarchy.getDefaultHierarchy();
        LogKitLoggerManager manager = new LogKitLoggerManager(null, hier, null, null);

        DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
        try {
            Configuration c = builder.buildFromFile(cfg);
            Context ctx = new DefaultContext();
            manager.contextualize(ctx);
            manager.configure(c);
        } catch (IllegalArgumentException e) {
            // This happens if the default log-target id-ref specifies a non-existent target
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

        {
            try
            {
                final File rootContext = (File)m_context.get( "context-root" );
                DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
                Configuration debugCategories = builder.buildFromFile( new File( rootContext, debugURL ) );
                final Configuration[] debugCat = debugCategories.getChildren( "category" );
                setupLoggers( targetManager, m_prefix, debugCat );
            }
            catch( ConfigurationException ce )
            {
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

        DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
        MyEntityResolver customResolver = new MyEntityResolver();
        builder.setEntityResolver( new MyEntityResolver() );
        Configuration conf = builder.buildFromFile( TEST_PATH + EXTERNAL_FILE_NAME );
        simpleAssertions( conf );
    }
   
    /**
     * Mock implementation for EntityResolver
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

                String logKitLogCategory = child.getAttribute("category", "cocoon");

                if (logKit != null) {
                    try {
                        final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
                        final Configuration logKitConf = builder.buildFromFile(logKit);
                        logKitManager = new DefaultLogKitManager(org.apache.log.Hierarchy.getDefaultHierarchy());

                        final DefaultContext subcontext = new DefaultContext(this.ctx);
                        File contextDir = (File) this.ctx.get("context-root");
                        subcontext.put("context-root", contextDir);
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

     * @throws SAXException if a parsing error occurs
     */
    public void setUserConfig(File userConfigFile) throws SAXException, IOException {
        try {
            DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
            setUserConfig(cfgBuilder.buildFromFile(userConfigFile));
        } catch (ConfigurationException e) {
            throw new FOPException(e);
        }
    }
   
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

     * @throws IOException In case of a I/O problem
     */
    public void runBatch(File cfgFile)
                throws ConfigurationException, SAXException, IOException {
        DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
        Configuration cfg = cfgBuilder.buildFromFile(cfgFile);
        runBatch(cfg);
    }

    /**
     * Runs the batch
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

        String pathMapperClassName = null;
        String documentBuilderClassName = null;

        try {
            config = builder.buildFromFile(configFile);

            try {
                pathMapperClassName = config.getChild(ELEMENT_PATH_MAPPER).getValue();
                Class pathMapperClass = Class.forName(pathMapperClassName);
                this.mapper = (DocumentIdToPathMapper) pathMapperClass.newInstance();
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

        File configurationFile = new File(configurationFilePath);

        try {
            DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
            Configuration configuration = builder.buildFromFile(configurationFile);
            configure(configuration);
        } catch (Exception e) {
            log.error("Cannot load revision controller configuration! ", e);
        }
    }
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.