Author: bdotte
Date: Thu Jul 26 07:47:23 2007
New Revision: 559836

URL: http://svn.apache.org/viewvc?view=rev&rev=559836
Log:
TAPESTRY-1448. Inject IPropertySource onto PersistAnnotationWorker rather than 
changing the MethodAnnotationEnhancementWorker interface.

Modified:
    
tapestry/tapestry4/trunk/tapestry-annotations/src/descriptor/META-INF/hivemodule.xml
    
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/AnnotationEnhancementWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/AssetAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/BeanAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/ComponentAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectComponentAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectMetaAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectObjectAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectPageAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectScriptAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectStateAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectStateFlagAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/MessageAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/MethodAnnotationEnhancementWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/ParameterAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/PersistAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/AnnotationEnhancementWorkerTest.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/BaseAnnotationTestCase.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/PersistAnnotationWorkerTest.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestAssetAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestBeanAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestComponentAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestInjectComponentAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestInjectObjectAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestMessageAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestParameterAnnotationWorker.java
    
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestSimpleAnnotationWorkers.java

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/descriptor/META-INF/hivemodule.xml
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/descriptor/META-INF/hivemodule.xml?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/descriptor/META-INF/hivemodule.xml
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/descriptor/META-INF/hivemodule.xml
 Thu Jul 26 07:47:23 2007
@@ -29,7 +29,6 @@
                 <set-configuration property="methodWorkers" 
configuration-id="MethodWorkers" />
                 <set-configuration property="classWorkers" 
configuration-id="ClassWorkers" />
                 <set-configuration property="secondaryAnnotationWorkers" 
configuration-id="SecondaryAnnotationWorkers" />
-                   <set-service property="propertySource" 
service-id="tapestry.props.ApplicationPropertySource" />
             </construct>
         </invoke-factory>
 
@@ -163,7 +162,7 @@
 
         <worker annotation="InjectState" 
object="instance:InjectStateAnnotationWorker" />
         <worker annotation="InjectStateFlag" 
object="instance:InjectStateFlagAnnotationWorker" />
-        <worker annotation="Persist" object="instance:PersistAnnotationWorker" 
/>
+        <worker annotation="Persist" object="service:PersistAnnotationWorker" 
/>
         <worker annotation="Bean" object="instance:BeanAnnotationWorker" />
         <worker annotation="Asset" object="instance:AssetAnnotationWorker" />
         <worker annotation="Parameter" 
object="instance:ParameterAnnotationWorker" />
@@ -178,6 +177,14 @@
             <construct class="ComponentAnnotationWorker" />
         </invoke-factory>
     </service-point>
+
+       <service-point id="PersistAnnotationWorker" 
interface="MethodAnnotationEnhancementWorker">
+               <invoke-factory>
+                       <construct class="PersistAnnotationWorker">
+                               <set-service property="propertySource" 
service-id="tapestry.props.ApplicationPropertySource" />
+                       </construct>
+               </invoke-factory>
+       </service-point>
 
     <service-point id="InjectAssetAnnotationWorker" 
interface="org.apache.tapestry.enhance.EnhancementWorker">
 

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/AnnotationEnhancementWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/AnnotationEnhancementWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/AnnotationEnhancementWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/AnnotationEnhancementWorker.java
 Thu Jul 26 07:47:23 2007
@@ -24,7 +24,6 @@
 import org.apache.hivemind.Location;
 import org.apache.hivemind.Resource;
 import org.apache.hivemind.util.ClasspathResource;
-import org.apache.tapestry.engine.IPropertySource;
 import org.apache.tapestry.enhance.EnhancementOperation;
 import org.apache.tapestry.enhance.EnhancementWorker;
 import org.apache.tapestry.spec.IComponentSpecification;
@@ -51,8 +50,6 @@
 
     private List<SecondaryAnnotationWorker> _secondaryAnnotationWorkers;
 
-       private IPropertySource _propertySource;
-
     public void setClassWorkers(Map<Class, ClassAnnotationEnhancementWorker> 
classWorkers)
     {
         _classWorkers = classWorkers;
@@ -140,7 +137,7 @@
                     method,
                     annotation,
                     classResource);
-            worker.performEnhancement(op, spec, method, location, 
_propertySource);
+            worker.performEnhancement(op, spec, method, location);
         }
         catch (Exception ex)
         {
@@ -171,9 +168,4 @@
     {
         _secondaryAnnotationWorkers = workers;
     }
-
-       public void setPropertySource(IPropertySource propertySource)
-       {
-               _propertySource = propertySource;
-       }
 }

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/AssetAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/AssetAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/AssetAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/AssetAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -17,7 +17,6 @@
 import java.lang.reflect.Method;
 
 import org.apache.hivemind.Location;
