avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pro...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/configuration DefaultConfigurationRepository.java
Date Fri, 26 Jul 2002 20:03:49 GMT
proyal      2002/07/26 13:03:49

  Modified:    src/java/org/apache/avalon/phoenix/components/configuration
                        DefaultConfigurationRepository.java
  Log:
  Update to latest interfaces
  
  Revision  Changes    Path
  1.9       +16 -1     jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/configuration/DefaultConfigurationRepository.java
  
  Index: DefaultConfigurationRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/configuration/DefaultConfigurationRepository.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultConfigurationRepository.java	11 Dec 2001 10:13:33 -0000	1.8
  +++ DefaultConfigurationRepository.java	26 Jul 2002 20:03:49 -0000	1.9
  @@ -13,6 +13,7 @@
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.phoenix.interfaces.ConfigurationRepository;
  +import org.apache.avalon.phoenix.interfaces.ConfigurationRepositoryMBean;
   
   /**
    * Repository from which all configuration data is retrieved.
  @@ -20,7 +21,7 @@
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    */
   public class DefaultConfigurationRepository
  -    implements ConfigurationRepository
  +    implements ConfigurationRepository, ConfigurationRepositoryMBean
   {
       private static final Resources REZ =
           ResourceManager.getPackageResources( DefaultConfigurationRepository.class );
  @@ -43,6 +44,13 @@
           }
       }
   
  +    public synchronized void removeConfiguration( final String application,
  +                                                  final String block )
  +        throws ConfigurationException
  +    {
  +        m_configurations.remove( application + "." + block );
  +    }
  +
       public synchronized Configuration getConfiguration( final String application,
                                                           final String block )
           throws ConfigurationException
  @@ -57,5 +65,12 @@
           }
   
           return configuration;
  +    }
  +
  +    public boolean hasConfiguration( String application, String block )
  +    {
  +        final String name = application + "." + block;
  +
  +        return m_configurations.containsKey( name );
       }
   }
  
  
  

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


Mime
View raw message