avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: avalon-phoenix/src/java/org/apache/avalon/phoenix/components/configuration FileSystemPersistentConfigurationRepository.java
Date Fri, 04 Apr 2003 10:59:48 GMT
donaldp     2003/04/04 02:59:48

  Modified:    src/java/org/apache/avalon/phoenix/components/configuration
                        FileSystemPersistentConfigurationRepository.java
  Log:
  Add some brackets.
  
  Revision  Changes    Path
  1.18      +13 -9     avalon-phoenix/src/java/org/apache/avalon/phoenix/components/configuration/FileSystemPersistentConfigurationRepository.java
  
  Index: FileSystemPersistentConfigurationRepository.java
  ===================================================================
  RCS file: /home/cvs/avalon-phoenix/src/java/org/apache/avalon/phoenix/components/configuration/FileSystemPersistentConfigurationRepository.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- FileSystemPersistentConfigurationRepository.java	22 Mar 2003 12:07:08 -0000	1.17
  +++ FileSystemPersistentConfigurationRepository.java	4 Apr 2003 10:59:48 -0000	1.18
  @@ -93,7 +93,8 @@
    * @see org.apache.excalibur.configuration.merged.ConfigurationMerger
    * @see org.apache.excalibur.configuration.merged.ConfigurationSplitter
    */
  -public class FileSystemPersistentConfigurationRepository extends AbstractLogEnabled
  +public class FileSystemPersistentConfigurationRepository
  +    extends AbstractLogEnabled
       implements ConfigurationRepository, Contextualizable, Configurable, Initializable,
       ConfigurationRepositoryMBean
   {
  @@ -119,16 +120,16 @@
   
       public void configure( final Configuration configuration ) throws ConfigurationException
       {
  -        this.m_storageDirectory = new File( constructStoragePath( configuration ) );
  +        m_storageDirectory = new File( constructStoragePath( configuration ) );
   
           try
           {
  -            FileUtil.forceMkdir( this.m_storageDirectory );
  +            FileUtil.forceMkdir( m_storageDirectory );
           }
           catch( IOException e )
           {
               final String message = REZ.getString( "config.error.dir.invalid",
  -                                                  this.m_storageDirectory );
  +                                                  m_storageDirectory );
   
               throw new ConfigurationException( message, e );
   
  @@ -175,7 +176,6 @@
           throws IOException, SAXException, ConfigurationException
       {
           final File[] apps = m_storageDirectory.listFiles( new ConfigurationDirectoryFilter()
);
  -
           for( int i = 0; i < apps.length; i++ )
           {
               loadConfigurations( apps[ i ] );
  @@ -199,8 +199,10 @@
                                                             builder.buildFromFile( blocks[
i ] ) );
   
               if( getLogger().isDebugEnabled() )
  +            {
                   getLogger().debug( "Loaded persistent configuration [app: " + app
                                      + ", block: " + block + "]" );
  +            }
           }
       }
   
  @@ -210,13 +212,15 @@
           throws SAXException, IOException, ConfigurationException
       {
           final DefaultConfigurationSerializer serializer = new DefaultConfigurationSerializer();
  -        final File directory = new File( this.m_storageDirectory, application );
  +        final File directory = new File( m_storageDirectory, application );
   
           FileUtil.forceMkdir( directory );
   
           if( getLogger().isDebugEnabled() )
  +        {
               getLogger().debug( "Serializing configuration to disk [app: " + application
                                  + ", block: " + block + "]" );
  +        }
   
           serializer.setIndent( true );
           serializer.serializeToFile( new File( directory, block + ".xml" ), configuration
);
  @@ -344,8 +348,8 @@
   
       public boolean hasConfiguration( final String application, final String block )
       {
  -        return m_mergedConfigurations.hasConfiguration( application, block )
  -            || m_transientConfigurations.hasConfiguration( application, block )
  -            || m_persistedConfigurations.hasConfiguration( application, block );
  +        return m_mergedConfigurations.hasConfiguration( application, block ) ||
  +            m_transientConfigurations.hasConfiguration( application, block ) ||
  +            m_persistedConfigurations.hasConfiguration( application, block );
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message