-import org.apache.tapestry.engine.IPropertySource;
 import org.apache.tapestry.enhance.EnhancementOperation;
 import org.apache.tapestry.spec.AssetSpecification;
 import org.apache.tapestry.spec.IAssetSpecification;
@@ -33,7 +32,7 @@
 {
 
     public void performEnhancement(EnhancementOperation op, 
IComponentSpecification spec,
-            Method method, Location location, IPropertySource propertySource)
+            Method method, Location location)
     {
         Asset asset = method.getAnnotation(Asset.class);
         String propertyName = AnnotationUtils.getPropertyName(method);

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/BeanAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/BeanAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/BeanAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/BeanAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -23,7 +23,6 @@
 import org.apache.tapestry.spec.BeanSpecification;
 import org.apache.tapestry.spec.IBeanSpecification;
 import org.apache.tapestry.spec.IComponentSpecification;
-import org.apache.tapestry.engine.IPropertySource;
 
 /**
  * Creates a [EMAIL PROTECTED] org.apache.tapestry.spec.IBeanSpecification} 
from the
@@ -35,7 +34,7 @@
 public class BeanAnnotationWorker implements MethodAnnotationEnhancementWorker
 {
     public void performEnhancement(EnhancementOperation op, 
IComponentSpecification spec,
-            Method method, Location location, IPropertySource propertySource)
+            Method method, Location location)
     {
         Bean bean = method.getAnnotation(Bean.class);
         String propertyName = AnnotationUtils.getPropertyName(method);

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/ComponentAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/ComponentAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/ComponentAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/ComponentAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -26,7 +26,6 @@
 import org.apache.tapestry.spec.IBindingSpecification;
 import org.apache.tapestry.spec.IComponentSpecification;
 import org.apache.tapestry.spec.IContainedComponent;
-import org.apache.tapestry.engine.IPropertySource;
 
 /**
  * Adds a [EMAIL PROTECTED] org.apache.tapestry.spec.IContainedComponent} to 
the
@@ -40,7 +39,7 @@
 {
 
     public void performEnhancement(EnhancementOperation op, 
IComponentSpecification spec,
-            Method method, Location location, IPropertySource propertySource)
+            Method method, Location location)
     {
         Component component = method.getAnnotation(Component.class);
 

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectComponentAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectComponentAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectComponentAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectComponentAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -20,7 +20,6 @@
 import org.apache.tapestry.enhance.EnhancementOperation;
 import org.apache.tapestry.enhance.InjectComponentWorker;
 import org.apache.tapestry.spec.IComponentSpecification;
-import org.apache.tapestry.engine.IPropertySource;
 
 /**
  * Injects a reference to a compent.
@@ -45,7 +44,7 @@
     }
 
     public void performEnhancement(EnhancementOperation op, 
IComponentSpecification spec,
-            Method method, Location location, IPropertySource propertySource)
+            Method method, Location location)
     {
         InjectComponent ic = method.getAnnotation(InjectComponent.class);
         String propertyName = AnnotationUtils.getPropertyName(method);

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectMetaAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectMetaAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectMetaAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectMetaAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -21,7 +21,6 @@
 import org.apache.tapestry.spec.IComponentSpecification;
 import org.apache.tapestry.spec.InjectSpecification;
 import org.apache.tapestry.spec.InjectSpecificationImpl;
-import org.apache.tapestry.engine.IPropertySource;
 
 /**
  * @author Howard Lewis Ship
@@ -31,7 +30,7 @@
 {
 
     public void performEnhancement(EnhancementOperation op, 
IComponentSpecification spec,
-            Method method, Location location, IPropertySource propertySource)
+            Method method, Location location)
     {
         String propertyName = AnnotationUtils.getPropertyName(method);
 

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectObjectAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectObjectAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectObjectAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectObjectAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -21,7 +21,6 @@
 import org.apache.tapestry.enhance.InjectObjectWorker;
 import org.apache.tapestry.services.InjectedValueProvider;
 import org.apache.tapestry.spec.IComponentSpecification;
-import org.apache.tapestry.engine.IPropertySource;
 
 /**
  * Performs injection of objects, in much the same way as the &lt;inject&gt; 
element in a
@@ -48,7 +47,7 @@
     }
 
     public void performEnhancement(EnhancementOperation op, 
IComponentSpecification spec,
-            Method method, Location location, IPropertySource propertySource)
+            Method method, Location location)
     {
         InjectObject io = method.getAnnotation(InjectObject.class);
 

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectPageAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectPageAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectPageAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectPageAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -21,7 +21,6 @@
 import org.apache.tapestry.spec.IComponentSpecification;
 import org.apache.tapestry.spec.InjectSpecification;
 import org.apache.tapestry.spec.InjectSpecificationImpl;
-import org.apache.tapestry.engine.IPropertySource;
 
 /**
  * Uses the [EMAIL PROTECTED] org.apache.tapestry.annotations.InjectPage} 
annotation to add an
@@ -35,7 +34,7 @@
 {
 
     public void performEnhancement(EnhancementOperation op, 
IComponentSpecification spec,
-            Method method, Location location, IPropertySource propertySource)
+            Method method, Location location)
     {
         InjectPage injectPage = method.getAnnotation(InjectPage.class);
 

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectScriptAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectScriptAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectScriptAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectScriptAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -21,7 +21,6 @@
 import org.apache.tapestry.spec.IComponentSpecification;
 import org.apache.tapestry.spec.InjectSpecification;
 import org.apache.tapestry.spec.InjectSpecificationImpl;
-import org.apache.tapestry.engine.IPropertySource;
 
 /**
  * @author Howard Lewis Ship
@@ -31,7 +30,7 @@
 {
 
     public void performEnhancement(EnhancementOperation op, 
IComponentSpecification spec,
-            Method method, Location location, IPropertySource propertySource)
+            Method method, Location location)
     {
         InjectScript annotation = method.getAnnotation(InjectScript.class);
 

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectStateAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectStateAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectStateAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectStateAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -21,7 +21,6 @@
 import org.apache.tapestry.spec.IComponentSpecification;
 import org.apache.tapestry.spec.InjectSpecification;
 import org.apache.tapestry.spec.InjectSpecificationImpl;
-import org.apache.tapestry.engine.IPropertySource;
 
 /**
  * Injects an Application State Object.
@@ -34,7 +33,7 @@
 public class InjectStateAnnotationWorker implements 
MethodAnnotationEnhancementWorker
 {
     public void performEnhancement(EnhancementOperation op, 
IComponentSpecification spec,
-            Method method, Location location, IPropertySource propertySource)
+            Method method, Location location)
     {
         InjectState is = method.getAnnotation(InjectState.class);
         

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectStateFlagAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectStateFlagAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectStateFlagAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/InjectStateFlagAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -21,7 +21,6 @@
 import org.apache.tapestry.spec.IComponentSpecification;
 import org.apache.tapestry.spec.InjectSpecification;
 import org.apache.tapestry.spec.InjectSpecificationImpl;
-import org.apache.tapestry.engine.IPropertySource;
 
 /**
  * 
@@ -31,7 +30,7 @@
 {
 
     public void performEnhancement(EnhancementOperation op, 
IComponentSpecification spec,
-            Method method, Location location, IPropertySource propertySource)
+            Method method, Location location)
     {
         InjectStateFlag isv = method.getAnnotation(InjectStateFlag.class);
         

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/MessageAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/MessageAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/MessageAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/MessageAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -22,7 +22,6 @@
 import org.apache.hivemind.service.BodyBuilder;
 import org.apache.hivemind.service.MethodSignature;
 import org.apache.tapestry.Tapestry;
-import org.apache.tapestry.engine.IPropertySource;
 import org.apache.tapestry.enhance.EnhancementOperation;
 import org.apache.tapestry.spec.IComponentSpecification;
 
@@ -36,7 +35,7 @@
 {
 
     public void performEnhancement(EnhancementOperation op, 
IComponentSpecification spec,
-            Method method, Location location, IPropertySource propertySource)
+            Method method, Location location)
     {
         if (!method.getReturnType().equals(String.class))
             throw new 
ApplicationRuntimeException(AnnotationMessages.returnStringOnly(method

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/MethodAnnotationEnhancementWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/MethodAnnotationEnhancementWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/MethodAnnotationEnhancementWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/MethodAnnotationEnhancementWorker.java
 Thu Jul 26 07:47:23 2007
@@ -19,7 +19,6 @@
 import org.apache.hivemind.Location;
 import org.apache.tapestry.enhance.EnhancementOperation;
 import org.apache.tapestry.spec.IComponentSpecification;
-import org.apache.tapestry.engine.IPropertySource;
 
 /**
  * Defines workers that perform annotation enhancements at the method level.
@@ -41,10 +40,8 @@
      *            the method to which the annotation is attached. The 
annotation
      *            may be obtained from the method.
      * @param location TODO
-     * @param propertySource
-     *            application properties for resolving default values
      */
 
     void performEnhancement(EnhancementOperation op, IComponentSpecification 
spec,
-            Method method, Location location, IPropertySource propertySource);
+            Method method, Location location);
 }

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/ParameterAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/ParameterAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/ParameterAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/ParameterAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -20,7 +20,6 @@
 import org.apache.hivemind.HiveMind;
 import org.apache.hivemind.Location;
 import org.apache.tapestry.IPage;
