Title: [waffle-scm] [911] sandbox/v2experiment/waffle-distribution/src/site/content: fixup some language

Diff

Modified: sandbox/v2experiment/waffle-distribution/src/site/content/ajax.html (910 => 911)

--- sandbox/v2experiment/waffle-distribution/src/site/content/ajax.html	2009-02-17 14:56:27 UTC (rev 910)
+++ sandbox/v2experiment/waffle-distribution/src/site/content/ajax.html	2009-02-17 17:59:55 UTC (rev 911)
@@ -60,19 +60,17 @@
      Random value from Server: <div id="random"></div>
   </textarea>
 
-<h3>Wire it up with the Registrar</h3>
+<h3>Wire it up with the WaffleWebappComposer subclass</h3>
 
 <p>The <i>FoobarController</i> is registered under the name "<i>foobar</i>". Notice that the Controller is being
 registered to the Application level context.</p>
 
 <textarea class="java:nogutter:nocontrols" name="code">
-    public class CustomRegistrar extends AbstractRegistrar {
-      public CustomRegistrar(Registrar delegate) {
-        super(delegate);
-      }
+    public class MyAjaxWaffleWebappComposer extends WaffleWebappComposer {
 
-      public void application() {
-        register("foobar", FoobarController.class);
+      public void composeApplication(MutablePicoContainer pico, ServletContext context) {
+        super.composeApplication(pico, context);
+        pico.addComponent("foobar", FoobarController.class);
       }
     }
   </textarea>

Modified: sandbox/v2experiment/waffle-distribution/src/site/content/composition.html (910 => 911)

--- sandbox/v2experiment/waffle-distribution/src/site/content/composition.html	2009-02-17 14:56:27 UTC (rev 910)
+++ sandbox/v2experiment/waffle-distribution/src/site/content/composition.html	2009-02-17 17:59:55 UTC (rev 911)
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head>
-<title>Registrar</title></head>
+<title>Composition</title></head>
 <body>
 
 

Modified: sandbox/v2experiment/waffle-distribution/src/site/content/examples/hello-world.html (910 => 911)

--- sandbox/v2experiment/waffle-distribution/src/site/content/examples/hello-world.html	2009-02-17 14:56:27 UTC (rev 910)
+++ sandbox/v2experiment/waffle-distribution/src/site/content/examples/hello-world.html	2009-02-17 17:59:55 UTC (rev 911)
@@ -15,7 +15,7 @@
 
   <ol type="1">
     <li>Create a Controller</li>
-    <li>Register that Controller with the Registrar</li>
+    <li>Register that Controller via the WaffleWebappComposer subclass</li>
     <li>Create the View</li>
   </ol>
 
@@ -35,24 +35,20 @@
     }
   </textarea>
 
-  <h3>Registrar</h3>
+  <h3>Composition</h3>
 
   <p>
-    All Controllers need to be registered with Waffle. This is done through the Registrar. Line <b>9</b> in the
-    <i>MyRegistrar</i> class below registers the <i>HelloWorldController</i> under the name <b>"helloworld"</b>.
-    This Registrar will need to referenced in the <a href=""
+    All Controllers need to be registered with Waffle. This is done through a subclass of WaffleWebappComposer. Line <b>9</b> in the
+    <i>MyComposer</i> class below registers the <i>HelloWorldController</i> under the name <b>"helloworld"</b>.
+    This WaffleWebappComposer subclass will need to referenced in the <a href="" file.
   </p>
 
   <textarea class="java:nogutter:nocontrols" name="code">
-    public class MyRegistrar extends AbstractRegistrar {
+    public class MyComposer extends WaffleWebappComposer {
 
-      public MyRegistrar(Registrar delegate) {
-        super(delegate);
+      public void composeApplication(MutablePicoContainer pico, ServletContext context) {
+        pico.addComponent("helloworld", HelloWorldController.class);
       }
-
-      public void application() {
-        register("helloworld", HelloWorldController.class);
-      }
     }
   </textarea>
 

Modified: sandbox/v2experiment/waffle-distribution/src/site/content/examples/simple-calculator.html (910 => 911)

--- sandbox/v2experiment/waffle-distribution/src/site/content/examples/simple-calculator.html	2009-02-17 14:56:27 UTC (rev 910)
+++ sandbox/v2experiment/waffle-distribution/src/site/content/examples/simple-calculator.html	2009-02-17 17:59:55 UTC (rev 911)
@@ -49,21 +49,17 @@
   }
 </textarea>
 
-<h3>Registrar</h3>
+<h3>WaffleWebappComposer</h3>
 
 <p>Registration is as you would expect. In this example the Controller must be registered to the session level so that users
   are not sharing the same <i>result</i> property.</p>
 
 <textarea class="java:nogutter:nocontrols" name="code">
-  public class MyRegistrar extends AbstractRegistrar {
+  public class MyComposer extends WaffleWebappComposer {
 
-    public MyRegistrar(Registrar delegate) {
-      super(delegate);
+    public void composeSession(MutablePicoContainer pico) {
+      pico.addComponent("calculator", CalculatorController.class);
     }
-
-    public void session() {
-      register("calculator", CalculatorController.class);
-    }
   }
 </textarea>
 

Modified: sandbox/v2experiment/waffle-distribution/src/site/content/i18n.html (910 => 911)

--- sandbox/v2experiment/waffle-distribution/src/site/content/i18n.html	2009-02-17 14:56:27 UTC (rev 910)
+++ sandbox/v2experiment/waffle-distribution/src/site/content/i18n.html	2009-02-17 17:59:55 UTC (rev 911)
@@ -37,14 +37,21 @@
     }
   </textarea>
 
-or directly in the Registrar:
+or directly in the WaffleWebappComposer subclass:
 
 <textarea class="java:nogutter:nocontrols" name="code">
-    public class MyRegistrar extends AbstractRegistrar {
-        public application(){
-            MessageResources resources = registry.locateByType(MessageResources.class);
-            resources.useURI("MyResources,MyOtherResources");
-        }
+    public class MyComposer extends WaffleWebappComposer {
+	    @Override
+	    protected Class&lt;? extends MessageResources&gt; messageResources() {
+	        return MyMessageResources.class;
+	    }
+	    public static class MyMessageResources extends DefaultMessageResources {
+		    public MyMessageResources() {
+				useURI("MyResources,MyOtherResources");
+		    }
+		}
+	}
+
     }
   </textarea>
 </p>

Modified: sandbox/v2experiment/waffle-distribution/src/site/content/index.html (910 => 911)

--- sandbox/v2experiment/waffle-distribution/src/site/content/index.html	2009-02-17 14:56:27 UTC (rev 910)
+++ sandbox/v2experiment/waffle-distribution/src/site/content/index.html	2009-02-17 17:59:55 UTC (rev 911)
@@ -60,12 +60,12 @@
   used regardless of its signature or return type. Waffle will react
   differently depending on what is returned from the ActionMethod, see
   <a href="" Methods</a> for further details.</li>
-  <li><b>Registrar</b> - the Registrar class is where the <i>Controllers</i>, 
+  <li><b>WaffleWebappComposer subclass</b> - the composition class is where the <i>Controllers</i>, 
   and other components your application depends on, are registered. 
   Typically, most web frameworks require your applications to create special XML file(s) 
-  for this, but int Waffle <b>Registrars are Java objects that allow you to implement
+  for this, but int Waffle <b>WaffleWebappComposer are Java objects that allow you to declare
   your business logic more efficiently</b>.  Of course, Waffle does allow - 
-  but <b>does not mandate</b> - a Registrar to read a configuration from a file,   
+  but <b>does not mandate</b> - a WaffleWebappComposer to read a configuration from a file,   
   be it XML or a scripting language.  
   </li>
 </ol>

Modified: sandbox/v2experiment/waffle-distribution/src/site/content/interceptors.html (910 => 911)

--- sandbox/v2experiment/waffle-distribution/src/site/content/interceptors.html	2009-02-17 14:56:27 UTC (rev 910)
+++ sandbox/v2experiment/waffle-distribution/src/site/content/interceptors.html	2009-02-17 17:59:55 UTC (rev 911)
@@ -60,7 +60,7 @@
 
 
     <p>
-      <i>MethodInterceptor</i> are registered with Waffle through the Registrar. So like other components in Waffle
+      <i>MethodInterceptor</i> are registered with Waffle through the WaffleWebappComposer subclass. So like other components in Waffle
       MethodInterceptors can take advantage of Dependency Injection.
     </p>
 

Modified: sandbox/v2experiment/waffle-distribution/src/site/content/lifecycle.html (910 => 911)

--- sandbox/v2experiment/waffle-distribution/src/site/content/lifecycle.html	2009-02-17 14:56:27 UTC (rev 910)
+++ sandbox/v2experiment/waffle-distribution/src/site/content/lifecycle.html	2009-02-17 17:59:55 UTC (rev 911)
@@ -9,10 +9,10 @@
   <h2>Component Lifecycle</h2>
 
   <p>
-    Waffle provides lifecycle support which means we can register component with the Registrar that implement
+    Waffle provides lifecycle support which means we can register component with the WaffleWebappComposer subclass that implements
     <b><a href=""
         org.codehaus.waffle.Startable</a></b>.  This will allow a component to be started as soon as a context (application,
-    session or request) is initialized and stopped when the context is destroyed. This is an extremly useful and
+    session or request) is initialized and stopped when the context is destroyed. This is an extremely useful and
     powerful ability.  With this feature it is possible to register "Janitor" type of components that will
     cleanup resources when their particular context is being destroyed (i.e. closing jdbc resources).
   </p>

Modified: sandbox/v2experiment/waffle-distribution/src/site/content/monitors.html (910 => 911)

--- sandbox/v2experiment/waffle-distribution/src/site/content/monitors.html	2009-02-17 14:56:27 UTC (rev 910)
+++ sandbox/v2experiment/waffle-distribution/src/site/content/monitors.html	2009-02-17 17:59:55 UTC (rev 911)
@@ -32,10 +32,6 @@
         <td align="left"><a href=""
         org.codehaus.waffle.monitor.ControllerMonitor</a></td>
       </tr>
-      <tr class="b">
-        <td align="left"><a href=""
-        org.codehaus.waffle.monitor.RegistrarMonitor</a></td>
-      </tr>
       <tr class="a">
         <td align="left"><a href=""
         org.codehaus.waffle.monitor.ServletMonitor</a></td>

Modified: sandbox/v2experiment/waffle-distribution/src/site/content/ruby/from-java-to-ruby.html (910 => 911)

--- sandbox/v2experiment/waffle-distribution/src/site/content/ruby/from-java-to-ruby.html	2009-02-17 14:56:27 UTC (rev 910)
+++ sandbox/v2experiment/waffle-distribution/src/site/content/ruby/from-java-to-ruby.html	2009-02-17 17:59:55 UTC (rev 911)
@@ -7,7 +7,7 @@
 </head>
 <body>
 <h2>Accessing Java components in Ruby controllers.</h2>
-Here we examine Ruby-based controllers, and the invoking of Java functionaility from them. Consider:
+Here we examine Ruby-based controllers, and the invoking of Java functionality from them. Consider:
 <br />
 <textarea class="java:nogutter:nocontrols" name="code">
 public class MyRegistrar extends RubyScriptedRegistrar {

Modified: sandbox/v2experiment/waffle-distribution/src/site/content/tutorials/tutorial-one.html (910 => 911)

--- sandbox/v2experiment/waffle-distribution/src/site/content/tutorials/tutorial-one.html	2009-02-17 14:56:27 UTC (rev 910)
+++ sandbox/v2experiment/waffle-distribution/src/site/content/tutorials/tutorial-one.html	2009-02-17 17:59:55 UTC (rev 911)
@@ -14,11 +14,11 @@
 <p>The term <b>Controller</b> is probably familiar to those who have
 worked with other web frameworks. An Controller in Waffle can be any
 java object (i.e. POJO). However, in order for a POJO to be considered
-an Controller in Waffle it needs to be registered with the <b>Registrar</b>.
-The Registrar is a simple class that your application must implement.
-The Registrar provides a few methods that allows you to register your
-pojo's as Controllers. For complete details on the Registrar have a look
-at the <a href="" section.</p>
+an Controller in Waffle it needs to be registered with the <b>WaffleWebappComposer subclass</b>.
+The WaffleWebappComposer subclass is a simple class that your application must have.
+It provides a few methods that allows you to register your
+POJOs as Controllers. For complete details on the WaffleWebappComposer have a look
+at the <a href="" section.</p>
 <p>Now we will write a very simple class to use as an Controller.
 The class below is really nothing more than a simple bean type of
 object.</p>


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to