avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/packages PhoenixPackageRepository.java
Date Wed, 21 Nov 2001 11:05:26 GMT
donaldp     01/11/21 03:05:26

  Modified:    src/java/org/apache/avalon/phoenix/components/embeddor
                        DefaultEmbeddor.java
  Added:       src/java/org/apache/avalon/phoenix/components/extensions
                        PhoenixPackageRepository.java
  Removed:     src/java/org/apache/avalon/phoenix/components/packages
                        PhoenixPackageRepository.java
  Log:
  Moved PackageRepository to another package ... packages was too easy to confuse with java
packages.
  
  Revision  Changes    Path
  1.36      +1 -1      jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/embeddor/DefaultEmbeddor.java
  
  Index: DefaultEmbeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/embeddor/DefaultEmbeddor.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- DefaultEmbeddor.java	2001/11/21 10:52:59	1.35
  +++ DefaultEmbeddor.java	2001/11/21 11:05:26	1.36
  @@ -483,7 +483,7 @@
           defaults.setParameter( ClassLoaderManager.ROLE,
                                  PREFIX + "classloader.DefaultClassLoaderManager" );
           defaults.setParameter( PackageRepository.ROLE, 
  -                               PREFIX + "packages.PhoenixPackageRepository" );
  +                               PREFIX + "extensions.PhoenixPackageRepository" );
           return defaults;
       }
   
  
  
  
  1.1                  jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/extensions/PhoenixPackageRepository.java
  
  Index: PhoenixPackageRepository.java
  ===================================================================
  package org.apache.avalon.phoenix.components.extensions;
  
  import java.io.File;
  import org.apache.avalon.excalibur.extension.DefaultPackageRepository;
  import org.apache.avalon.excalibur.util.StringUtil;
  import org.apache.avalon.framework.activity.Disposable;
  import org.apache.avalon.framework.activity.Initializable;
  import org.apache.avalon.framework.logger.LogEnabled;
  import org.apache.avalon.framework.logger.Logger;
  import org.apache.avalon.framework.parameters.ParameterException;
  import org.apache.avalon.framework.parameters.Parameterizable;
  import org.apache.avalon.framework.parameters.Parameters;
  import org.apache.avalon.phoenix.interfaces.PackageRepository;
  
  /**
   * PhoenixPackageRepository
   *
   * @author <a href="mailto:peter@apache.org">Peter Donald</a>
   * @version $Revision: 1.1 $ $Date: 2001/11/21 11:05:26 $
   */
  public class PhoenixPackageRepository
      extends DefaultPackageRepository
      implements LogEnabled, Parameterizable, Initializable, Disposable, PackageRepository
  {
      private Logger m_logger;
  
      private String m_path;
  
      public PhoenixPackageRepository()
      {
          super( new File[ 0 ] );
      }
  
      public void enableLogging( final Logger logger )
      {
          m_logger = logger;
      }
  
      public void parameterize( final Parameters parameters )
          throws ParameterException
      {
          final String phoenixHome = parameters.getParameter( "phoenix.home" );
          final String defaultExtPath = phoenixHome + File.separator + "ext";
          m_path = parameters.getParameter( "phoenix.ext.path", defaultExtPath );
      }
  
      public void initialize()
          throws Exception
      {
          final String[] pathElements = StringUtil.split( m_path, "|" );
  
          final File[] dirs = new File[ pathElements.length ];
          for( int i = 0; i < dirs.length; i++ )
          {
              dirs[ i ] = new File( pathElements[ i ] );
          }
  
          setPath( dirs );
  
          scanPath();
      }
  
      public void dispose()
      {
          clearCache();
      }
  
      protected void debug( final String message )
      {
          m_logger.debug( message );
      }
  }
  
  
  

--
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