-import org.apache.tapestry.engine.IPropertySource;
 import org.apache.tapestry.enhance.EnhancementOperation;
 import org.apache.tapestry.spec.IComponentSpecification;
 import org.apache.tapestry.spec.IParameterSpecification;
@@ -38,7 +37,7 @@
 {
 
     public void performEnhancement(EnhancementOperation op, 
IComponentSpecification spec,
-            Method method, Location location, IPropertySource propertySource)
+            Method method, Location location)
     {
         if (IPage.class.isAssignableFrom(method.getDeclaringClass()))
         {

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/PersistAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/PersistAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/PersistAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/java/org/apache/tapestry/annotations/PersistAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -43,14 +43,16 @@
         */
        public static final String DEFAULT_PROPERTY_PERSISTENCE_STRATEGY = 
"org.apache.tapestry.default-property-persistence-strategy";
 
+       private IPropertySource _propertySource;
+
     public void performEnhancement(EnhancementOperation op, 
IComponentSpecification spec,
-            Method method, Location location, IPropertySource propertySource)
+            Method method, Location location)
     {
         Persist p = method.getAnnotation(Persist.class);
         InitialValue iv = method.getAnnotation(InitialValue.class);
 
         String propertyName = AnnotationUtils.getPropertyName(method);
-           String defaultStrategy = 
propertySource.getPropertyValue(DEFAULT_PROPERTY_PERSISTENCE_STRATEGY);
+           String defaultStrategy = 
_propertySource.getPropertyValue(DEFAULT_PROPERTY_PERSISTENCE_STRATEGY);
         String stategy = p.value().length() == 0 ? defaultStrategy : p.value();
 
         IPropertySpecification pspec = new PropertySpecification();
@@ -63,4 +65,8 @@
         spec.addPropertySpecification(pspec);
     }
 
+       public void setPropertySource(IPropertySource propertySource)
+       {
+               _propertySource = propertySource;
+       }
 }

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/AnnotationEnhancementWorkerTest.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/AnnotationEnhancementWorkerTest.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/AnnotationEnhancementWorkerTest.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/AnnotationEnhancementWorkerTest.java
 Thu Jul 26 07:47:23 2007
