tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject cvs commit: jakarta-tapestry/framework/src/test/org/apache/tapestry TestTapestryNotNull.java
Date Tue, 02 Nov 2004 18:59:14 GMT
hlship      2004/11/02 10:59:14

  Modified:    framework/src/test/org/apache/tapestry/enhance
                        TestEnhancedClassValidator.java
                        TestSpecifiedPropertyWorker.java
                        TestParameterPropertyWorker.java
                        TestInjectWorker.java
               framework/src/java/org/apache/tapestry/services/impl
                        InfrastructureObjectProvider.java
                        SymbolSourcesPropertySourceFactory.java
                        ComponentMessagesSourceImpl.java
                        InjectedValueProviderFactory.java
                        MasterInitializer.java ServiceMapImpl.java
                        ExtensionLookupFactory.java PropertySourceImpl.java
                        ComponentConstructorFactoryImpl.java
                        RequestLocaleManagerImpl.java
               framework/src/java/org/apache/tapestry
                        AbstractComponent.java TapestryMessages.java
                        TapestryStrings2.properties
               framework/src/java/org/apache/tapestry/enhance
                        EnhancementOperationImpl.java
                        SpecifiedPropertyWorker.java
                        ComponentConstructorImpl.java
                        ParameterPropertyWorker.java
                        EnhancedClassValidatorImpl.java
                        ForceNonAbstractWorker.java InjectWorker.java
               framework/src/test/org/apache/tapestry/services/impl
                        TestExtensionLookupFactory.java
                        TestBasicInfrastructure.java
                        TestPropertySource.java TestServiceMap.java
               .        .project
               framework/src/java/org/apache/tapestry/engine
                        AbstractEngine.java
               framework/src/java/org/apache/tapestry/spec
                        ParameterSpecification.java
  Removed:     framework/src/java/org/apache/tapestry Defense.java
               framework/src/test/org/apache/tapestry
                        TestTapestryNotNull.java
  Log:
  Bring Tapestry 3.1 up to synch with HiveMind 1.1-alpha-1 (and addition of the ErrorLog).
  
  Revision  Changes    Path
  1.2       +4 -9      jakarta-tapestry/framework/src/test/org/apache/tapestry/enhance/TestEnhancedClassValidator.java
  
  Index: TestEnhancedClassValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/enhance/TestEnhancedClassValidator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestEnhancedClassValidator.java	31 Oct 2004 22:57:41 -0000	1.1
  +++ TestEnhancedClassValidator.java	2 Nov 2004 18:59:13 -0000	1.2
  @@ -14,8 +14,7 @@
   
   package org.apache.tapestry.enhance;
   
  -import org.apache.commons.logging.Log;
  -import org.apache.hivemind.ErrorHandler;
  +import org.apache.hivemind.ErrorLog;
   import org.apache.hivemind.Location;
   import org.apache.hivemind.test.HiveMindTestCase;
   import org.apache.tapestry.spec.IComponentSpecification;
  @@ -70,9 +69,7 @@
   
       public void testIncomplete()
       {
  -        Log log = (Log) newMock(Log.class);
  -        ErrorHandler errorHandler = (ErrorHandler) newMock(ErrorHandler.class);
  -
  +        ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
           Location l = fabricateLocation(11);
   
           MockControl specControl = newControl(IComponentSpecification.class);
  @@ -81,9 +78,8 @@
           spec.getLocation();
           specControl.setReturnValue(l);
   
  -        errorHandler
  +        log
                   .error(
  -                        log,
                           "Method 'public abstract void org.apache.tapestry.enhance.TestEnhancedClassValidator$AbstractBase.foo()' (declared in class org.apache.tapestry.enhance.TestEnhancedClassValidator$AbstractBase) has no implementation in class org.apache.tapestry.enhance.TestEnhancedClassValidator$AbstractBase (or enhanced subclass org.apache.tapestry.enhance.TestEnhancedClassValidator$Incomplete).",
                           l,
                           null);
  @@ -91,8 +87,7 @@
           replayControls();
   
           EnhancedClassValidatorImpl v = new EnhancedClassValidatorImpl();
  -        v.setLog(log);
  -        v.setErrorHandler(errorHandler);
  +        v.setErrorLog(log);
   
           v.validate(AbstractBase.class, Incomplete.class, spec);
   
  
  
  
  1.2       +4 -8      jakarta-tapestry/framework/src/test/org/apache/tapestry/enhance/TestSpecifiedPropertyWorker.java
  
  Index: TestSpecifiedPropertyWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/enhance/TestSpecifiedPropertyWorker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestSpecifiedPropertyWorker.java	29 Oct 2004 17:13:59 -0000	1.1
  +++ TestSpecifiedPropertyWorker.java	2 Nov 2004 18:59:13 -0000	1.2
  @@ -20,9 +20,8 @@
   import java.util.Iterator;
   import java.util.List;
   
  -import org.apache.commons.logging.Log;
   import org.apache.hivemind.ApplicationRuntimeException;
  -import org.apache.hivemind.ErrorHandler;
  +import org.apache.hivemind.ErrorLog;
   import org.apache.hivemind.Location;
   import org.apache.hivemind.service.BodyBuilder;
   import org.apache.hivemind.service.MethodSignature;
  @@ -199,12 +198,10 @@
           op.getBaseClass();
           opc.setReturnValue(BaseComponent.class);
   
  -        Log log = (Log) newMock(Log.class);
  -        ErrorHandler errorHandler = (ErrorHandler) newMock(ErrorHandler.class);
  +        ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
   
  -        errorHandler
  +        log
                   .error(
  -                        log,
                           "Error adding property 'wilma' to class org.apache.tapestry.BaseComponent: Simulated error.",
                           l,
                           ex);
  @@ -212,8 +209,7 @@
           replayControls();
   
           SpecifiedPropertyWorker w = new SpecifiedPropertyWorker();
  -        w.setLog(log);
  -        w.setErrorHandler(errorHandler);
  +        w.setErrorLog(log);
   
           w.performEnhancement(op);
   
  
  
  
  1.3       +10 -17    jakarta-tapestry/framework/src/test/org/apache/tapestry/enhance/TestParameterPropertyWorker.java
  
  Index: TestParameterPropertyWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/enhance/TestParameterPropertyWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestParameterPropertyWorker.java	31 Oct 2004 22:57:41 -0000	1.2
  +++ TestParameterPropertyWorker.java	2 Nov 2004 18:59:13 -0000	1.3
  @@ -17,9 +17,8 @@
   import java.lang.reflect.Modifier;
   import java.util.Collections;
   
  -import org.apache.commons.logging.Log;
   import org.apache.hivemind.ApplicationRuntimeException;
  -import org.apache.hivemind.ErrorHandler;
  +import org.apache.hivemind.ErrorLog;
   import org.apache.hivemind.Location;
   import org.apache.hivemind.service.BodyBuilder;
   import org.apache.hivemind.service.MethodSignature;
  @@ -232,12 +231,10 @@
           op.getBaseClass();
           opc.setReturnValue(BaseComponent.class);
   
  -        Log log = (Log) newMock(Log.class);
  -        ErrorHandler errorHandler = (ErrorHandler) newMock(ErrorHandler.class);
  +        ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
   
  -        errorHandler
  +        log
                   .error(
  -                        log,
                           "Error adding property 'wilma' to class org.apache.tapestry.BaseComponent: Simulated error.",
                           l,
                           ex);
  @@ -245,8 +242,7 @@
           replayControls();
   
           ParameterPropertyWorker w = new ParameterPropertyWorker();
  -        w.setLog(log);
  -        w.setErrorHandler(errorHandler);
  +        w.setErrorLog(log);
   
           w.performEnhancement(op);
   
  @@ -281,26 +277,23 @@
           op.getBaseClass();
           opc.setReturnValue(BaseComponent.class);
   
  -        Log log = (Log) newMock(Log.class);
  -        MockControl ehc = newControl(ErrorHandler.class);
  -        ErrorHandler errorHandler = (ErrorHandler) ehc.getMock();
  +        MockControl logc = newControl(ErrorLog.class);
  +        ErrorLog log = (ErrorLog) logc.getMock();
   
  -        errorHandler
  +        log
                   .error(
  -                        log,
                           "Error adding property 'wilma' to class org.apache.tapestry.BaseComponent: "
                                   + "Parameter 'wilma' must be required or have a default value as it uses direction 'auto'.",
                           l,
                           new ApplicationRuntimeException(""));
   
  -        ehc.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[]
  -        { null, null, null, new TypeMatcher() }));
  +        logc.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[]
  +        { null, null, new TypeMatcher() }));
   
           replayControls();
   
           ParameterPropertyWorker w = new ParameterPropertyWorker();
  -        w.setLog(log);
  -        w.setErrorHandler(errorHandler);
  +        w.setErrorLog(log);
   
           w.performEnhancement(op);
   
  
  
  
  1.3       +18 -19    jakarta-tapestry/framework/src/test/org/apache/tapestry/enhance/TestInjectWorker.java
  
  Index: TestInjectWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/enhance/TestInjectWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestInjectWorker.java	2 Nov 2004 13:30:00 -0000	1.2
  +++ TestInjectWorker.java	2 Nov 2004 18:59:13 -0000	1.3
  @@ -18,9 +18,8 @@
   import java.util.Collections;
   import java.util.List;
   
  -import org.apache.commons.logging.Log;
   import org.apache.hivemind.ApplicationRuntimeException;
  -import org.apache.hivemind.ErrorHandler;
  +import org.apache.hivemind.ErrorLog;
   import org.apache.hivemind.Location;
   import org.apache.hivemind.service.MethodSignature;
   import org.apache.hivemind.test.AggregateArgumentsMatcher;
  @@ -168,9 +167,8 @@
           MockControl pc = newControl(InjectedValueProvider.class);
           InjectedValueProvider p = (InjectedValueProvider) pc.getMock();
   
  -        Log log = (Log) newMock(Log.class);
  -        MockControl ehc = newControl(ErrorHandler.class);
  -        ErrorHandler eh = (ErrorHandler) ehc.getMock();
  +        MockControl logc = newControl(ErrorLog.class);
  +        ErrorLog log = (ErrorLog) logc.getMock();
   
           op.getSpecification();
           opc.setReturnValue(spec);
  @@ -186,15 +184,18 @@
           op.getBaseClass();
           opc.setReturnValue(BaseComponent.class);
   
  -        trainForException(ehc, eh, log, "fred", EnhanceMessages
  -                .locatedValueIsNull("service:barney"), l);
  +        trainForException(
  +                logc,
  +                log,
  +                "fred",
  +                EnhanceMessages.locatedValueIsNull("service:barney"),
  +                l);
   
           replayControls();
   
           InjectWorker w = new InjectWorker();
           w.setProvider(p);
  -        w.setLog(log);
  -        w.setErrorHandler(eh);
  +        w.setErrorLog(log);
   
           w.performEnhancement(op);
   
  @@ -213,9 +214,8 @@
           MockControl pc = newControl(InjectedValueProvider.class);
           InjectedValueProvider p = (InjectedValueProvider) pc.getMock();
   
  -        Log log = (Log) newMock(Log.class);
  -        MockControl ehc = newControl(ErrorHandler.class);
  -        ErrorHandler eh = (ErrorHandler) ehc.getMock();
  +        MockControl logc = newControl(ErrorLog.class);
  +        ErrorLog log = (ErrorLog) logc.getMock();
   
           op.getSpecification();
           opc.setReturnValue(spec);
  @@ -231,7 +231,7 @@
           op.getBaseClass();
           opc.setReturnValue(BaseComponent.class);
   
  -        trainForException(ehc, eh, log, "fred", EnhanceMessages.incompatibleInjectType(
  +        trainForException(logc, log, "fred", EnhanceMessages.incompatibleInjectType(
                   "service:barney",
                   "INJECTED-VALUE",
                   IEngineService.class), l);
  @@ -240,15 +240,14 @@
   
           InjectWorker w = new InjectWorker();
           w.setProvider(p);
  -        w.setLog(log);
  -        w.setErrorHandler(eh);
  +        w.setErrorLog(log);
   
           w.performEnhancement(op);
   
           verifyControls();
       }
   
  -    private void trainForException(MockControl ehc, ErrorHandler eh, Log log, String propertyName,
  +    private void trainForException(MockControl control, ErrorLog log, String propertyName,
               String innerMessage, Location l)
       {
           ApplicationRuntimeException inner = new ApplicationRuntimeException(innerMessage);
  @@ -257,8 +256,8 @@
                   BaseComponent.class,
                   inner);
   
  -        eh.error(log, outerMessage, l, inner);
  -        ehc.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[]
  -        { null, null, null, new TypeMatcher() }));
  +        log.error(outerMessage, l, inner);
  +        control.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[]
  +        { null, null, new TypeMatcher() }));
       }
   }
  
  
  
  1.3       +17 -26    jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/InfrastructureObjectProvider.java
  
  Index: InfrastructureObjectProvider.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/InfrastructureObjectProvider.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InfrastructureObjectProvider.java	16 Sep 2004 00:26:20 -0000	1.2
  +++ InfrastructureObjectProvider.java	2 Nov 2004 18:59:13 -0000	1.3
  @@ -13,8 +13,8 @@
   // limitations under the License.
   
   package org.apache.tapestry.services.impl;
  -import org.apache.commons.logging.Log;
  -import org.apache.hivemind.ErrorHandler;
  +
  +import org.apache.hivemind.ErrorLog;
   import org.apache.hivemind.Location;
   import org.apache.hivemind.internal.Module;
   import org.apache.hivemind.service.ObjectProvider;
  @@ -22,25 +22,22 @@
   import org.apache.tapestry.services.Infrastructure;
   
   /**
  - * An ObjectProvider that streamlines access to the 
  - * central {@link org.apache.tapestry.services.Infrastructure} object.  The locator
  - * for this provider is the name of a property of the Infrastructure. 
  - *
  + * An ObjectProvider that streamlines access to the central
  + * {@link org.apache.tapestry.services.Infrastructure}object. The locator for this provider is the
  + * name of a property of the Infrastructure.
  + * 
    * @author Howard Lewis Ship
    * @since 3.1
    */
   
   public class InfrastructureObjectProvider implements ObjectProvider
   {
  -    private Log _log;
  -    private ErrorHandler _errorHandler;
  +    private ErrorLog _errorLog;
  +
       private Infrastructure _infrastructure;
   
  -    public Object provideObject(
  -        Module contributingModule,
  -        Class propertyType,
  -        String locator,
  -        Location location)
  +    public Object provideObject(Module contributingModule, Class propertyType, String locator,
  +            Location location)
       {
           try
           {
  @@ -48,19 +45,18 @@
           }
           catch (Throwable ex)
           {
  -            _errorHandler.error(
  -                _log,
  -                ImplMessages.unableToReadInfrastructureProperty(locator, _infrastructure, ex),
  -                location,
  -                ex);
  +            _errorLog.error(ImplMessages.unableToReadInfrastructureProperty(
  +                    locator,
  +                    _infrastructure,
  +                    ex), location, ex);
   
               return null;
           }
       }
   
  -    public void setErrorHandler(ErrorHandler handler)
  +    public void setErrorLog(ErrorLog errorLog)
       {
  -        _errorHandler = handler;
  +        _errorLog = errorLog;
       }
   
       public void setInfrastructure(Infrastructure infrastructure)
  @@ -68,9 +64,4 @@
           _infrastructure = infrastructure;
       }
   
  -    public void setLog(Log log)
  -    {
  -        _log = log;
  -    }
  -
  -}
  +}
  \ No newline at end of file
  
  
  
  1.3       +9 -16     jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/SymbolSourcesPropertySourceFactory.java
  
  Index: SymbolSourcesPropertySourceFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/SymbolSourcesPropertySourceFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SymbolSourcesPropertySourceFactory.java	16 Sep 2004 00:26:20 -0000	1.2
  +++ SymbolSourcesPropertySourceFactory.java	2 Nov 2004 18:59:13 -0000	1.3
  @@ -14,31 +14,24 @@
   
   package org.apache.tapestry.services.impl;
   
  -import java.util.List;
  -
  -import org.apache.commons.logging.Log;
   import org.apache.hivemind.ServiceImplementationFactory;
  -import org.apache.hivemind.internal.Module;
  +import org.apache.hivemind.ServiceImplementationFactoryParameters;
   
   /**
  - * Used to create an service instance of {@link  org.apache.tapestry.services.impl.SymbolSourcesPropertySource}.
  - * This is because SSPS needs an instance of {@link org.apache.hivemind.internal.Module}, and there's
  - * no way to do that with hivemind.BuilderFactory.
  - *
  + * Used to create an service instance of
  + * {@link  org.apache.tapestry.services.impl.SymbolSourcesPropertySource}. This is because SSPS
  + * needs an instance of {@link org.apache.hivemind.internal.Module}, and there's no way to do that
  + * with hivemind.BuilderFactory.
  + * 
    * @author Howard Lewis Ship
    * @since 3.1
    */
   public class SymbolSourcesPropertySourceFactory implements ServiceImplementationFactory
   {
   
  -    public Object createCoreServiceImplementation(
  -        String serviceId,
  -        Class serviceInterface,
  -        Log serviceLog,
  -        Module invokingModule,
  -        List parameters)
  +    public Object createCoreServiceImplementation(ServiceImplementationFactoryParameters parameters)
       {
  -        return new SymbolSourcesPropertySource(invokingModule);
  +        return new SymbolSourcesPropertySource(parameters.getInvokingModule());
       }
   
  -}
  +}
  \ No newline at end of file
  
  
  
  1.5       +1 -1      jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/ComponentMessagesSourceImpl.java
  
  Index: ComponentMessagesSourceImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/ComponentMessagesSourceImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ComponentMessagesSourceImpl.java	12 Oct 2004 12:42:32 -0000	1.4
  +++ ComponentMessagesSourceImpl.java	2 Nov 2004 18:59:13 -0000	1.5
  @@ -23,9 +23,9 @@
   import java.util.Properties;
   
   import org.apache.hivemind.ApplicationRuntimeException;
  +import org.apache.hivemind.Defense;
   import org.apache.hivemind.Messages;
   import org.apache.hivemind.Resource;
  -import org.apache.tapestry.Defense;
   import org.apache.tapestry.IComponent;
   import org.apache.tapestry.Tapestry;
   import org.apache.tapestry.engine.ComponentMessages;
  
  
  
  1.2       +4 -4      jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/InjectedValueProviderFactory.java
  
  Index: InjectedValueProviderFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/InjectedValueProviderFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InjectedValueProviderFactory.java	2 Nov 2004 03:32:42 -0000	1.1
  +++ InjectedValueProviderFactory.java	2 Nov 2004 18:59:13 -0000	1.2
  @@ -18,6 +18,7 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.hivemind.ServiceImplementationFactory;
  +import org.apache.hivemind.ServiceImplementationFactoryParameters;
   import org.apache.hivemind.internal.Module;
   import org.apache.hivemind.schema.Translator;
   
  @@ -33,12 +34,11 @@
   {
       private Translator _objectTranslator;
   
  -    public Object createCoreServiceImplementation(String serviceId, Class serviceInterface,
  -            Log serviceLog, Module invokingModule, List parameters)
  +    public Object createCoreServiceImplementation(ServiceImplementationFactoryParameters parameters)
       {
           // The invoking module here is the tapestry module
  -        
  -        return new InjectedValueProviderImpl(invokingModule, _objectTranslator);
  +
  +        return new InjectedValueProviderImpl(parameters.getInvokingModule(), _objectTranslator);
       }
   
       public void setObjectTranslator(Translator objectTranslator)
  
  
  
  1.3       +10 -17    jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/MasterInitializer.java
  
  Index: MasterInitializer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/MasterInitializer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MasterInitializer.java	16 Sep 2004 00:26:20 -0000	1.2
  +++ MasterInitializer.java	2 Nov 2004 18:59:13 -0000	1.3
  @@ -19,27 +19,25 @@
   
   import javax.servlet.http.HttpServlet;
   
  -import org.apache.commons.logging.Log;
  -import org.apache.hivemind.ErrorHandler;
  +import org.apache.hivemind.ErrorLog;
   import org.apache.hivemind.order.Orderer;
   import org.apache.tapestry.services.ApplicationInitializer;
   
   /**
  - * Uses an orderable list of {@link org.apache.tapestry.services.ApplicationInitializer}s
  - * to initialize the application. 
  - *
  + * Uses an orderable list of {@link org.apache.tapestry.services.ApplicationInitializer}s to
  + * initialize the application.
  + * 
    * @author Howard Lewis Ship
    * @since 3.1
    */
   public class MasterInitializer implements ApplicationInitializer
   {
  -    private Log _log;
  -    private ErrorHandler _errorHandler;
  +    private ErrorLog _errorLog;
       private List _initializers;
   
       public void initializeService()
       {
  -        Orderer o = new Orderer(_log, _errorHandler, ImplMessages.initializerContribution());
  +        Orderer o = new Orderer(_errorLog, ImplMessages.initializerContribution());
   
           Iterator i = _initializers.iterator();
           while (i.hasNext())
  @@ -63,19 +61,14 @@
           }
       }
   
  -    public void setErrorHandler(ErrorHandler handler)
  -    {
  -        _errorHandler = handler;
  -    }
  -
       public void setInitializers(List list)
       {
           _initializers = list;
       }
   
  -    public void setLog(Log log)
  +
  +    public void setErrorLog(ErrorLog errorLog)
       {
  -        _log = log;
  +        _errorLog = errorLog;
       }
  -
  -}
  +}
  \ No newline at end of file
  
  
  
  1.2       +8 -15     jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/ServiceMapImpl.java
  
  Index: ServiceMapImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/ServiceMapImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServiceMapImpl.java	5 Oct 2004 03:25:37 -0000	1.1
  +++ ServiceMapImpl.java	2 Nov 2004 18:59:13 -0000	1.2
  @@ -19,9 +19,8 @@
   import java.util.List;
   import java.util.Map;
   
  -import org.apache.commons.logging.Log;
   import org.apache.hivemind.ApplicationRuntimeException;
  -import org.apache.hivemind.ErrorHandler;
  +import org.apache.hivemind.ErrorLog;
   import org.apache.hivemind.HiveMind;
   import org.apache.tapestry.engine.IEngineService;
   import org.apache.tapestry.services.ServiceMap;
  @@ -36,11 +35,9 @@
   {
       private List _applicationServices;
   
  -    private ErrorHandler _errorHandler;
  -
       private List _factoryServices;
   
  -    private Log _log;
  +    private ErrorLog _errorLog;
   
       /**
        * Map of {@link IEngineService}keyed on String name.
  @@ -74,8 +71,10 @@
   
               if (existing != null)
               {
  -                _errorHandler.error(_log, ImplMessages.dupeService(name, existing), HiveMind
  -                        .getLocation(s), null);
  +                _errorLog.error(
  +                        ImplMessages.dupeService(name, existing),
  +                        HiveMind.getLocation(s),
  +                        null);
                   continue;
               }
   
  @@ -100,19 +99,13 @@
           _applicationServices = applicationServices;
       }
   
  -    public void setErrorHandler(ErrorHandler errorHandler)
  -    {
  -        _errorHandler = errorHandler;
  -    }
  -
       public void setFactoryServices(List factoryServices)
       {
           _factoryServices = factoryServices;
       }
   
  -    public void setLog(Log log)
  +    public void setErrorLog(ErrorLog errorLog)
       {
  -        _log = log;
  +        _errorLog = errorLog;
       }
  -
   }
  
  
  
  1.3       +16 -14    jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/ExtensionLookupFactory.java
  
  Index: ExtensionLookupFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/ExtensionLookupFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExtensionLookupFactory.java	16 Sep 2004 00:26:20 -0000	1.2
  +++ ExtensionLookupFactory.java	2 Nov 2004 18:59:13 -0000	1.3
  @@ -19,44 +19,46 @@
   import org.apache.commons.logging.Log;
   import org.apache.hivemind.ApplicationRuntimeException;
   import org.apache.hivemind.ServiceImplementationFactory;
  +import org.apache.hivemind.ServiceImplementationFactoryParameters;
   import org.apache.hivemind.internal.Module;
   import org.apache.hivemind.lib.DefaultImplementationBuilder;
   import org.apache.tapestry.spec.IApplicationSpecification;
   
   /**
  - * An implementation of {@link org.apache.hivemind.ServiceImplementationFactory}
  - * that looks for a service implementation provided as an
  + * An implementation of {@link org.apache.hivemind.ServiceImplementationFactory}that looks for a
  + * service implementation provided as an
    * {@link org.apache.tapestry.spec.ILibrarySpecification#getExtension(String) application
    * extension}. If no such extension exists, then a
  - * {@link org.apache.hivemind.lib.DefaultImplementationBuilder default implementation}
  - * is constructed and returned instead. This allows compatibility with Tapestry 3.0 and
  - * earlier application extensions (though those will be phased out in the future).
  - *
  + * {@link org.apache.hivemind.lib.DefaultImplementationBuilder default implementation}is
  + * constructed and returned instead. This allows compatibility with Tapestry 3.0 and earlier
  + * application extensions (though those will be phased out in the future).
  + * 
    * @author Howard Lewis Ship
    * @since 3.1
    */
   public class ExtensionLookupFactory implements ServiceImplementationFactory
   {
       private IApplicationSpecification _specification;
  +
       private DefaultImplementationBuilder _defaultBuilder;
   
       public Object createCoreServiceImplementation(
  -        String serviceId,
  -        Class serviceInterface,
  -        Log serviceLog,
  -        Module invokingModule,
  -        List parameters)
  +            ServiceImplementationFactoryParameters factorParameters)
       {
  -        ExtensionLookupParameter p = (ExtensionLookupParameter) parameters.get(0);
  +        ExtensionLookupParameter p = (ExtensionLookupParameter) factorParameters.getParameters()
  +                .get(0);
   
           String extensionName = p.getExtensionName();
   
  +        Class serviceInterface = factorParameters.getServiceInterface();
  +
           try
           {
               if (_specification.checkExtension(extensionName))
                   return _specification.getExtension(extensionName, serviceInterface);
   
  -            return _defaultBuilder.buildDefaultImplementation(serviceInterface, invokingModule);
  +            return _defaultBuilder.buildDefaultImplementation(serviceInterface, factorParameters
  +                    .getInvokingModule());
           }
           catch (Exception ex)
           {
  @@ -74,4 +76,4 @@
           _specification = specification;
       }
   
  -}
  +}
  \ No newline at end of file
  
  
  
  1.4       +13 -18    jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/PropertySourceImpl.java
  
  Index: PropertySourceImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/PropertySourceImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PropertySourceImpl.java	16 Sep 2004 00:26:20 -0000	1.3
  +++ PropertySourceImpl.java	2 Nov 2004 18:59:13 -0000	1.4
  @@ -17,29 +17,29 @@
   import java.util.Iterator;
   import java.util.List;
   
  -import org.apache.commons.logging.Log;
  -import org.apache.hivemind.ErrorHandler;
  +import org.apache.hivemind.ErrorLog;
   import org.apache.hivemind.order.Orderer;
   import org.apache.tapestry.engine.IPropertySource;
   import org.apache.tapestry.util.DelegatingPropertySource;
   
   /**
  - * Orders a list of {@link org.apache.tapestry.services.impl.PropertySourceContribution}s
  - * and get property values from them (the first non-null result being returned).
  - *
  + * Orders a list of {@link org.apache.tapestry.services.impl.PropertySourceContribution}s and get
  + * property values from them (the first non-null result being returned).
  + * 
    * @author Howard Lewis Ship
    * @since 3.1
    */
   public class PropertySourceImpl implements IPropertySource
   {
       private List _contributions;
  +
       private IPropertySource _delegate;
  -    private ErrorHandler _errorHandler;
  -    private Log _log;
  +
  +    private ErrorLog _errorLog;
   
       public void initializeService()
       {
  -        Orderer orderer = new Orderer(_log, _errorHandler, "property source");
  +        Orderer orderer = new Orderer(_errorLog, "property source");
   
           Iterator i = _contributions.iterator();
   
  @@ -70,19 +70,14 @@
           return _delegate.getPropertyValue(propertyName);
       }
   
  -    public void setContributions(List list)
  +    public void setErrorLog(ErrorLog errorLog)
       {
  -        _contributions = list;
  +        _errorLog = errorLog;
       }
   
  -    public void setErrorHandler(ErrorHandler handler)
  -    {
  -        _errorHandler = handler;
  -    }
  -
  -    public void setLog(Log log)
  +    public void setContributions(List list)
       {
  -        _log = log;
  +        _contributions = list;
       }
   
  -}
  +}
  \ No newline at end of file
  
  
  
  1.2       +7 -13     jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/ComponentConstructorFactoryImpl.java
  
  Index: ComponentConstructorFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/ComponentConstructorFactoryImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ComponentConstructorFactoryImpl.java	31 Oct 2004 22:57:46 -0000	1.1
  +++ ComponentConstructorFactoryImpl.java	2 Nov 2004 18:59:13 -0000	1.2
  @@ -23,6 +23,7 @@
   import org.apache.commons.logging.Log;
   import org.apache.hivemind.ClassResolver;
   import org.apache.hivemind.ErrorHandler;
  +import org.apache.hivemind.ErrorLog;
   import org.apache.hivemind.order.Orderer;
   import org.apache.hivemind.service.ClassFactory;
   import org.apache.tapestry.enhance.EnhancedClassValidator;
  @@ -43,9 +44,7 @@
   public class ComponentConstructorFactoryImpl implements ComponentConstructorFactory,
           ResetEventListener
   {
  -    private ErrorHandler _errorHandler;
  -
  -    private Log _log;
  +    private ErrorLog _errorLog;
   
       private ClassFactory _classFactory;
   
  @@ -71,7 +70,7 @@
   
       public void initializeService()
       {
  -        Orderer orderer = new Orderer(_log, _errorHandler, "worker");
  +        Orderer orderer = new Orderer(_errorLog, "worker");
   
           Iterator i = _contributions.iterator();
           while (i.hasNext())
  @@ -134,18 +133,13 @@
           _contributions = contributions;
       }
   
  -    public void setErrorHandler(ErrorHandler errorHandler)
  -    {
  -        _errorHandler = errorHandler;
  -    }
  -
  -    public void setLog(Log log)
  +    public void setValidator(EnhancedClassValidator validator)
       {
  -        _log = log;
  +        _validator = validator;
       }
   
  -    public void setValidator(EnhancedClassValidator validator)
  +    public void setErrorLog(ErrorLog errorLog)
       {
  -        _validator = validator;
  +        _errorLog = errorLog;
       }
   }
  
  
  
  1.2       +1 -1      jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/RequestLocaleManagerImpl.java
  
  Index: RequestLocaleManagerImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/RequestLocaleManagerImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RequestLocaleManagerImpl.java	12 Oct 2004 12:42:32 -0000	1.1
  +++ RequestLocaleManagerImpl.java	2 Nov 2004 18:59:13 -0000	1.2
  @@ -18,8 +18,8 @@
   
   import javax.servlet.http.HttpServletRequest;
   
  +import org.apache.hivemind.Defense;
   import org.apache.tapestry.ApplicationServlet;
  -import org.apache.tapestry.Defense;
   import org.apache.tapestry.services.CookieSource;
   import org.apache.tapestry.services.RequestLocaleManager;
   import org.apache.tapestry.util.StringSplitter;
  
  
  
  1.7       +1 -0      jakarta-tapestry/framework/src/java/org/apache/tapestry/AbstractComponent.java
  
  Index: AbstractComponent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/AbstractComponent.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractComponent.java	31 Oct 2004 22:57:42 -0000	1.6
  +++ AbstractComponent.java	2 Nov 2004 18:59:14 -0000	1.7
  @@ -26,6 +26,7 @@
   
   import org.apache.hivemind.ApplicationRuntimeException;
   import org.apache.hivemind.ClassResolver;
  +import org.apache.hivemind.Defense;
   import org.apache.hivemind.Messages;
   import org.apache.hivemind.impl.BaseLocatable;
   import org.apache.hivemind.util.PropertyUtils;
  
  
  
  1.5       +0 -5      jakarta-tapestry/framework/src/java/org/apache/tapestry/TapestryMessages.java
  
  Index: TapestryMessages.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/TapestryMessages.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TapestryMessages.java	16 Sep 2004 14:58:33 -0000	1.4
  +++ TapestryMessages.java	2 Nov 2004 18:59:14 -0000	1.5
  @@ -29,9 +29,4 @@
       {
           return _formatter.format("servlet-init-failure", cause);
       }
  -
  -    public static String paramNotNull(String parameterName)
  -    {
  -        return _formatter.format("param-not-null", parameterName);
  -    }
   }
  
  
  
  1.4       +0 -1      jakarta-tapestry/framework/src/java/org/apache/tapestry/TapestryStrings2.properties
  
  Index: TapestryStrings2.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/TapestryStrings2.properties,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TapestryStrings2.properties	16 Sep 2004 14:58:33 -0000	1.3
  +++ TapestryStrings2.properties	2 Nov 2004 18:59:14 -0000	1.4
  @@ -20,6 +20,5 @@
   # TapestryStrings.properties
   
   servlet-init-failure=Unable to initialize application servlet: {0}
  -param-not-null=Parameter {0} must not be null.
   no-accessor=Component {0} does not have accessor methods for property {1}.
   
  
  
  
  1.6       +1 -1      jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/EnhancementOperationImpl.java
  
  Index: EnhancementOperationImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/EnhancementOperationImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- EnhancementOperationImpl.java	2 Nov 2004 13:30:00 -0000	1.5
  +++ EnhancementOperationImpl.java	2 Nov 2004 18:59:14 -0000	1.6
  @@ -28,12 +28,12 @@
   
   import org.apache.hivemind.ApplicationRuntimeException;
   import org.apache.hivemind.ClassResolver;
  +import org.apache.hivemind.Defense;
   import org.apache.hivemind.HiveMind;
   import org.apache.hivemind.service.BodyBuilder;
   import org.apache.hivemind.service.ClassFab;
   import org.apache.hivemind.service.ClassFactory;
   import org.apache.hivemind.service.MethodSignature;
  -import org.apache.tapestry.Defense;
   import org.apache.tapestry.services.ComponentConstructor;
   import org.apache.tapestry.spec.IComponentSpecification;
   
  
  
  
  1.2       +10 -15    jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/SpecifiedPropertyWorker.java
  
  Index: SpecifiedPropertyWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/SpecifiedPropertyWorker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SpecifiedPropertyWorker.java	29 Oct 2004 17:13:52 -0000	1.1
  +++ SpecifiedPropertyWorker.java	2 Nov 2004 18:59:14 -0000	1.2
  @@ -17,11 +17,11 @@
   import java.lang.reflect.Modifier;
   import java.util.Iterator;
   
  -import org.apache.commons.logging.Log;
  -import org.apache.hivemind.ErrorHandler;
  +import org.apache.hivemind.Defense;
  +import org.apache.hivemind.ErrorLog;
   import org.apache.hivemind.service.BodyBuilder;
   import org.apache.hivemind.service.MethodSignature;
  -import org.apache.tapestry.Defense;
  +import org.apache.tapestry.IComponent;
   import org.apache.tapestry.spec.IComponentSpecification;
   import org.apache.tapestry.spec.IPropertySpecification;
   
  @@ -34,9 +34,7 @@
    */
   public class SpecifiedPropertyWorker implements EnhancementWorker
   {
  -    private Log _log;
  -
  -    private ErrorHandler _errorHandler;
  +    private ErrorLog _errorLog;
   
       /**
        * Iterates over the specified properties, creating an enhanced property for each (a field, an
  @@ -64,8 +62,10 @@
               }
               catch (RuntimeException ex)
               {
  -                _errorHandler.error(_log, EnhanceMessages.errorAddingProperty(name, op
  -                        .getBaseClass(), ex), ps.getLocation(), ex);
  +                _errorLog.error(
  +                        EnhanceMessages.errorAddingProperty(name, op.getBaseClass(), ex),
  +                        ps.getLocation(),
  +                        ex);
               }
           }
       }
  @@ -128,13 +128,8 @@
           op.addMethod(Modifier.PUBLIC, sig, body.toString());
       }
   
  -    public void setErrorHandler(ErrorHandler errorHandler)
  -    {
  -        _errorHandler = errorHandler;
  -    }
  -
  -    public void setLog(Log log)
  +    public void setErrorLog(ErrorLog errorLog)
       {
  -        _log = log;
  +        _errorLog = errorLog;
       }
   }
  
  
  
  1.3       +0 -1      jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/ComponentConstructorImpl.java
  
  Index: ComponentConstructorImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/ComponentConstructorImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ComponentConstructorImpl.java	31 Oct 2004 22:57:41 -0000	1.2
  +++ ComponentConstructorImpl.java	2 Nov 2004 18:59:14 -0000	1.3
  @@ -18,7 +18,6 @@
   
   import org.apache.hivemind.ApplicationRuntimeException;
   import org.apache.hivemind.Location;
  -import org.apache.hivemind.impl.BaseLocatable;
   import org.apache.tapestry.services.ComponentConstructor;
   
   /**
  
  
  
  1.3       +8 -17     jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/ParameterPropertyWorker.java
  
  Index: ParameterPropertyWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/ParameterPropertyWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ParameterPropertyWorker.java	31 Oct 2004 22:57:41 -0000	1.2
  +++ ParameterPropertyWorker.java	2 Nov 2004 18:59:14 -0000	1.3
  @@ -19,10 +19,11 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.hivemind.ApplicationRuntimeException;
  +import org.apache.hivemind.Defense;
   import org.apache.hivemind.ErrorHandler;
  +import org.apache.hivemind.ErrorLog;
   import org.apache.hivemind.service.BodyBuilder;
   import org.apache.hivemind.service.MethodSignature;
  -import org.apache.tapestry.Defense;
   import org.apache.tapestry.spec.Direction;
   import org.apache.tapestry.spec.IComponentSpecification;
   import org.apache.tapestry.spec.IParameterSpecification;
  @@ -36,9 +37,7 @@
    */
   public class ParameterPropertyWorker implements EnhancementWorker
   {
  -    private Log _log;
  -
  -    private ErrorHandler _errorHandler;
  +    private ErrorLog _errorLog;
   
       public void performEnhancement(EnhancementOperation op)
       {
  @@ -59,10 +58,8 @@
               }
               catch (RuntimeException ex)
               {
  -                _errorHandler.error(_log, EnhanceMessages.errorAddingProperty(
  -                        ps.getPropertyName(),
  -                        op.getBaseClass(),
  -                        ex), ps.getLocation(), ex);
  +                _errorLog.error(EnhanceMessages.errorAddingProperty(ps.getPropertyName(), op
  +                        .getBaseClass(), ex), ps.getLocation(), ex);
               }
           }
       }
  @@ -139,7 +136,7 @@
           String propertyName = ps.getPropertyName();
   
           // This restriction will go away shortly ...
  -        
  +
           if (!ps.isRequired() && ps.getDefaultValue() == null)
               throw new ApplicationRuntimeException(EnhanceMessages.autoMustBeRequired(propertyName),
                       ps.getLocation(), null);
  @@ -181,14 +178,8 @@
           { propertyType }, null), b.toString());
       }
   
  -    public void setErrorHandler(ErrorHandler errorHandler)
  -    {
  -        _errorHandler = errorHandler;
  -    }
  -
  -    public void setLog(Log log)
  +    public void setErrorLog(ErrorLog errorLog)
       {
  -        _log = log;
  +        _errorLog = errorLog;
       }
  -
   }
  
  
  
  1.2       +7 -18     jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/EnhancedClassValidatorImpl.java
  
  Index: EnhancedClassValidatorImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/EnhancedClassValidatorImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EnhancedClassValidatorImpl.java	31 Oct 2004 22:57:41 -0000	1.1
  +++ EnhancedClassValidatorImpl.java	2 Nov 2004 18:59:14 -0000	1.2
  @@ -19,8 +19,7 @@
   import java.util.HashSet;
   import java.util.Set;
   
  -import org.apache.commons.logging.Log;
  -import org.apache.hivemind.ErrorHandler;
  +import org.apache.hivemind.ErrorLog;
   import org.apache.hivemind.service.MethodSignature;
   import org.apache.tapestry.spec.IComponentSpecification;
   
  @@ -33,9 +32,7 @@
    */
   public class EnhancedClassValidatorImpl implements EnhancedClassValidator
   {
  -    private ErrorHandler _errorHandler;
  -
  -    private Log _log;
  +    private ErrorLog _errorLog;
   
       public void validate(Class baseClass, Class enhancedClass, IComponentSpecification specification)
       {
  @@ -60,11 +57,8 @@
                       if (implementedMethods.contains(s))
                           continue;
   
  -                    _errorHandler.error(_log, EnhanceMessages.noImplForAbstractMethod(
  -                            m,
  -                            current,
  -                            baseClass.getName(),
  -                            enhancedClass), specification.getLocation(), null);
  +                    _errorLog.error(EnhanceMessages.noImplForAbstractMethod(m, current, baseClass
  +                            .getName(), enhancedClass), specification.getLocation(), null);
                   }
   
                   implementedMethods.add(s);
  @@ -80,7 +74,7 @@
               current = current.getSuperclass();
   
               // Once advanced up to a concrete class, we trust that
  -            // the compiler did its checking.  Alternately, if
  +            // the compiler did its checking. Alternately, if
               // we started on java.lang.Object for some reason, current
               // will be null and we can stop.S
   
  @@ -90,13 +84,8 @@
   
       }
   
  -    public void setErrorHandler(ErrorHandler errorHandler)
  -    {
  -        _errorHandler = errorHandler;
  -    }
  -
  -    public void setLog(Log log)
  +    public void setErrorLog(ErrorLog errorLog)
       {
  -        _log = log;
  +        _errorLog = errorLog;
       }
   }
  
  
  
  1.2       +2 -4      jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/ForceNonAbstractWorker.java
  
  Index: ForceNonAbstractWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/ForceNonAbstractWorker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ForceNonAbstractWorker.java	30 Oct 2004 23:37:06 -0000	1.1
  +++ ForceNonAbstractWorker.java	2 Nov 2004 18:59:14 -0000	1.2
  @@ -34,9 +34,7 @@
           if (!Modifier.isAbstract(baseClass.getModifiers()))
               return;
   
  -        if (op.hasEnhancements())
  -            return;
  -
  -        op.forceEnhancement();
  +        if (!op.hasEnhancements())
  +            op.forceEnhancement();
       }
   }
  
  
  
  1.3       +10 -15    jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/InjectWorker.java
  
  Index: InjectWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/InjectWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InjectWorker.java	2 Nov 2004 13:30:00 -0000	1.2
  +++ InjectWorker.java	2 Nov 2004 18:59:14 -0000	1.3
  @@ -17,9 +17,8 @@
   import java.lang.reflect.Modifier;
   import java.util.Iterator;
   
  -import org.apache.commons.logging.Log;
   import org.apache.hivemind.ApplicationRuntimeException;
  -import org.apache.hivemind.ErrorHandler;
  +import org.apache.hivemind.ErrorLog;
   import org.apache.hivemind.service.MethodSignature;
   import org.apache.tapestry.services.InjectedValueProvider;
   import org.apache.tapestry.spec.IComponentSpecification;
  @@ -33,9 +32,7 @@
    */
   public class InjectWorker implements EnhancementWorker
   {
  -    private ErrorHandler _errorHandler;
  -
  -    private Log _log;
  +    private ErrorLog _errorLog;
   
       private InjectedValueProvider _provider;
   
  @@ -55,8 +52,10 @@
               }
               catch (Exception ex)
               {
  -                _errorHandler.error(_log, EnhanceMessages.errorAddingProperty(is.getName(), op
  -                        .getBaseClass(), ex), is.getLocation(), ex);
  +                _errorLog.error(EnhanceMessages.errorAddingProperty(
  +                        is.getName(),
  +                        op.getBaseClass(),
  +                        ex), is.getLocation(), ex);
               }
           }
       }
  @@ -77,7 +76,8 @@
           Object injectedValue = _provider.obtainValue(objectReference, is.getLocation());
   
           if (injectedValue == null)
  -            throw new ApplicationRuntimeException(EnhanceMessages.locatedValueIsNull(objectReference));
  +            throw new ApplicationRuntimeException(EnhanceMessages
  +                    .locatedValueIsNull(objectReference));
   
           if (!propertyType.isAssignableFrom(injectedValue.getClass()))
               throw new ApplicationRuntimeException(EnhanceMessages.incompatibleInjectType(
  @@ -95,14 +95,9 @@
                   "return " + fieldName + ";");
       }
   
  -    public void setErrorHandler(ErrorHandler errorHandler)
  -    {
  -        _errorHandler = errorHandler;
  -    }
  -
  -    public void setLog(Log log)
  +    public void setErrorLog(ErrorLog errorLog)
       {
  -        _log = log;
  +        _errorLog = errorLog;
       }
   
       public void setProvider(InjectedValueProvider provider)
  
  
  
  1.2       +40 -14    jakarta-tapestry/framework/src/test/org/apache/tapestry/services/impl/TestExtensionLookupFactory.java
  
  Index: TestExtensionLookupFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/services/impl/TestExtensionLookupFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestExtensionLookupFactory.java	29 Oct 2004 17:13:54 -0000	1.1
  +++ TestExtensionLookupFactory.java	2 Nov 2004 18:59:14 -0000	1.2
  @@ -19,6 +19,7 @@
   
   import org.apache.hivemind.ApplicationRuntimeException;
   import org.apache.hivemind.Location;
  +import org.apache.hivemind.ServiceImplementationFactoryParameters;
   import org.apache.hivemind.internal.Module;
   import org.apache.hivemind.lib.DefaultImplementationBuilder;
   import org.apache.hivemind.test.HiveMindTestCase;
  @@ -49,8 +50,18 @@
   
           Runnable r = (Runnable) newMock(Runnable.class);
   
  +        MockControl fpc = newControl(ServiceImplementationFactoryParameters.class);
  +        ServiceImplementationFactoryParameters fp = (ServiceImplementationFactoryParameters) fpc
  +                .getMock();
  +
           // Training
   
  +        fp.getParameters();
  +        fpc.setReturnValue(createParameters("foo.bar"));
  +
  +        fp.getServiceInterface();
  +        fpc.setReturnValue(Runnable.class);
  +
           spec.checkExtension("foo.bar");
           specControl.setReturnValue(true);
   
  @@ -62,12 +73,7 @@
           ExtensionLookupFactory f = new ExtensionLookupFactory();
           f.setSpecification(spec);
   
  -        Object actual = f.createCoreServiceImplementation(
  -                "biz.bap.Boom",
  -                Runnable.class,
  -                null,
  -                null,
  -                createParameters("foo.bar"));
  +        Object actual = f.createCoreServiceImplementation(fp);
   
           assertSame(r, actual);
   
  @@ -86,11 +92,24 @@
   
           Runnable r = (Runnable) newMock(Runnable.class);
   
  +        MockControl fpc = newControl(ServiceImplementationFactoryParameters.class);
  +        ServiceImplementationFactoryParameters fp = (ServiceImplementationFactoryParameters) fpc
  +                .getMock();
  +
           // Training
   
  +        fp.getParameters();
  +        fpc.setReturnValue(createParameters("foo.bar"));
  +
  +        fp.getServiceInterface();
  +        fpc.setReturnValue(Runnable.class);
  +
           spec.checkExtension("foo.bar");
           specControl.setReturnValue(false);
   
  +        fp.getInvokingModule();
  +        fpc.setReturnValue(module);
  +
           dib.buildDefaultImplementation(Runnable.class, module);
           dibControl.setReturnValue(r);
   
  @@ -100,12 +119,7 @@
           f.setSpecification(spec);
           f.setDefaultBuilder(dib);
   
  -        Object actual = f.createCoreServiceImplementation(
  -                "biz.bap.Boom",
  -                Runnable.class,
  -                null,
  -                module,
  -                createParameters("foo.bar"));
  +        Object actual = f.createCoreServiceImplementation(fp);
   
           assertSame(r, actual);
   
  @@ -120,13 +134,23 @@
           p.setLocation(l);
           p.setExtensionName("gnip.gnop");
   
  -        List parameters = Collections.singletonList(p);
  +        MockControl fpc = newControl(ServiceImplementationFactoryParameters.class);
  +        ServiceImplementationFactoryParameters fp = (ServiceImplementationFactoryParameters) fpc
  +                .getMock();
  +
  +        fp.getParameters();
  +        fpc.setReturnValue(Collections.singletonList(p));
  +
  +        fp.getServiceInterface();
  +        fpc.setReturnValue(null);
   
           ExtensionLookupFactory f = new ExtensionLookupFactory();
   
  +        replayControls();
  +
           try
           {
  -            f.createCoreServiceImplementation(null, null, null, null, parameters);
  +            f.createCoreServiceImplementation(fp);
   
               unreachable();
           }
  @@ -134,5 +158,7 @@
           {
               assertSame(l, ex.getLocation());
           }
  +
  +        verifyControls();
       }
   }
  
  
  
  1.2       +4 -4      jakarta-tapestry/framework/src/test/org/apache/tapestry/services/impl/TestBasicInfrastructure.java
  
  Index: TestBasicInfrastructure.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/services/impl/TestBasicInfrastructure.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestBasicInfrastructure.java	29 Oct 2004 17:13:54 -0000	1.1
  +++ TestBasicInfrastructure.java	2 Nov 2004 18:59:14 -0000	1.2
  @@ -24,6 +24,7 @@
   import org.apache.commons.logging.LogFactory;
   import org.apache.hivemind.ApplicationRuntimeException;
   import org.apache.hivemind.ClassResolver;
  +import org.apache.hivemind.ErrorLog;
   import org.apache.hivemind.Location;
   import org.apache.hivemind.Registry;
   import org.apache.hivemind.impl.DefaultClassResolver;
  @@ -55,8 +56,6 @@
    */
   public class TestBasicInfrastructure extends HiveMindTestCase
   {
  -    private static final Log LOG = LogFactory.getLog(TestBasicInfrastructure.class);
  -
       public void testRequestGlobals()
       {
           RequestGlobalsImpl si = new RequestGlobalsImpl();
  @@ -104,6 +103,8 @@
   
           ai.initialize(servlet);
   
  +        ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
  +
           replayControls();
   
           // Build the list.
  @@ -115,8 +116,7 @@
           List l = Collections.singletonList(ic);
   
           MasterInitializer mi = new MasterInitializer();
  -        mi.setErrorHandler(new DefaultErrorHandler());
  -        mi.setLog(LOG);
  +        mi.setErrorLog(log);
           mi.setInitializers(l);
   
           mi.initialize(servlet);
  
  
  
  1.2       +5 -8      jakarta-tapestry/framework/src/test/org/apache/tapestry/services/impl/TestPropertySource.java
  
  Index: TestPropertySource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/services/impl/TestPropertySource.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestPropertySource.java	29 Oct 2004 17:13:54 -0000	1.1
  +++ TestPropertySource.java	2 Nov 2004 18:59:14 -0000	1.2
  @@ -18,6 +18,7 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.hivemind.ErrorHandler;
  +import org.apache.hivemind.ErrorLog;
   import org.apache.hivemind.test.HiveMindTestCase;
   import org.apache.tapestry.engine.IPropertySource;
   import org.easymock.MockControl;
  @@ -35,8 +36,7 @@
           MockControl sourceControl = newControl(IPropertySource.class);
           IPropertySource source = (IPropertySource) sourceControl.getMock();
   
  -        Log log = (Log) newMock(Log.class);
  -        ErrorHandler eh = (ErrorHandler) newMock(ErrorHandler.class);
  +        ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
   
           // Training
   
  @@ -52,8 +52,7 @@
           PropertySourceImpl ps = new PropertySourceImpl();
   
           ps.setContributions(Collections.singletonList(c));
  -        ps.setLog(log);
  -        ps.setErrorHandler(eh);
  +        ps.setErrorLog(log);
   
           ps.initializeService();
   
  @@ -64,16 +63,14 @@
   
       public void testFailure()
       {
  -        Log log = (Log) newMock(Log.class);
  -        ErrorHandler eh = (ErrorHandler) newMock(ErrorHandler.class);
  +        ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
   
           replayControls();
   
           PropertySourceImpl ps = new PropertySourceImpl();
   
           ps.setContributions(Collections.EMPTY_LIST);
  -        ps.setLog(log);
  -        ps.setErrorHandler(eh);
  +        ps.setErrorLog(log);
   
           ps.initializeService();
   
  
  
  
  1.2       +4 -5      jakarta-tapestry/framework/src/test/org/apache/tapestry/services/impl/TestServiceMap.java
  
  Index: TestServiceMap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/services/impl/TestServiceMap.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestServiceMap.java	29 Oct 2004 17:13:54 -0000	1.1
  +++ TestServiceMap.java	2 Nov 2004 18:59:14 -0000	1.2
  @@ -21,6 +21,7 @@
   import org.apache.commons.logging.Log;
   import org.apache.hivemind.ApplicationRuntimeException;
   import org.apache.hivemind.ErrorHandler;
  +import org.apache.hivemind.ErrorLog;
   import org.apache.hivemind.test.HiveMindTestCase;
   import org.apache.tapestry.engine.IEngineService;
   import org.easymock.MockControl;
  @@ -115,10 +116,9 @@
           list.add(first);
           list.add(second);
   
  -        Log log = (Log) newMock(Log.class);
  -        ErrorHandler eh = (ErrorHandler) newMock(ErrorHandler.class);
  +        ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
   
  -        eh.error(log, ImplMessages.dupeService("duplicate", first), null, null);
  +        log.error(ImplMessages.dupeService("duplicate", first), null, null);
   
           replayControls();
   
  @@ -126,8 +126,7 @@
   
           m.setFactoryServices(list);
           m.setApplicationServices(Collections.EMPTY_LIST);
  -        m.setLog(log);
  -        m.setErrorHandler(eh);
  +        m.setErrorLog(log);
   
           m.initializeService();
   
  
  
  
  1.10      +0 -5      jakarta-tapestry/.project
  
  Index: .project
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/.project,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- .project	2 Nov 2004 03:32:43 -0000	1.9
  +++ .project	2 Nov 2004 18:59:14 -0000	1.10
  @@ -10,11 +10,6 @@
   			<arguments>
   			</arguments>
   		</buildCommand>
  -		<buildCommand>
  -			<name>com.cenqua.clover.eclipse.cloverjavabuilder</name>
  -			<arguments>
  -			</arguments>
  -		</buildCommand>
   	</buildSpec>
   	<natures>
   		<nature>org.eclipse.jdt.core.javanature</nature>
  
  
  
  1.12      +1 -1      jakarta-tapestry/framework/src/java/org/apache/tapestry/engine/AbstractEngine.java
  
  Index: AbstractEngine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/engine/AbstractEngine.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AbstractEngine.java	31 Oct 2004 22:57:43 -0000	1.11
  +++ AbstractEngine.java	2 Nov 2004 18:59:14 -0000	1.12
  @@ -41,9 +41,9 @@
   import org.apache.commons.logging.LogFactory;
   import org.apache.hivemind.ApplicationRuntimeException;
   import org.apache.hivemind.ClassResolver;
  +import org.apache.hivemind.Defense;
   import org.apache.tapestry.ApplicationServlet;
   import org.apache.tapestry.Constants;
  -import org.apache.tapestry.Defense;
   import org.apache.tapestry.IEngine;
   import org.apache.tapestry.IPage;
   import org.apache.tapestry.IRequestCycle;
  
  
  
  1.4       +1 -1      jakarta-tapestry/framework/src/java/org/apache/tapestry/spec/ParameterSpecification.java
  
  Index: ParameterSpecification.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/spec/ParameterSpecification.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ParameterSpecification.java	30 Oct 2004 17:15:42 -0000	1.3
  +++ ParameterSpecification.java	2 Nov 2004 18:59:14 -0000	1.4
  @@ -14,8 +14,8 @@
   
   package org.apache.tapestry.spec;
   
  +import org.apache.hivemind.Defense;
   import org.apache.hivemind.impl.BaseLocatable;
  -import org.apache.tapestry.Defense;
   
   /**
    * Defines a formal parameter to a component. A <code>IParameterSpecification</code> is contained
  
  
  

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


Mime
View raw message