avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/context DefaultContextualizationService.java
Date Thu, 27 Feb 2003 23:14:50 GMT
mcconnell    2003/02/27 15:14:50

  Modified:    assembly/src/java/org/apache/avalon/assembly/lifecycle/context
                        DefaultContextualizationService.java
  Log:
  Updated to support ContextDirective argument when invoking a contextualizer.
  
  Revision  Changes    Path
  1.14      +11 -11    avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/context/DefaultContextualizationService.java
  
  Index: DefaultContextualizationService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/context/DefaultContextualizationService.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DefaultContextualizationService.java	7 Feb 2003 15:39:11 -0000	1.13
  +++ DefaultContextualizationService.java	27 Feb 2003 23:14:49 -0000	1.14
  @@ -98,7 +98,7 @@
               throw new NullPointerException( "object" );
           }
   
  -        Context context = appliance.getContext();
  +        Map context = appliance.getContextMap();
   
           if( context != null )
           {
  @@ -114,17 +114,16 @@
                   if( getLogger().isDebugEnabled() )
                   {
                       final String message = 
  -                      "activating custom provider: " + provider
  +                      "activating custom context provider: " + provider
                         + " for appliance: " + appliance;
                       getLogger().debug( message );
                   }
   
                   try
                   {
  -                    //Contextualization handler = (Contextualization) provider.access();
                       Contextualization handler = (Contextualization) provider.resolve( this
);
  -                    handler.contextualize( object, context );
  -                    provider.release( handler, this ); // ## new
  +                    handler.contextualize( appliance.getContextDirective(), object, context
);
  +                    provider.release( handler, this );
                       return;
                   }
                   catch( Throwable e )
  @@ -135,12 +134,13 @@
                   }
               }
   
  -            //
  -            // otherwise, its classic Avalon contextulization
  -            //
  -
               if( object instanceof Contextualizable )
               {
  +
  +                //
  +                // otherwise, its classic Avalon contextulization
  +                //
  +
                   if( getLogger().isDebugEnabled() )
                   {
                       final String message = appliance.toString();
  @@ -148,7 +148,7 @@
                   }
                   try
                   {
  -                    ((Contextualizable)object).contextualize( context );
  +                    ((Contextualizable)object).contextualize( new DefaultContext( context
) );
                   }
                   catch( ContextException e )
                   {
  
  
  

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


Mime
View raw message