@@ -26,7 +26,6 @@
 import org.apache.hivemind.Location;
 import org.apache.hivemind.Resource;
 import org.apache.hivemind.impl.DefaultClassResolver;
-import org.apache.tapestry.engine.IPropertySource;
 import org.apache.tapestry.enhance.EnhancementOperation;
 import org.apache.tapestry.spec.IComponentSpecification;
 import org.apache.tapestry.util.DescribedLocation;
@@ -82,7 +81,6 @@
 
         EnhancementOperation op = newOp(AnnotatedPage.class);
         IComponentSpecification spec = newSpec();
-           IPropertySource propertySource = newPropertySource();
 
         MethodAnnotationEnhancementWorker methodWorker = 
newMethodAnnotationEnhancementWorker();
 
@@ -90,7 +88,7 @@
 
         Location location = newMethodLocation(AnnotatedPage.class, m, 
InjectObject.class);
 
-        methodWorker.performEnhancement(op, spec, m, location, propertySource);
+        methodWorker.performEnhancement(op, spec, m, location);
 
         replay();
 
@@ -98,7 +96,6 @@
         worker.setMethodWorkers(newMap(InjectObject.class, methodWorker));
         worker.setClassResolver(resolver);
         worker.setSecondaryAnnotationWorkers(Collections.EMPTY_LIST);
-           worker.setPropertySource(propertySource);
         
         worker.performEnhancement(op, spec);
 
