You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/10/28 10:02:40 UTC

cvs commit: avalon/merlin/kernel/loader/src/java/org/apache/avalon/merlin KernelConfig.java KernelDefaults.java KernelParameters.java

mcconnell    2003/10/28 01:02:40

  Modified:    merlin/kernel/loader/src/java/org/apache/avalon/merlin
                        KernelConfig.java KernelDefaults.java
                        KernelParameters.java
  Log:
  Update sources to return a String[] for remote repositories, and rename getTargetUrls() to getBlockUrls().
  
  Revision  Changes    Path
  1.2       +29 -18    avalon/merlin/kernel/loader/src/java/org/apache/avalon/merlin/KernelConfig.java
  
  Index: KernelConfig.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/loader/src/java/org/apache/avalon/merlin/KernelConfig.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- KernelConfig.java	27 Oct 2003 23:50:47 -0000	1.1
  +++ KernelConfig.java	28 Oct 2003 09:02:40 -0000	1.2
  @@ -18,8 +18,8 @@
       private boolean m_isInfo = KernelDefaults.isInfoEnabled() ;
       
       /** @todo confirm default value */
  -    private String m_remoteRepositoryUrl = 
  -        KernelDefaults.getRemoteRepositoryUrl() ;
  +    private String[] m_remoteRepositoryUrls = 
  +        KernelDefaults.getRemoteRepositoryUrls() ;
       /** @todo confirm default value */
       private String m_systemRepositoryPath = 
           KernelDefaults.getSystemRepositoryPath() ;
  @@ -38,31 +38,42 @@
       private String m_tempPath = KernelDefaults.getTempPath() ;
       
       /** @todo confirm default value */
  -    private String [] m_targetUrls = KernelDefaults.getTargetUrls() ;
  +    private String [] m_blockUrls = KernelDefaults.getBlockUrls() ;
       
       
  -
  +   /**
  +    * Return TRUE if the kernel is launched in server model.
  +    * @return the server mode policy
  +    */
       public boolean isServer()
       {
           return m_isServer ;
       }
  -
       
  +   /**
  +    * Return the debug policy.  If TRUE debug level logging 
  +    * shall be enabled on all channels.
  +    * @return the debug policy
  +    */
       public boolean isDebugEnabled()
       {
           return m_isDebug ;
       }
   
  -    
  +   /**
  +    * Return the info policy.  If TRUE an environment
  +    * summary is listed during kernel establishment.
  +    * @return the info policy
  +    */
       public boolean isInfoEnabled()
       {
           return m_isInfo ;
       }
   
       
  -    public String getRemoteRepositoryUrl()
  +    public String[] getRemoteRepositoryUrls()
       {
  -        return m_remoteRepositoryUrl ;
  +        return m_remoteRepositoryUrls ;
       }
   
       
  @@ -102,9 +113,9 @@
       }
   
       
  -    public String[] getTargetUrls()
  +    public String[] getBlockUrls()
       {
  -        return m_targetUrls ;
  +        return m_blockUrls ;
       }
   
       
  @@ -178,11 +189,11 @@
   
       
       /**
  -     * @param a_remoteRepositoryUrl The remoteRepositoryUrl to set.
  +     * @param a_remoteRepositoryUrls The remoteRepositoryUrl to set.
        */
  -    public void setRemoteRepositoryUrl( String a_remoteRepositoryUrl )
  +    public void setRemoteRepositoryUrls( String[] a_remoteRepositoryUrls )
       {
  -        m_remoteRepositoryUrl = a_remoteRepositoryUrl ;
  +        m_remoteRepositoryUrls = a_remoteRepositoryUrls ;
       }
   
   
  @@ -196,11 +207,11 @@
   
   
       /**
  -     * @param a_targetUrls The targetUrls to set.
  +     * @param a_blockUrls The blockUrls to set.
        */
  -    public void setTargetUrls( String [] a_targetUrls )
  +    public void setBlockUrls( String [] a_blockUrls )
       {
  -        m_targetUrls = a_targetUrls ;
  +        m_blockUrls = a_blockUrls ;
       }
   
   
  
  
  
  1.3       +23 -10    avalon/merlin/kernel/loader/src/java/org/apache/avalon/merlin/KernelDefaults.java
  
  Index: KernelDefaults.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/loader/src/java/org/apache/avalon/merlin/KernelDefaults.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- KernelDefaults.java	27 Oct 2003 23:50:47 -0000	1.2
  +++ KernelDefaults.java	28 Oct 2003 09:02:40 -0000	1.3
  @@ -120,7 +120,7 @@
       public static final String LIBRARY_PATH_KEY =
           s_keys[10] ;
       
  -    public static final String TARGET_URLS_BASE =
  +    public static final String BLOCK_URLS_BASE =
           "merlin.kernel.targeturls" ;
       public static final String MERLIN_FILE_BASE =
           "merlin.properties" ;
  @@ -228,7 +228,7 @@
           while ( l_list.hasMoreElements() )
           {
               String l_key = ( String ) l_list.nextElement() ;
  -            if ( l_key.startsWith( TARGET_URLS_BASE ) )
  +            if ( l_key.startsWith( BLOCK_URLS_BASE ) )
               {
                   String l_default = System.getProperty( l_key,
                           s_defaults.getProperty( l_key ) ) ;
  @@ -278,14 +278,27 @@
   
       
       /**
  -     * Gets a default value for the remote repo.
  +     * Gets a default value for the remote repositories.
        * 
        * @see org.apache.avalon.merlin.kernel.KernelConfig#
  -     * getRemoteRepositoryUrl()
  +     * getRemoteRepositoryUrls()
        */
  -    public static String getRemoteRepositoryUrl()
  +    public static String[] getRemoteRepositoryUrls()
       {
  -        return s_defaults.getProperty( REMOTE_REPO_KEY ) ;
  +        String [] l_urls = null ;
  +        ArrayList l_urlArray = new ArrayList() ;
  +        Enumeration l_list = s_defaults.keys() ;
  +
  +        while ( l_list.hasMoreElements() )
  +        {
  +            String l_key = ( String ) l_list.nextElement() ;
  +            if ( l_key.startsWith( REMOTE_REPO_KEY ) )
  +            {
  +                l_urlArray.add( s_defaults.getProperty( l_key ) ) ;
  +            }
  +        }
  +        return ( String [] ) l_urlArray.toArray( new String [0] ) ;
  +
       }
   
       
  @@ -362,9 +375,9 @@
        * kernel.  Note that properties are enumerated off of the base key using 
        * dot number notation like base.1, base.2, ... , base.n.
        * 
  -     * @see org.apache.avalon.merlin.kernel.KernelConfig#getTargetUrls()
  +     * @see org.apache.avalon.merlin.kernel.KernelConfig#getBlockUrls()
        */
  -    public static String[] getTargetUrls()
  +    public static String[] getBlockUrls()
       {
           String [] l_urls = null ;
           ArrayList l_urlArray = new ArrayList() ;
  @@ -373,7 +386,7 @@
           while ( l_list.hasMoreElements() )
           {
               String l_key = ( String ) l_list.nextElement() ;
  -            if ( l_key.startsWith( TARGET_URLS_BASE ) )
  +            if ( l_key.startsWith( BLOCK_URLS_BASE ) )
               {
                   l_urlArray.add( s_defaults.getProperty( l_key ) ) ;
               }
  
  
  
  1.2       +7 -7      avalon/merlin/kernel/loader/src/java/org/apache/avalon/merlin/KernelParameters.java
  
  Index: KernelParameters.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/loader/src/java/org/apache/avalon/merlin/KernelParameters.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- KernelParameters.java	24 Oct 2003 06:57:51 -0000	1.1
  +++ KernelParameters.java	28 Oct 2003 09:02:40 -0000	1.2
  @@ -92,12 +92,12 @@
       boolean isInfoEnabled() ;
       
       /**
  -     * Url of a potentially remote repository used to pull depenendencies into 
  -     * the other repositories on artifact misses.
  +     * Urls of a set of potentially remote repository used to pull 
  +     * depenendencies into the other repositories on artifact misses.
        * 
  -     * @return url to the remote repo from where we download jars
  +     * @return urls to the remote repositories from where we download resources
        */
  -    String getRemoteRepositoryUrl() ;
  +    String[] getRemoteRepositoryUrls() ;
       
       /**
        * Path to the user repository base directory where the repository 
  @@ -149,7 +149,7 @@
        * 
        * @return paths/urls to the block.xml file
        */
  -    String [] getTargetUrls() ;
  +    String [] getBlockUrls() ;
       
       /**
        * Gets the path/url to the kernel configuration file.
  
  
  

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