avalon-dev 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/phoenix/engine/phases StartupPhase.java
Date Mon, 23 Apr 2001 10:49:44 GMT
donaldp     01/04/23 03:49:43

  Modified:    src/java/org/apache/phoenix/engine
                        DefaultServerApplication.java
               src/java/org/apache/phoenix/engine/blocks
                        DefaultBlockContext.java
               src/java/org/apache/phoenix/engine/facilities/classloader
                        DefaultClassLoaderManager.java SarClassLoader.java
               src/java/org/apache/phoenix/engine/facilities/log
                        DefaultLogManager.java
               src/java/org/apache/phoenix/engine/facilities/policy
                        DefaultPolicy.java
               src/java/org/apache/phoenix/engine/phases StartupPhase.java
  Log:
  Update to reflect context changes.
  
  Revision  Changes    Path
  1.20      +2 -0      jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine/DefaultServerApplication.java
  
  Index: DefaultServerApplication.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine/DefaultServerApplication.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- DefaultServerApplication.java	2001/04/22 08:06:33	1.19
  +++ DefaultServerApplication.java	2001/04/23 10:49:21	1.20
  @@ -24,6 +24,7 @@
   import org.apache.avalon.configuration.Configuration;
   import org.apache.avalon.configuration.ConfigurationException;
   import org.apache.avalon.context.Context;
  +import org.apache.avalon.context.ContextException;
   import org.apache.avalon.context.Contextualizable;
   import org.apache.avalon.context.DefaultContext;
   import org.apache.phoenix.engine.blocks.BlockDAG;
  @@ -84,6 +85,7 @@
       }
   
       public void contextualize( final Context context )
  +        throws ContextException
       {
           //save it to contextualize policy/logManager/etc
           final DefaultContext newContext = new DefaultContext( context );
  
  
  
  1.7       +22 -4     jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine/blocks/DefaultBlockContext.java
  
  Index: DefaultBlockContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine/blocks/DefaultBlockContext.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DefaultBlockContext.java	2001/04/19 02:16:01	1.6
  +++ DefaultBlockContext.java	2001/04/23 10:49:25	1.7
  @@ -8,7 +8,9 @@
   package org.apache.phoenix.engine.blocks;
   
   import java.io.File;
  +import org.apache.avalon.CascadingRuntimeException;
   import org.apache.avalon.context.Context;
  +import org.apache.avalon.context.ContextException;
   import org.apache.avalon.context.DefaultContext;
   import org.apache.excalibur.thread.ThreadPool;
   import org.apache.log.Logger;
  @@ -24,8 +26,8 @@
       extends DefaultContext
       implements BlockContext
   {
  -    protected ThreadManager  m_threadManager;
  -    protected Logger         m_baseLogger;
  +    private ThreadManager  m_threadManager;
  +    private Logger         m_baseLogger;
   
       public DefaultBlockContext( final Logger logger, final ThreadManager threadManager
)
       {
  @@ -48,7 +50,15 @@
        */
       public File getBaseDirectory()
       {
  -        return (File)get( APP_HOME_DIR );
  +        try
  +        {
  +            return (File)get( APP_HOME_DIR );
  +        }
  +        catch( final ContextException ce )
  +        {
  +            //Should never happen
  +            throw new RuntimeException( "Invalid block context" );
  +        }
       }
   
       /**
  @@ -58,7 +68,15 @@
        */
       public String getName()
       {
  -        return (String)get( NAME );
  +        try
  +        {
  +            return (String)get( NAME );
  +        }
  +        catch( final ContextException ce )
  +        {
  +            //Should never happen
  +            throw new RuntimeException( "Invalid block context" );
  +        }
       }
   
       /**
  
  
  
  1.3       +2 -0      jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine/facilities/classloader/DefaultClassLoaderManager.java
  
  Index: DefaultClassLoaderManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine/facilities/classloader/DefaultClassLoaderManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultClassLoaderManager.java	2001/04/19 02:16:02	1.2
  +++ DefaultClassLoaderManager.java	2001/04/23 10:49:30	1.3
  @@ -13,6 +13,7 @@
   import org.apache.avalon.component.ComponentManager;
   import org.apache.avalon.component.Composable;
   import org.apache.avalon.context.Context;
  +import org.apache.avalon.context.ContextException;
   import org.apache.avalon.context.Contextualizable;
   import org.apache.avalon.context.DefaultContext;
   import org.apache.phoenix.engine.facilities.ClassLoaderManager;
  @@ -28,6 +29,7 @@
       private SarClassLoader   m_classLoader = new SarClassLoader();
   
       public void contextualize( final Context context )
  +        throws ContextException
       {
           m_classLoader.contextualize( context );
       }
  
  
  
  1.4       +2 -0      jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine/facilities/classloader/SarClassLoader.java
  
  Index: SarClassLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine/facilities/classloader/SarClassLoader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SarClassLoader.java	2001/04/19 02:16:02	1.3
  +++ SarClassLoader.java	2001/04/23 10:49:31	1.4
  @@ -17,6 +17,7 @@
   import org.apache.avalon.component.ComponentManager;
   import org.apache.avalon.component.Composable;
   import org.apache.avalon.context.Context;
  +import org.apache.avalon.context.ContextException;
   import org.apache.avalon.context.Contextualizable;
   import org.apache.excalibur.io.ExtensionFileFilter;
   import org.apache.phoenix.engine.SarContextResources;
  @@ -39,6 +40,7 @@
       }
   
       public void contextualize( final Context context )
  +        throws ContextException
       {
           m_baseDirectory = (File)context.get( SarContextResources.APP_HOME_DIR );
       }
  
  
  
  1.4       +2 -0      jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine/facilities/log/DefaultLogManager.java
  
  Index: DefaultLogManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine/facilities/log/DefaultLogManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultLogManager.java	2001/04/19 02:16:02	1.3
  +++ DefaultLogManager.java	2001/04/23 10:49:36	1.4
  @@ -14,6 +14,7 @@
   import org.apache.avalon.configuration.Configuration;
   import org.apache.avalon.configuration.ConfigurationException;
   import org.apache.avalon.context.Context;
  +import org.apache.avalon.context.ContextException;
   import org.apache.avalon.context.Contextualizable;
   import org.apache.avalon.logger.AbstractLoggable;
   import org.apache.log.Category;
  @@ -36,6 +37,7 @@
       protected File          m_baseDirectory;
   
       public void contextualize( final Context context )
  +        throws ContextException
       {
           m_baseName = (String)context.get( "name" );
           if( null == m_baseName ) m_baseName = "<base>";
  
  
  
  1.3       +29 -30    jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine/facilities/policy/DefaultPolicy.java
  
  Index: DefaultPolicy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine/facilities/policy/DefaultPolicy.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultPolicy.java	2001/04/19 02:16:03	1.2
  +++ DefaultPolicy.java	2001/04/23 10:49:39	1.3
  @@ -33,8 +33,7 @@
   import org.apache.avalon.context.Context;
   import org.apache.avalon.context.Contextualizable;
   import org.apache.avalon.context.DefaultContext;
  -import org.apache.avalon.util.PropertyException;
  -import org.apache.avalon.util.PropertyUtil;
  +import org.apache.excalibur.property.PropertyUtil;
   
   /**
    * Policy that extracts information from policy files.
  @@ -45,7 +44,7 @@
       extends AbstractPolicy
       implements Contextualizable, Configurable, Initializable
   {
  -    protected DefaultContext    m_context;
  +    private DefaultContext    m_context;
   
       public void contextualize( final Context context )
       {
  @@ -93,7 +92,7 @@
           permissions.add( new PropertyPermission( "java.vm.specification.name", "read" )
);
       }
   
  -    protected HashMap configureKeyStores( final Configuration[] configurations )
  +    private HashMap configureKeyStores( final Configuration[] configurations )
           throws ConfigurationException
       {
           final HashMap keyStores = new HashMap();
  @@ -124,8 +123,8 @@
           return keyStores;
       }
   
  -    protected void configureGrants( final Configuration[] configurations,
  -                                    final HashMap keyStores )
  +    private void configureGrants( final Configuration[] configurations,
  +                                  final HashMap keyStores )
           throws ConfigurationException
       {
           for( int i = 0; i < configurations.length; i++ )
  @@ -134,7 +133,7 @@
           }
       }
   
  -    protected void configureGrant( final Configuration configuration, final HashMap keyStores
)
  +    private void configureGrant( final Configuration configuration, final HashMap keyStores
)
           throws ConfigurationException
       {
           //<grant signed-by="Fred" code-base="file:${sar.home}/blocks/*" key-store="foo-keystore">
  @@ -166,9 +165,9 @@
                                 keyStores );
       }
   
  -    protected void configurePermissions( final Configuration[] configurations,
  -                                         final Permissions permissions,
  -                                         final HashMap keyStores )
  +    private void configurePermissions( final Configuration[] configurations,
  +                                       final Permissions permissions,
  +                                       final HashMap keyStores )
           throws ConfigurationException
       {
           for( int i = 0; i < configurations.length; i++ )
  @@ -177,9 +176,9 @@
           }
       }
   
  -    protected void configurePermission( final Configuration configuration,
  -                                        final Permissions permissions,
  -                                        final HashMap keyStores )
  +    private void configurePermission( final Configuration configuration,
  +                                      final Permissions permissions,
  +                                      final HashMap keyStores )
           throws ConfigurationException
       {
           final String type = configuration.getAttribute( "class" );
  @@ -199,7 +198,7 @@
           permissions.add( permission );
       }
   
  -    protected String expand( final String value )
  +    private String expand( final String value )
           throws ConfigurationException
       {
           try
  @@ -207,16 +206,16 @@
               final Object resolvedValue = PropertyUtil.resolveProperty( value, m_context,
false );
               return resolvedValue.toString();
           }
  -        catch( final PropertyException pe )
  +        catch( final Exception e )
           {
  -            throw new ConfigurationException( "Error resolving property " + value, pe );
  +            throw new ConfigurationException( "Error resolving property " + value, e );
           }
       }
   
  -    protected Permission createPermission( final String type,
  -                                           final String target,
  -                                           final String actions,
  -                                           final Certificate[] signers )
  +    private Permission createPermission( final String type,
  +                                         final String target,
  +                                         final String actions,
  +                                         final Certificate[] signers )
           throws ConfigurationException
       {
           if( null != signers )
  @@ -268,17 +267,17 @@
           }
       }
   
  -    protected Permission createUnresolvedPermission( final String type,
  -                                                     final String target,
  -                                                     final String actions,
  -                                                     final Certificate[] signers )
  +    private Permission createUnresolvedPermission( final String type,
  +                                                   final String target,
  +                                                   final String actions,
  +                                                   final Certificate[] signers )
       {
           return new UnresolvedPermission( type, target, actions, signers );
       }
   
  -    protected Certificate[] getSigners( final String signedBy,
  -                                        String keyStoreName,
  -                                        final HashMap keyStores )
  +    private Certificate[] getSigners( final String signedBy,
  +                                      String keyStoreName,
  +                                      final HashMap keyStores )
           throws ConfigurationException
       {
           if( null != signedBy && null == keyStoreName )
  @@ -296,9 +295,9 @@
           return signers;
       }
   
  -    protected Certificate[] getCertificates( final String signedBy,
  -                                             final String keyStoreName,
  -                                             final HashMap keyStores )
  +    private Certificate[] getCertificates( final String signedBy,
  +                                           final String keyStoreName,
  +                                           final HashMap keyStores )
           throws ConfigurationException
       {
           final KeyStore keyStore = (KeyStore)keyStores.get( keyStoreName );
  
  
  
  1.10      +2 -0      jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine/phases/StartupPhase.java
  
  Index: StartupPhase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine/phases/StartupPhase.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- StartupPhase.java	2001/04/22 07:57:11	1.9
  +++ StartupPhase.java	2001/04/23 10:49:41	1.10
  @@ -24,6 +24,7 @@
   import org.apache.avalon.configuration.Configurable;
   import org.apache.avalon.configuration.Configuration;
   import org.apache.avalon.context.Context;
  +import org.apache.avalon.context.ContextException;
   import org.apache.avalon.context.Contextualizable;
   import org.apache.avalon.context.DefaultContext;
   import org.apache.avalon.logger.AbstractLoggable;
  @@ -70,6 +71,7 @@
       private Container                   m_container;
   
       public void contextualize( final Context context )
  +        throws ContextException
       {
           final File baseDirectory = (File)context.get( SarContextResources.APP_HOME_DIR
);
           final String name = (String)context.get( SarContextResources.APP_NAME );
  
  
  

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


Mime
View raw message