@@ -126,7 +123,6 @@
 
         EnhancementOperation op = newOp(AnnotatedPageSubclass.class);
         IComponentSpecification spec = newSpec();
-           IPropertySource propertySource = newPropertySource();
 
         MethodAnnotationEnhancementWorker methodWorker = 
newMethodAnnotationEnhancementWorker();
 
@@ -134,7 +130,7 @@
 
         Location location = newMethodLocation(AnnotatedPageSubclass.class, m, 
InjectObject.class);
 
-        methodWorker.performEnhancement(op, spec, m, location, propertySource);
+        methodWorker.performEnhancement(op, spec, m, location);
 
         replay();
 
@@ -142,8 +138,7 @@
         worker.setMethodWorkers(newMap(InjectObject.class, methodWorker));
         worker.setClassResolver(resolver);
         worker.setSecondaryAnnotationWorkers(Collections.EMPTY_LIST);
-           worker.setPropertySource(propertySource);
-        
+
         worker.performEnhancement(op, spec);
 
         verify();
@@ -158,7 +153,6 @@
 
         EnhancementOperation op = newOp(AnnotatedPage.class);
         IComponentSpecification spec = newSpec();
-           IPropertySource propertySource = newPropertySource();
 
         MethodAnnotationEnhancementWorker methodWorker = 
newMethodAnnotationEnhancementWorker();
 
@@ -166,7 +160,7 @@
 
         Location location = newMethodLocation(AnnotatedPage.class, m, 
InjectObject.class);
 
-        methodWorker.performEnhancement(op, spec, m, location, propertySource);
+        methodWorker.performEnhancement(op, spec, m, location);
         expectLastCall().andThrow(t);
 
         log.error("An error occured processing annotation "
@@ -182,8 +176,7 @@
         worker.setErrorLog(log);
         worker.setClassResolver(resolver);
         worker.setSecondaryAnnotationWorkers(Collections.EMPTY_LIST);
-           worker.setPropertySource(propertySource);
-        
+
         worker.performEnhancement(op, spec);
 
         verify();

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/BaseAnnotationTestCase.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/BaseAnnotationTestCase.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/BaseAnnotationTestCase.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/BaseAnnotationTestCase.java
 Thu Jul 26 07:47:23 2007
@@ -21,7 +21,6 @@
 import org.apache.hivemind.Resource;
 import org.apache.hivemind.util.ClasspathResource;
 import org.apache.tapestry.BaseComponentTestCase;
-import org.apache.tapestry.engine.IPropertySource;
 import org.apache.tapestry.enhance.EnhancementOperation;
 import org.apache.tapestry.spec.IComponentSpecification;
 
@@ -73,9 +72,4 @@
                 m.getAnnotation(annotationClass),
                 classResource);
     }
-
-       protected IPropertySource newPropertySource()
-       {
-               return newMock(IPropertySource.class);
-       }
 }

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/PersistAnnotationWorkerTest.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/PersistAnnotationWorkerTest.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/PersistAnnotationWorkerTest.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/PersistAnnotationWorkerTest.java
 Thu Jul 26 07:47:23 2007
@@ -46,7 +46,9 @@
 
         Method m = findMethod(AnnotatedPage.class, "getPersistentProperty");
 
-        new PersistAnnotationWorker().performEnhancement(op, spec, m, l, 
propertySource);
+        PersistAnnotationWorker worker = new PersistAnnotationWorker();
+           worker.setPropertySource(propertySource);
+           worker.performEnhancement(op, spec, m, l);
 
         verify();
 
@@ -70,7 +72,9 @@
 
         Method m = findMethod(AnnotatedPage.class, 
"getClientPersistentProperty");
 
-        new PersistAnnotationWorker().performEnhancement(op, spec, m, l, 
propertySource);
+        PersistAnnotationWorker worker = new PersistAnnotationWorker();
+           worker.setPropertySource(propertySource);
+           worker.performEnhancement(op, spec, m, l);
 
         verify();
 
@@ -94,7 +98,9 @@
 
         Method m = findMethod(AnnotatedPage.class, 
"getPersistentPropertyWithInitialValue");
 
-        new PersistAnnotationWorker().performEnhancement(op, spec, m, l, 
propertySource);
+        PersistAnnotationWorker worker = new PersistAnnotationWorker();
+           worker.setPropertySource(propertySource);
+           worker.performEnhancement(op, spec, m, l);
 
         verify();
 
