Package org.codehaus.redback.components.registry.commons

Examples of org.codehaus.redback.components.registry.commons.CommonsConfigurationRegistry


        String errMsg = "Unable to load default archiva configuration for FileTypes: ";

        try
        {
            CommonsConfigurationRegistry commonsRegistry = new CommonsConfigurationRegistry();

            // Configure commonsRegistry
            Field fld = commonsRegistry.getClass().getDeclaredField( "configuration" );
            fld.setAccessible( true );
            fld.set( commonsRegistry, new CombinedConfiguration() );
            commonsRegistry.addConfigurationFromResource( "org/apache/archiva/configuration/default-archiva.xml" );

            // Read configuration as it was intended.
            ConfigurationRegistryReader configReader = new ConfigurationRegistryReader();
            Configuration defaultConfig = configReader.read( commonsRegistry );
View Full Code Here


        }

        triggerEvent( ConfigurationEvent.SAVED );

        Registry section = registry.getSection( KEY + ".user" );
        return section == null ? new CommonsConfigurationRegistry( new BaseConfiguration() ) : section;
    }
View Full Code Here

        String errMsg = "Unable to load default archiva configuration for FileTypes: ";

        try
        {
            CommonsConfigurationRegistry commonsRegistry = new CommonsConfigurationRegistry();

            // Configure commonsRegistry
            Field fld = commonsRegistry.getClass().getDeclaredField( "configuration" );
            fld.setAccessible( true );
            fld.set( commonsRegistry, new CombinedConfiguration() );
            commonsRegistry.addConfigurationFromResource(
                "org/apache/archiva/configuration/default-archiva.xml" );

            // Read configuration as it was intended.
            ConfigurationRegistryReader configReader = new ConfigurationRegistryReader();
            Configuration defaultConfig = configReader.read( commonsRegistry );
View Full Code Here

        }

        triggerEvent( ConfigurationEvent.SAVED );

        Registry section = registry.getSection( KEY + ".user" );
        return section == null ? new CommonsConfigurationRegistry( new BaseConfiguration( ) ) : section;
    }
View Full Code Here

TOP

Related Classes of org.codehaus.redback.components.registry.commons.CommonsConfigurationRegistry

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.