Author: andyhot
Date: Tue Apr 25 05:21:25 2006
New Revision: 396858

URL: http://svn.apache.org/viewcvs?rev=396858&view=rev
Log:
Removed usages of deprecated method AbstractLinkComponent.getLink

Modified:
    
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ActionLink.java
    
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ActionLink.jwc
    
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/DirectLink.java
    
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/DirectLink.jwc
    
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ServiceLink.java
    
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ServiceLink.jwc

Modified: 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ActionLink.java
URL: 
http://svn.apache.org/viewcvs/tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ActionLink.java?rev=396858&r1=396857&r2=396858&view=diff
==============================================================================
--- 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ActionLink.java
 (original)
+++ 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ActionLink.java
 Tue Apr 25 05:21:25 2006
@@ -18,8 +18,8 @@
 import org.apache.tapestry.IActionListener;
 import org.apache.tapestry.IRequestCycle;
 import org.apache.tapestry.RenderRewoundException;
-import org.apache.tapestry.Tapestry;
 import org.apache.tapestry.engine.ActionServiceParameter;
+import org.apache.tapestry.engine.IEngineService;
 import org.apache.tapestry.engine.ILink;
 import org.apache.tapestry.listener.ListenerInvoker;
 
@@ -58,11 +58,18 @@
 
             throw new RenderRewoundException(this);
         }
-
-        return getLink(cycle, Tapestry.ACTION_SERVICE, new 
ActionServiceParameter(this, actionId));
+        
+        return getActionService().getLink(false, new 
ActionServiceParameter(this, actionId));
     }
 
     public abstract IActionListener getListener();
 
     public abstract ListenerInvoker getListenerInvoker();
+    
+    /**
+     * Injected.
+     * 
+     * @since 4.0.3
+     */    
+    public abstract IEngineService getActionService();        
 }

Modified: 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ActionLink.jwc
URL: 
http://svn.apache.org/viewcvs/tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ActionLink.jwc?rev=396858&r1=396857&r2=396858&view=diff
==============================================================================
--- 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ActionLink.jwc
 (original)
+++ 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ActionLink.jwc
 Tue Apr 25 05:21:25 2006
@@ -57,4 +57,6 @@
   
   <inject property="listenerInvoker" object="infrastructure:listenerInvoker"/>
   
+  <inject property="actionService" object="engine-service:action"/>
+  
 </component-specification>

Modified: 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/DirectLink.java
URL: 
http://svn.apache.org/viewcvs/tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/DirectLink.java?rev=396858&r1=396857&r2=396858&view=diff
==============================================================================
--- 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/DirectLink.java
 (original)
+++ 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/DirectLink.java
 Tue Apr 25 05:21:25 2006
@@ -21,6 +21,7 @@
 import org.apache.tapestry.IRequestCycle;
 import org.apache.tapestry.Tapestry;
 import org.apache.tapestry.engine.DirectServiceParameter;
+import org.apache.tapestry.engine.IEngineService;
 import org.apache.tapestry.engine.ILink;
 import org.apache.tapestry.listener.ListenerInvoker;
 
@@ -48,8 +49,8 @@
         Object[] serviceParameters = 
constructServiceParameters(getParameters());
 
         DirectServiceParameter dsp = new DirectServiceParameter(this, 
serviceParameters);
-
-        return getLink(cycle, Tapestry.DIRECT_SERVICE, dsp);
+        
+        return getDirectService().getLink(false, dsp);
     }
 
     /**
@@ -116,4 +117,11 @@
      */
 
     public abstract ListenerInvoker getListenerInvoker();
+    
+    /**
+     * Injected.
+     * 
+     * @since 4.0.3
+     */    
+    public abstract IEngineService getDirectService();    
 }

Modified: 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/DirectLink.jwc
URL: 
http://svn.apache.org/viewcvs/tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/DirectLink.jwc?rev=396858&r1=396857&r2=396858&view=diff
==============================================================================
--- 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/DirectLink.jwc
 (original)
+++ 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/DirectLink.jwc
 Tue Apr 25 05:21:25 2006
@@ -65,4 +65,6 @@
   
   <inject property="listenerInvoker" object="infrastructure:listenerInvoker"/>
   
+  <inject property="directService" object="engine-service:direct"/>
+  
 </component-specification>

Modified: 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ServiceLink.java
URL: 
http://svn.apache.org/viewcvs/tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ServiceLink.java?rev=396858&r1=396857&r2=396858&view=diff
==============================================================================
--- 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ServiceLink.java
 (original)
+++ 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ServiceLink.java
 Tue Apr 25 05:21:25 2006
@@ -16,6 +16,7 @@
 
 import org.apache.tapestry.IRequestCycle;
 import org.apache.tapestry.engine.ILink;
+import org.apache.tapestry.services.ServiceMap;
 
 /**
  *  A component for creating a link for an arbitrary [EMAIL PROTECTED] 
org.apache.tapestry.engine.IEngineService
@@ -34,11 +35,14 @@
     public ILink getLink(IRequestCycle cycle)
     {
         Object[] parameters = 
DirectLink.constructServiceParameters(getParameters());
+        
+        return getServiceMap().getService(getService()).getLink(false, 
parameters);
 
-        return getLink(cycle, getService(), parameters);
     }
 
     public abstract String getService();
 
     public abstract Object getParameters();
+    
+    public abstract ServiceMap getServiceMap();
 }

Modified: 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ServiceLink.jwc
URL: 
http://svn.apache.org/viewcvs/tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ServiceLink.jwc?rev=396858&r1=396857&r2=396858&view=diff
==============================================================================
--- 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ServiceLink.jwc
 (original)
+++ 
tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/link/ServiceLink.jwc
 Tue Apr 25 05:21:25 2006
@@ -56,6 +56,8 @@
       Forces the link to be generated as an absolute URL with the given port
       (unless the port matches the port for the current request).
     </description>
-  </parameter>  
+  </parameter>
+  
+  <inject property="serviceMap" object="infrastructure:serviceMap"/>  
   
 </component-specification>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to