@@ -109,7 +115,7 @@
 
        private IPropertySource trainPropertySource()
        {
-               IPropertySource propertySource = newPropertySource();
+               IPropertySource propertySource = newMock(IPropertySource.class);
                
expect(propertySource.getPropertyValue(PersistAnnotationWorker.DEFAULT_PROPERTY_PERSISTENCE_STRATEGY)).andReturn("session");
                return propertySource;
        }

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestAssetAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestAssetAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestAssetAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestAssetAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -18,7 +18,6 @@
 
 import org.apache.hivemind.Location;
 import org.apache.hivemind.Resource;
-import org.apache.tapestry.engine.IPropertySource;
 import org.apache.tapestry.enhance.EnhancementOperation;
 import org.apache.tapestry.spec.ComponentSpecification;
 import org.apache.tapestry.spec.IAssetSpecification;
@@ -39,13 +38,12 @@
         EnhancementOperation op = newOp();
         IComponentSpecification spec = new ComponentSpecification();
         spec.setSpecificationLocation(r);
-           IPropertySource propertySource = newPropertySource();
 
         replay();
 
         Method m = findMethod(AnnotatedPage.class, "getGlobalStylesheet");
 
-        new AssetAnnotationWorker().performEnhancement(op, spec, m, l, 
propertySource);
+        new AssetAnnotationWorker().performEnhancement(op, spec, m, l);
 
         verify();
 
@@ -63,13 +61,12 @@
         EnhancementOperation op = newOp();
         IComponentSpecification spec = new ComponentSpecification();
         spec.setSpecificationLocation(r);
-           IPropertySource propertySource = newPropertySource();
 
         replay();
 
         Method m = findMethod(AnnotatedPage.class, "getTextAsset");
 
-        new AssetAnnotationWorker().performEnhancement(op, spec, m, l, 
propertySource);
+        new AssetAnnotationWorker().performEnhancement(op, spec, m, l);
 
         verify();
 

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestBeanAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestBeanAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestBeanAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestBeanAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -20,7 +20,6 @@
 
 import org.apache.hivemind.Location;
 import org.apache.tapestry.bean.LightweightBeanInitializer;
-import org.apache.tapestry.engine.IPropertySource;
 import org.apache.tapestry.enhance.EnhancementOperation;
 import org.apache.tapestry.spec.BeanLifecycle;
 import org.apache.tapestry.spec.ComponentSpecification;
@@ -43,13 +42,12 @@
         Location l = newLocation();
         EnhancementOperation op = newOp();
         IComponentSpecification spec = new ComponentSpecification();
-           IPropertySource propertySource = newPropertySource();
 
         Method m = findMethod(AnnotatedPage.class, "getMapBean");
 
         replay();
 
-        new BeanAnnotationWorker().performEnhancement(op, spec, m, l, 
propertySource);
+        new BeanAnnotationWorker().performEnhancement(op, spec, m, l);
 
         verify();
 
@@ -76,13 +74,12 @@
         Location l = newLocation();
         EnhancementOperation op = newOp("hashMapBean", HashMap.class);
         IComponentSpecification spec = new ComponentSpecification();
-           IPropertySource propertySource = newPropertySource();
 
         Method m = findMethod(AnnotatedPage.class, "getHashMapBean");
 
         replay();
 
-        new BeanAnnotationWorker().performEnhancement(op, spec, m, l, 
propertySource);
+        new BeanAnnotationWorker().performEnhancement(op, spec, m, l);
 
         verify();
 
