tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r544519 - in /tapestry/tapestry5/trunk: quickstart/ quickstart/src/main/resources/archetype-resources/ quickstart/src/main/resources/archetype-resources/src/main/java/services/ tapestry-project/support/
Date Tue, 05 Jun 2007 15:29:10 GMT
Author: hlship
Date: Tue Jun  5 08:29:10 2007
New Revision: 544519

URL: http://svn.apache.org/viewvc?view=rev&rev=544519
Log:
TAPESTRY-1505: The quickstart archetype should include an empty bind() method

Modified:
    tapestry/tapestry5/trunk/quickstart/pom.xml
    tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/pom.xml
    tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/src/main/java/services/AppModule.java
    tapestry/tapestry5/trunk/tapestry-project/support/new-project.rb

Modified: tapestry/tapestry5/trunk/quickstart/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/quickstart/pom.xml?view=diff&rev=544519&r1=544518&r2=544519
==============================================================================
--- tapestry/tapestry5/trunk/quickstart/pom.xml (original)
+++ tapestry/tapestry5/trunk/quickstart/pom.xml Tue Jun  5 08:29:10 2007
@@ -4,7 +4,6 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.tapestry</groupId>
   <artifactId>quickstart</artifactId>
-  <version>5.0.5-SNAPSHOT</version>
   <packaging>maven-plugin</packaging>
   <parent>
     <groupId>org.apache.tapestry</groupId>

Modified: tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/pom.xml?view=diff&rev=544519&r1=544518&r2=544519
==============================================================================
--- tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/pom.xml (original)
+++ tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/pom.xml Tue
Jun  5 08:29:10 2007
@@ -96,10 +96,18 @@
     </reporting>
 
   <repositories>
+    <!-- This can be uncommented when the tapestry-release-version is a snapshot.
+         The non-snapshot Tapestry artifacts are distributed through the central
+         repository at ibiblio. 
+  
     <repository>
       <id>tapestry-snapshots</id>
       <url>http://people.apache.org/~hlship/tapestry-snapshot-repository/</url>
     </repository>
+    
+    -->
+    
+    
     <repository>
       <id>codehaus.snapshots</id>
       <url>http://snapshots.repository.codehaus.org</url>
@@ -113,19 +121,19 @@
   </repositories>
   
   <pluginRepositories>
+    
+    <!-- As above, this can be uncommented when access to the snapshot version
+         of a Tapestry Maven plugin is required.
     <pluginRepository>
       <id>tapestry-snapshots</id>
       <url>http://people.apache.org/~hlship/tapestry-snapshot-repository/</url>
     </pluginRepository>
-    <!-- A necessary version of the surefire plugin, 2.8-SNAPSHOT, lives here. -->
-    <pluginRepository>
-      <id>howardlewisship.com</id>
-      <url>http://howardlewisship.com/repository</url>
-    </pluginRepository>
+    
+    -->
   </pluginRepositories>
   
 
     <properties>
-        <tapestry-release-version>5.0.4-SNAPSHOT</tapestry-release-version>
+        <tapestry-release-version>5.0.5-SNAPSHOT</tapestry-release-version>
     </properties>
 </project>

Modified: tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/src/main/java/services/AppModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/src/main/java/services/AppModule.java?view=diff&rev=544519&r1=544518&r2=544519
==============================================================================
--- tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/src/main/java/services/AppModule.java
(original)
+++ tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/src/main/java/services/AppModule.java
Tue Jun  5 08:29:10 2007
@@ -5,6 +5,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.MappedConfiguration;
 import org.apache.tapestry.ioc.OrderedConfiguration;
+import org.apache.tapestry.ioc.ServiceBinder;
 import org.apache.tapestry.ioc.annotations.InjectService;
 import org.apache.tapestry.services.Request;
 import org.apache.tapestry.services.RequestFilter;
@@ -13,10 +14,21 @@
 
 /**
  * This module is automatically included as part of the Tapestry IoC Registry, it's a good
place to
- * configure and extend Tapestry, or to place your own services.
+ * configure and extend Tapestry, or to place your own service definitions.
  */
 public class AppModule
 {
+    public static void bind(ServiceBinder binder)
+    {
+        // binder.bind(MyServiceInterface.class, MyServiceImpl.class);
+        
+        // Make bind() calls on the binder object to define most IoC services.
+        // Use service builder methods (example below) when the implementation
+        // is provided inline, or requires more initialization than simply
+        // invoking the constructor.
+    }
+    
+    
     public static void contributeApplicationDefaults(
             MappedConfiguration<String, String> configuration)
     {
@@ -31,11 +43,22 @@
     
 
     /**
-     * This is a service definition, the service will be named TimingFilter. The interface,
+     * This is a service definition, the service will be named "TimingFilter". The interface,
      * RequestFilter, is used within the RequestHandler service pipeline, which is built
from the
      * RequestHandler service configuration. Tapestry IoC is responsible for passing in an
      * appropriate Log instance. Requests for static resources are handled at a higher level,
so
      * this filter will only be invoked for Tapestry related requests.
+     * 
+     * <p>
+     * Service builder methods are useful when the implementation is inline as an inner class
+     * (as here) or require some other kind of special initialization. In most cases,
+     * use the static bind() method instead. 
+     * 
+     * <p>
+     * If this method was named "build", then the service id would be taken from the 
+     * service interface and would be "RequestFilter".  Since Tapestry already defines
+     * a service named "RequestFilter" we use an explicit service id that we can reference
+     * inside the contribution method.
      */    
     public RequestFilter buildTimingFilter(final Log log)
     {

Modified: tapestry/tapestry5/trunk/tapestry-project/support/new-project.rb
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-project/support/new-project.rb?view=diff&rev=544519&r1=544518&r2=544519
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-project/support/new-project.rb (original)
+++ tapestry/tapestry5/trunk/tapestry-project/support/new-project.rb Tue Jun  5 08:29:10 2007
@@ -32,7 +32,7 @@
   opts.on("-o", "--offline", "Execute Maven in offline mode") { $offline = true }
   
   opts.on("-V", "--archetype-version VERSION", "Version of the Tapestry quickstart archetype")
do |value|
-    $archtypeVersion = value
+    $archetypeVersion = value
   end
   
   opts.on("-h", "--help", "Help for this command") do



Mime
View raw message