Package org.apache.archiva.redback.components.registry

Examples of org.apache.archiva.redback.components.registry.RegistryException


        if ( !writeFile( "user configuration", userConfigFilename, contents ) )
        {
            fileLocation = altConfigFilename;
            if ( !writeFile( "alternative configuration", altConfigFilename, contents ) )
            {
                throw new RegistryException(
                    "Unable to create configuration file in either user [" + userConfigFilename + "] or alternative ["
                        + altConfigFilename
                        + "] locations on disk, usually happens when not allowed to write to those locations."
                );
            }
View Full Code Here


            {
                fileConfiguration.save();
            }
            catch ( ConfigurationException e )
            {
                throw new RegistryException( e.getMessage(), e );
            }
        }
        else
        {
            throw new RegistryException( "Can only save file-based configurations" );
        }
    }
View Full Code Here

                logger.debug( "Loading properties configuration from classloader resource: {}", resource );
                configuration.addConfiguration( new PropertiesConfiguration( resource ), null, prefix );
            }
            catch ( ConfigurationException e )
            {
                throw new RegistryException(
                    "Unable to add configuration from resource '" + resource + "': " + e.getMessage(), e );
            }
        }
        else if ( resource.endsWith( ".xml" ) )
        {
            try
            {
                logger.debug( "Loading XML configuration from classloader resource: {}", resource );
                configuration.addConfiguration( new XMLConfiguration( resource ), null, prefix );
            }
            catch ( ConfigurationException e )
            {
                throw new RegistryException(
                    "Unable to add configuration from resource '" + resource + "': " + e.getMessage(), e );
            }
        }
        else
        {
            throw new RegistryException(
                "Unable to add configuration from resource '" + resource + "': unrecognised type" );
        }
    }
View Full Code Here

                logger.debug( "Loading properties configuration from file: {}", file );
                configuration.addConfiguration( new PropertiesConfiguration( file ), null, prefix );
            }
            catch ( ConfigurationException e )
            {
                throw new RegistryException(
                    "Unable to add configuration from file '" + file.getName() + "': " + e.getMessage(), e );
            }
        }
        else if ( file.getName().endsWith( ".xml" ) )
        {
            try
            {
                logger.debug( "Loading XML configuration from file: {}", file );
                configuration.addConfiguration( new XMLConfiguration( file ), null, prefix );
            }
            catch ( ConfigurationException e )
            {
                throw new RegistryException(
                    "Unable to add configuration from file '" + file.getName() + "': " + e.getMessage(), e );
            }
        }
        else
        {
            throw new RegistryException(
                "Unable to add configuration from file '" + file.getName() + "': unrecognised type" );
        }
    }
View Full Code Here

            {
                fileConfiguration.save();
            }
            catch ( ConfigurationException e )
            {
                throw new RegistryException( e.getMessage(), e );
            }
        }
        else
        {
            throw new RegistryException( "Can only save file-based configurations" );
        }
    }
View Full Code Here

                logger.debug( "Loading properties configuration from classloader resource: {}", resource );
                configuration.addConfiguration( new PropertiesConfiguration( resource ), null, prefix );
            }
            catch ( ConfigurationException e )
            {
                throw new RegistryException(
                    "Unable to add configuration from resource '" + resource + "': " + e.getMessage(), e );
            }
        }
        else if ( resource.endsWith( ".xml" ) )
        {
            try
            {
                logger.debug( "Loading XML configuration from classloader resource: {}", resource );
                configuration.addConfiguration( new XMLConfiguration( resource ), null, prefix );
            }
            catch ( ConfigurationException e )
            {
                throw new RegistryException(
                    "Unable to add configuration from resource '" + resource + "': " + e.getMessage(), e );
            }
        }
        else
        {
            throw new RegistryException(
                "Unable to add configuration from resource '" + resource + "': unrecognised type" );
        }
    }
View Full Code Here

                logger.debug( "Loading properties configuration from file: {}", file );
                configuration.addConfiguration( new PropertiesConfiguration( file ), null, prefix );
            }
            catch ( ConfigurationException e )
            {
                throw new RegistryException(
                    "Unable to add configuration from file '" + file.getName() + "': " + e.getMessage(), e );
            }
        }
        else if ( file.getName().endsWith( ".xml" ) )
        {
            try
            {
                logger.debug( "Loading XML configuration from file: {}", file );
                configuration.addConfiguration( new XMLConfiguration( file ), null, prefix );
            }
            catch ( ConfigurationException e )
            {
                throw new RegistryException(
                    "Unable to add configuration from file '" + file.getName() + "': " + e.getMessage(), e );
            }
        }
        else
        {
            throw new RegistryException(
                "Unable to add configuration from file '" + file.getName() + "': unrecognised type" );
        }
    }
View Full Code Here

        if ( !writeFile( "user configuration", userConfigFilename, contents ) )
        {
            fileLocation = altConfigFilename;
            if ( !writeFile( "alternative configuration", altConfigFilename, contents ) )
            {
                throw new RegistryException(
                    "Unable to create configuration file in either user [" + userConfigFilename + "] or alternative ["
                        + altConfigFilename
                        + "] locations on disk, usually happens when not allowed to write to those locations." );
            }
        }
View Full Code Here

        if ( !writeFile( "user configuration", userConfigFilename, contents ) )
        {
            fileLocation = altConfigFilename;
            if ( !writeFile( "alternative configuration", altConfigFilename, contents ) )
            {
                throw new RegistryException(
                    "Unable to create configuration file in either user [" + userConfigFilename + "] or alternative ["
                        + altConfigFilename
                        + "] locations on disk, usually happens when not allowed to write to those locations." );
            }
        }
View Full Code Here

        if ( !writeFile( "user configuration", userConfigFilename, contents ) )
        {
            fileLocation = altConfigFilename;
            if ( !writeFile( "alternative configuration", altConfigFilename, contents ) )
            {
                throw new RegistryException(
                    "Unable to create configuration file in either user [" + userConfigFilename + "] or alternative ["
                        + altConfigFilename
                        + "] locations on disk, usually happens when not allowed to write to those locations." );
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.archiva.redback.components.registry.RegistryException

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.