@@ -99,13 +96,12 @@
     {
         EnhancementOperation op = newOp("beanWithInitializer", 
TargetValues.class);
         IComponentSpecification spec = new ComponentSpecification();
-           IPropertySource propertySource = newPropertySource();
 
         Method m = findMethod(AnnotatedPage.class, "getBeanWithInitializer");
 
         replay();
 
-        new BeanAnnotationWorker().performEnhancement(op, spec, m, null, 
propertySource);
+        new BeanAnnotationWorker().performEnhancement(op, spec, m, null);
 
         verify();
 
@@ -121,13 +117,12 @@
     {
         EnhancementOperation op = newOp();
         IComponentSpecification spec = new ComponentSpecification();
-           IPropertySource propertySource = newPropertySource();
 
         Method m = findMethod(AnnotatedPage.class, "getRenderLifecycleBean");
 
         replay();
 
-        new BeanAnnotationWorker().performEnhancement(op, spec, m, null, 
propertySource);
+        new BeanAnnotationWorker().performEnhancement(op, spec, m, null);
 
         verify();
 

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestComponentAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestComponentAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestComponentAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestComponentAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -24,7 +24,6 @@
 import org.apache.tapestry.spec.IBindingSpecification;
 import org.apache.tapestry.spec.IComponentSpecification;
 import org.apache.tapestry.spec.IContainedComponent;
-import org.apache.tapestry.engine.IPropertySource;
 import org.testng.annotations.Test;
 
 /**
@@ -48,11 +47,10 @@
         Method method = findMethod(AnnotatedPage.class, methodName);
 
         EnhancementOperation op = newOp();
-           IPropertySource propertySource = newPropertySource();
 
         replay();        
 
-        new ComponentAnnotationWorker().performEnhancement(op, spec, method, 
location, propertySource);
+        new ComponentAnnotationWorker().performEnhancement(op, spec, method, 
location);
 
         verify();
 

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestInjectComponentAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestInjectComponentAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestInjectComponentAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestInjectComponentAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -18,7 +18,6 @@
 import org.apache.tapestry.enhance.EnhancementOperation;
 import org.apache.tapestry.enhance.InjectComponentWorker;
 import org.apache.tapestry.spec.IComponentSpecification;
-import org.apache.tapestry.engine.IPropertySource;
 import org.testng.annotations.Test;
 
 /**
@@ -43,7 +42,6 @@
         Location l = newLocation();
         EnhancementOperation op = newOp();
         IComponentSpecification spec = newSpec();
-           IPropertySource propertySource = newPropertySource();
 
         InjectComponentWorker delegate = 
org.easymock.classextension.EasyMock.createMock(InjectComponentWorker.class);
         
@@ -54,7 +52,7 @@
         
         InjectComponentAnnotationWorker worker = new 
InjectComponentAnnotationWorker(delegate);
 
-        worker.performEnhancement(op, spec, findMethod(AnnotatedPage.class, 
"getFredField"), l, propertySource);
+        worker.performEnhancement(op, spec, findMethod(AnnotatedPage.class, 
"getFredField"), l);
         
         verify();
         org.easymock.classextension.EasyMock.verify(delegate);

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestInjectObjectAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestInjectObjectAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestInjectObjectAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestInjectObjectAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -21,7 +21,6 @@
 import org.apache.tapestry.enhance.InjectObjectWorker;
 import org.apache.tapestry.services.InjectedValueProvider;
 import org.apache.tapestry.spec.IComponentSpecification;
-import org.apache.tapestry.engine.IPropertySource;
 import org.testng.annotations.Test;
 
 /**
@@ -46,7 +45,6 @@
 
         EnhancementOperation op = newOp();
         IComponentSpecification spec = newSpec();
-           IPropertySource propertySource = newPropertySource();
 
         InjectObjectWorker delegate = 
org.easymock.classextension.EasyMock.createNiceMock(InjectObjectWorker.class);
 
@@ -69,7 +67,7 @@
         
         replay();
         
-        worker.performEnhancement(op, spec, m, l, propertySource);
+        worker.performEnhancement(op, spec, m, l);
         
         verify();
         org.easymock.classextension.EasyMock.verify(delegate);

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestMessageAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestMessageAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestMessageAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestMessageAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -22,7 +22,6 @@
 import org.apache.hivemind.Messages;
 import org.apache.hivemind.service.MethodSignature;
 import org.apache.hivemind.service.impl.ClassFactoryImpl;
-import org.apache.tapestry.engine.IPropertySource;
 import org.apache.tapestry.enhance.EnhanceUtils;
 import org.apache.tapestry.enhance.EnhancementOperation;
 import org.apache.tapestry.enhance.EnhancementOperationImpl;
@@ -69,7 +68,6 @@
     {
         EnhancementOperation op = newOp();
         IComponentSpecification spec = newSpec();
-           IPropertySource propertySource = newPropertySource();
 
         Method method = findMethod(AnnotatedPage.class, "voidMessage");
 
@@ -77,7 +75,7 @@
 
         try
         {
-            new MessageAnnotationWorker().performEnhancement(op, spec, method, 
null, propertySource);
+            new MessageAnnotationWorker().performEnhancement(op, spec, method, 
null);
             unreachable();
         }
         catch (ApplicationRuntimeException ex)
@@ -96,7 +94,6 @@
         Location l = newLocation();
         EnhancementOperation op = newOp();
         IComponentSpecification spec = newSpec();
-           IPropertySource propertySource = newPropertySource();
 
         Method method = findMethod(AnnotatedPage.class, "getLikeGetter");
 
@@ -109,7 +106,7 @@
 
         replay();
 
-        new MessageAnnotationWorker().performEnhancement(op, spec, method, l, 
propertySource);
+        new MessageAnnotationWorker().performEnhancement(op, spec, method, l);
 
         verify();
     }
@@ -119,7 +116,6 @@
         Location l = newLocation();
         EnhancementOperation op = newOp();
         IComponentSpecification spec = newSpec();
-           IPropertySource propertySource = newPropertySource();
 
         Method method = findMethod(AnnotatedPage.class, methodName);
 
@@ -127,7 +123,7 @@
 
         replay();
 
-        new MessageAnnotationWorker().performEnhancement(op, spec, method, l, 
propertySource);
+        new MessageAnnotationWorker().performEnhancement(op, spec, method, l);
 
         verify();
     }
@@ -139,7 +135,6 @@
         ComponentSpecification spec = new ComponentSpecification();
         EnhancementOperationImpl op = new 
EnhancementOperationImpl(getClassResolver(), spec,
                 baseClass, new ClassFactoryImpl(), null);
-           IPropertySource propertySource = newPropertySource();
 
         op.addInjectedField("_messages", Messages.class, messages);
 
@@ -147,7 +142,7 @@
 
         Method method = findMethod(baseClass, methodName);
 
-        new MessageAnnotationWorker().performEnhancement(op, spec, method, l, 
propertySource);
+        new MessageAnnotationWorker().performEnhancement(op, spec, method, l);
 
         ComponentConstructor cc = op.getConstructor();
 

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestParameterAnnotationWorker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestParameterAnnotationWorker.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestParameterAnnotationWorker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestParameterAnnotationWorker.java
 Thu Jul 26 07:47:23 2007
@@ -18,7 +18,6 @@
 
 import org.apache.hivemind.ApplicationRuntimeException;
 import org.apache.hivemind.Location;
-import org.apache.tapestry.engine.IPropertySource;
 import org.apache.tapestry.enhance.EnhancementOperation;
 import org.apache.tapestry.spec.ComponentSpecification;
 import org.apache.tapestry.spec.IComponentSpecification;
@@ -47,15 +46,14 @@
                 + propertyName.substring(0, 1).toUpperCase() + 
propertyName.substring(1));
         
         EnhancementOperation op = newMock(EnhancementOperation.class);
-           IPropertySource propertySource = newPropertySource();
-        
+
         expect(op.getPropertyType(propertyName)).andReturn(m.getReturnType());
         
         IComponentSpecification spec = new ComponentSpecification();
 
         replay();
 
-        new ParameterAnnotationWorker().performEnhancement(op, spec, m, 
location, propertySource);
+        new ParameterAnnotationWorker().performEnhancement(op, spec, m, 
location);
 
         verify();
 
@@ -125,15 +123,14 @@
         Method m = findMethod(AnnotatedPage.class, "getSimpleParameter");
         
         EnhancementOperation op = newMock(EnhancementOperation.class);
-           IPropertySource propertySource = newPropertySource();
-                
+
         IComponentSpecification spec = new ComponentSpecification();
 
         replay();
 
         try
         {
-            new ParameterAnnotationWorker().performEnhancement(op, spec, m, 
null, propertySource);
+            new ParameterAnnotationWorker().performEnhancement(op, spec, m, 
null);
             unreachable();
         }
         catch (ApplicationRuntimeException ex)

Modified: 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestSimpleAnnotationWorkers.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestSimpleAnnotationWorkers.java?view=diff&rev=559836&r1=559835&r2=559836
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestSimpleAnnotationWorkers.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/TestSimpleAnnotationWorkers.java
 Thu Jul 26 07:47:23 2007
@@ -21,7 +21,6 @@
 import org.apache.tapestry.spec.ComponentSpecification;
 import org.apache.tapestry.spec.IComponentSpecification;
 import org.apache.tapestry.spec.InjectSpecification;
-import org.apache.tapestry.engine.IPropertySource;
 import org.testng.annotations.Test;
 
 /**
@@ -151,13 +150,12 @@
     {
         EnhancementOperation op = newOp();
         IComponentSpecification spec = new ComponentSpecification();
-           IPropertySource propertySource = newPropertySource();
 
         Method method = findMethod(AnnotatedPage.class, methodName);
 
         replay();
 
-        worker.performEnhancement(op, spec, method, location, propertySource);
+        worker.performEnhancement(op, spec, method, location);
 
         verify();
 


Reply via email to