You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2006/07/07 17:22:39 UTC

svn commit: r419907 - in /tapestry/tapestry5/tapestry-core/trunk/src: main/java/org/apache/tapestry/ioc/annotations/ main/java/org/apache/tapestry/ioc/def/ main/resources/org/apache/tapestry/internal/ioc/ site/apt/ioc/ test/java/org/apache/tapestry/int...

Author: hlship
Date: Fri Jul  7 08:22:38 2006
New Revision: 419907

URL: http://svn.apache.org/viewvc?rev=419907&view=rev
Log:
Rename the term "

Modified:
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/annotations/InjectService.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/def/ServiceDef.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/ioc/IOCStrings.properties
    tapestry/tapestry5/tapestry-core/trunk/src/site/apt/ioc/index.apt
    tapestry/tapestry5/tapestry-core/trunk/src/site/apt/ioc/module.apt
    tapestry/tapestry5/tapestry-core/trunk/src/site/apt/ioc/service.apt
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/ioc/BasicServiceCreatorTest.java

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/annotations/InjectService.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/annotations/InjectService.java?rev=419907&r1=419906&r2=419907&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/annotations/InjectService.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/annotations/InjectService.java Fri Jul  7 08:22:38 2006
@@ -25,8 +25,8 @@
 @Retention(RUNTIME)
 @Documented
 /**
- * Annotation used with parameters of builder methods to identify the service to be injected into
- * the builder method via the parameter.
+ * Annotation used with parameters of service builder methods to identify the service to be injected
+ * into the service builder method via the parameter.
  * 
  * @author Howard M. Lewis Ship
  */

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/def/ServiceDef.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/def/ServiceDef.java?rev=419907&r1=419906&r2=419907&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/def/ServiceDef.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/def/ServiceDef.java Fri Jul  7 08:22:38 2006
@@ -41,8 +41,8 @@
 
     /**
      * Returns the lifecycle defined for the service. This is indicated by adding a
-     * {@link org.apache.tapestry.ioc.annotations.Lifecycle} annotation to the builder method for
-     * the service.
+     * {@link org.apache.tapestry.ioc.annotations.Lifecycle} annotation to the service builder
+     * method for the service.
      */
     String getServiceLifeycle();
 

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/ioc/IOCStrings.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/ioc/IOCStrings.properties?rev=419907&r1=419906&r2=419907&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/ioc/IOCStrings.properties (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/ioc/IOCStrings.properties Fri Jul  7 08:22:38 2006
@@ -22,5 +22,5 @@
 service-wrong-interface=Service ''{0}'' implements interface {1}, which is not compatible with the requested type {2}.
 instantiate-builder-error=Unable to instantiate class {0} as builder for module ''{1}'': {2}
 singleton-proxy-to-string=<Singleton proxy for {0}({1})>
-builder-method-error=Error invoking builder method {0} (for service ''{1}''): {2}
+builder-method-error=Error invoking service builder method {0} (for service ''{1}''): {2}
 builder-method-returned-null=Builder method {0} (for service ''{1}'') returned null.

Modified: tapestry/tapestry5/tapestry-core/trunk/src/site/apt/ioc/index.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/site/apt/ioc/index.apt?rev=419907&r1=419906&r2=419907&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/site/apt/ioc/index.apt (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/site/apt/ioc/index.apt Fri Jul  7 08:22:38 2006
@@ -62,7 +62,8 @@
   XML is ultimately more verbose and unwieldy.  As the {{{service.html#injection}}} show, a small amount of Java code is simpler
   and easier than a big chunk of XML.
 
-  In addition, moving from XML to Java code makes things easier to test; you can unit test the builder methods of your
+  In addition, moving from XML to Java code makes things easier to test; you can unit test the 
+  service builder methods of your
   module builder class, but you can't realistically unit test an XML descriptor.
   
   Modules should be easily packaged into JAR files and should be zero-configuration (just drop the JAR onto the classpath).
@@ -126,7 +127,7 @@
     
   []
   
-  The methods which define and construct services are called <<builder methods>>.
+  The methods which define and construct services are called <<service builder methods>>.
   
   The <<registry>> is the outside world's view of the modules and services. From the registry, it is possible to obtain
   a service, via its qualified id or by its service interface. 
@@ -154,6 +155,6 @@
   request in a servlet application).
   
   <<Dependencies>> are other services (or other objects) that are needed by a service implementation. These 
-  dependencies can be <<injected>> into a builder method and provided, from there, to a service implementation via
+  dependencies can be <<injected>> into a service builder method and provided, from there, to a service implementation via
   its constructor, or via methods on the service implementation.
   

Modified: tapestry/tapestry5/tapestry-core/trunk/src/site/apt/ioc/module.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/site/apt/ioc/module.apt?rev=419907&r1=419906&r2=419907&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/site/apt/ioc/module.apt (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/site/apt/ioc/module.apt Fri Jul  7 08:22:38 2006
@@ -11,7 +11,7 @@
 
   A module bulider defines builder methods, one for each service provided by the module.
 
-  Builder methods are public methods. Here's a trivial example:
+  Service builder methods are public methods. Here's a trivial example:
 
 +-----------------------------------------------------------------------------------+
 package org.example.myapp.services;
@@ -28,7 +28,7 @@
   By default, a module's id is the same as its package name (we'll see how to override
   that shortly).  Here the module id will be org.example.myapp.services.
 
-  Any public method whose name starts with "build" is a builder method, implicitly
+  Any public method whose name starts with "build" is a service builder method, implicitly
   defining a service within the module.  Here we're defining a service around
   the Indexer service interface (presumably also in the org.example.myapp.services
   package).
@@ -38,7 +38,7 @@
   Prefixing with the module id results in the fully qualfied id 
   org.example.myapp.services.Indexer.
 
-  We could extend this example by adding additional builder methods, or by showing
+  We could extend this example by adding additional service builder methods, or by showing
   how to inject dependencies. See {{{service.html#Injecting Dependencies}the service documentation}} 
   for more details.
 

Modified: tapestry/tapestry5/tapestry-core/trunk/src/site/apt/ioc/service.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/site/apt/ioc/service.apt?rev=419907&r1=419906&r2=419907&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/site/apt/ioc/service.apt (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/site/apt/ioc/service.apt Fri Jul  7 08:22:38 2006
@@ -13,7 +13,7 @@
   Tapestry IoC effectively walls you off from backdoors such as casts.
   
   Tapestry doesn't know how to instantiate and configure your service; instead it relies
-  on you to provide the code to do so, in a builder method:
+  on you to provide the code to do so, in a service builder method:
   
 +-----------------------------------------------------------------------------------+
 package org.example.myapp.services;
@@ -52,15 +52,16 @@
   }
 +-----------------------------------------------------------------------------------+
 
-  Here we've annotated the parameters of the builder method to identify what
+  Here we've annotated the parameters of the service builder method to identify what
   service to inject for that parameter.  We used unqualified ids ... these are the names
   of other services within the <same module>: there will be a buildJobScheduler()
-  and a buildFileSystem() builder methods as well.
+  and a buildFileSystem() service builder methods as well.
   
-  Note that we don't invoke those builder methods ... we just "advertise" that we need
+  Note that we don't invoke those service builder methods ... we just "advertise" that we need
   the named services.  Tapestry IoC will provide the necessary proxies and, when we start to
   invoke methods on those proxies, will ensure that the full service, including its
-  interceptors and its dependencies, are ready to go.    
+  interceptors and its dependencies, are ready to go. Again, this is done in a 
+  thread-safe manner.   
   
   If we used fully qualified service ids, such as "org.examples.myapps.jobs.JobScheduler",
   then we can access services from some other module entirely.
@@ -74,7 +75,7 @@
   visible within the same module.
   
   The {{{../apidocs/org/apache/tapestry/ioc/annotations/Private.html}@Private annotation}} can
-  be attached to a builder method to indicate that the service in question is private.
+  be attached to a service builder method to indicate that the service in question is private.
   
 Defining Service Lifecycle
 

Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/ioc/BasicServiceCreatorTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/ioc/BasicServiceCreatorTest.java?rev=419907&r1=419906&r2=419907&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/ioc/BasicServiceCreatorTest.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/ioc/BasicServiceCreatorTest.java Fri Jul  7 08:22:38 2006
@@ -234,7 +234,7 @@
         {
             assertEquals(
                     ex.getMessage(),
-                    "Error invoking builder method public org.apache.tapestry.internal.ioc.FieService "
+                    "Error invoking service builder method public org.apache.tapestry.internal.ioc.FieService "
                             + "org.apache.tapestry.internal.ioc.BasicServiceCreatorTest.build_fail() "
                             + "(for service 'ioc.Fie'): java.lang.reflect.InvocationTargetException");