You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by se...@apache.org on 2007/05/07 07:13:48 UTC

svn commit: r535743 - in /jakarta/turbine/core/branches/TURBINE_2_3_BRANCH: conf/test/ src/java/org/apache/turbine/services/pull/ src/rttest/testapp/WEB-INF/conf/ src/test-cactus/testapp/WEB-INF/conf/ xdocs/howto/ xdocs/services/

Author: seade
Date: Sun May  6 22:13:47 2007
New Revision: 535743

URL: http://svn.apache.org/viewvc?view=rev&rev=535743
Log:
Add mention of Velocity Tools Generic Tools to the Pull Service documentation.
Tidied up references to persistent scope.

Modified:
    jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/conf/test/TurbineResources.properties
    jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/conf/test/TurbineResourcesWithIntake.properties
    jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/pull/TurbinePullService.java
    jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/src/rttest/testapp/WEB-INF/conf/TurbineCacheTest.properties
    jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
    jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/howto/migrate-from-2_2-howto.xml
    jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/services/pull-service.xml

Modified: jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/conf/test/TurbineResources.properties
URL: http://svn.apache.org/viewvc/jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/conf/test/TurbineResources.properties?view=diff&rev=535743&r1=535742&r2=535743
==============================================================================
--- jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/conf/test/TurbineResources.properties (original)
+++ jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/conf/test/TurbineResources.properties Sun May  6 22:13:47 2007
@@ -363,7 +363,10 @@
 # on each request (request tools aren't ever, because they're
 # instantiated for the request only anyway).
 services.PullService.tools.per.request.refresh=true
-services.PullService.tools.resources.dir = /conf/test/turbine-resources/
+
+# Path to the resources of the application tools, relative to the
+# application root
+services.PullService.tools.resources.dir=/conf/test/turbine-resources/
 
 # These are tools that are placed in the context by the service
 # These tools will be made available to all your
@@ -417,10 +420,11 @@
 #               threadsafe.
 #
 #   persistent: tool is instantiated once for each use session, and
-#               is stored in the user's permanent hashtable. This means
-#               for a logged in user the tool will be persisted in the
-#               user's objectdata. Tool should be threadsafe and
-#               Serializable.
+#               is stored in the user's permanent hashtable.
+#               This means for a logged in user the tool will be persisted
+#               in the user's objectdata. Tool should be Serializable.  These
+#               tools do not need to be threadsafe.
+#               <b>persistent scope tools are deprecated in 2.3</b>
 #
 # Defaults: none
 

Modified: jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/conf/test/TurbineResourcesWithIntake.properties
URL: http://svn.apache.org/viewvc/jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/conf/test/TurbineResourcesWithIntake.properties?view=diff&rev=535743&r1=535742&r2=535743
==============================================================================
--- jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/conf/test/TurbineResourcesWithIntake.properties (original)
+++ jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/conf/test/TurbineResourcesWithIntake.properties Sun May  6 22:13:47 2007
@@ -416,11 +416,12 @@
 #               stored in the user's temporary hashtable. Tool should be
 #               threadsafe.
 #
-#   persistent: tool is instantitated once for each use session, and
-#               is stored in the user's permanent hashtable. This means
-#               for a logged in user the tool will be persisted in the
-#               user's objectdata. Tool should be threadsafe and
-#               Serializable.
+#   persistent: tool is instantiated once for each use session, and
+#               is stored in the user's permanent hashtable.
+#               This means for a logged in user the tool will be persisted
+#               in the user's objectdata. Tool should be Serializable.  These
+#               tools do not need to be threadsafe.
+#               <b>persistent scope tools are deprecated in 2.3</b>
 #
 # Defaults: none
 

Modified: jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/pull/TurbinePullService.java
URL: http://svn.apache.org/viewvc/jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/pull/TurbinePullService.java?view=diff&rev=535743&r1=535742&r2=535743
==============================================================================
--- jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/pull/TurbinePullService.java (original)
+++ jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/pull/TurbinePullService.java Sun May  6 22:13:47 2007
@@ -100,7 +100,7 @@
  *  authorized: tool is instantiated once for each user session once the
  *              user logs in. After this, it is a normal session tool.
  *
- *  persistent: tool is instantitated once for each user session once
+ *  persistent: tool is instantiated once for each user session once
  *              the user logs in and is is stored in the user's permanent
  *              hashtable.
  *              This means for a logged in user the tool will be persisted

Modified: jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/src/rttest/testapp/WEB-INF/conf/TurbineCacheTest.properties
URL: http://svn.apache.org/viewvc/jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/src/rttest/testapp/WEB-INF/conf/TurbineCacheTest.properties?view=diff&rev=535743&r1=535742&r2=535743
==============================================================================
--- jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/src/rttest/testapp/WEB-INF/conf/TurbineCacheTest.properties (original)
+++ jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/src/rttest/testapp/WEB-INF/conf/TurbineCacheTest.properties Sun May  6 22:13:47 2007
@@ -587,11 +587,12 @@
 #               stored in the user's temporary hashtable. Tool should be
 #               threadsafe.
 #
-#   persistent: tool is instantitated once for each use session, and
-#               is stored in the user's permanent hashtable. This means
-#               for a logged in user the tool will be persisted in the
-#               user's objectdata. Tool should be threadsafe and
-#               Serializable.
+#   persistent: tool is instantiated once for each use session, and
+#               is stored in the user's permanent hashtable.
+#               This means for a logged in user the tool will be persisted
+#               in the user's objectdata. Tool should be Serializable.  These
+#               tools do not need to be threadsafe.
+#               <b>persistent scope tools are deprecated in 2.3</b>
 #
 # Defaults: none
 

Modified: jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties
URL: http://svn.apache.org/viewvc/jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties?view=diff&rev=535743&r1=535742&r2=535743
==============================================================================
--- jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties (original)
+++ jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/src/test-cactus/testapp/WEB-INF/conf/TurbineComplete.properties Sun May  6 22:13:47 2007
@@ -444,11 +444,12 @@
 #               stored in the user's temporary hashtable. Tool should be
 #               threadsafe.
 #
-#   persistent: tool is instantitated once for each use session, and
-#               is stored in the user's permanent hashtable. This means
-#               for a logged in user the tool will be persisted in the
-#               user's objectdata. Tool should be threadsafe and
-#               Serializable.
+#   persistent: tool is instantiated once for each use session, and
+#               is stored in the user's permanent hashtable.
+#               This means for a logged in user the tool will be persisted
+#               in the user's objectdata. Tool should be Serializable.  These
+#               tools do not need to be threadsafe.
+#               <b>persistent scope tools are deprecated in 2.3</b>
 #
 # Defaults: none
 

Modified: jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/howto/migrate-from-2_2-howto.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/howto/migrate-from-2_2-howto.xml?view=diff&rev=535743&r1=535742&r2=535743
==============================================================================
--- jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/howto/migrate-from-2_2-howto.xml (original)
+++ jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/howto/migrate-from-2_2-howto.xml Sun May  6 22:13:47 2007
@@ -77,7 +77,7 @@
 # where an explicit category is not specified.
 
 log4j.category.default = INFO, default
-log4j.category.org.apache.turbine.services.pull.util.UIManager = DEBUG, default
+log4j.category.org.apache.turbine.services.pull.tools.UITool = DEBUG, default
 
 log4j.appender.default = org.apache.log4j.RollingFileAppender
 log4j.appender.default.file = logs/turbine.log

Modified: jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/services/pull-service.xml
URL: http://svn.apache.org/viewvc/jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/services/pull-service.xml?view=diff&rev=535743&r1=535742&r2=535743
==============================================================================
--- jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/services/pull-service.xml (original)
+++ jakarta/turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/services/pull-service.xml Sun May  6 22:13:47 2007
@@ -25,6 +25,7 @@
   <title>Turbine Services - Pull Service</title>
   <author email="sean@informage.net">Sean Legassick</author>
   <author email="hps@intermeta.de">Henning P. Schmiedehausen</author>
+  <author email="seade@backstagetech.com.au">Scott Eade</author>
  </properties>
 
 <body>
@@ -60,10 +61,10 @@
 </p>
 
 <p>
-The service must be enabled in TurbineResources.properties as shown
-below, and tools are listed there. The default properties file lists
+The service must be enabled and the desired tools configured in
+TurbineResources.properties as shown below. The default properties file lists
 some request-scope tools that are needed for basic Turbine usage
-($page, $link and $content), plus the useful UIManager global tool.
+($page, $link and $content), plus the useful UITool skinning tool.
 </p>
 
 </section>
@@ -100,6 +101,10 @@
 # instantiated for the request only anyway).
 services.PullService.tools.per.request.refresh=true
 
+# Path to the resources of the application tools, relative to the
+# application root
+# services.PullService.tools.resources.dir=/resources/
+
 # These are tools that are placed in the context by the service
 # These tools will be made available to all your
 # templates. You list the tools in the following way:
@@ -112,7 +117,7 @@
 #
 # For example:
 #
-# tool.global.ui    = org.apache.turbine.util.pull.UIManager
+# tool.global.ui    = org.apache.turbine.util.pull.tools.UITool
 # tool.global.mm    = org.apache.turbine.util.pull.MessageManager
 # tool.request.link = org.apache.turbine.services.pull.tools.TemplateLink
 # tool.request.page = org.apache.turbine.util.template.HtmlPageAttributes
@@ -124,7 +129,7 @@
 #
 #
 # Tools are accessible in all templates by the <id> given
-# to the tool. So for the above listings the UIManager would
+# to the tool. So for the above listings the UITool would
 # be available as $ui, the MessageManager as $mm, the TemplateLink
 # as $link and the HtmlPageAttributes as $page.
 #
@@ -133,23 +138,24 @@
 #   global:    tool is instantiated once and that instance is available
 #              to all templates for all requests. Tool must be threadsafe.
 #
-#   request:    tool is instantiated once for each request (although the
-#               PoolService is used to recycle instances). Tool need not
-#               be threadsafe.
-#
-#   session:    tool is instantiated once for each user session, and is
-#               stored in the user's temporary hashtable. Tool should be
-#               threadsafe.
+#   request:   tool is instantiated once for each request (although the
+#              PoolService is used to recycle instances). Tool need not
+#              be threadsafe.
+#
+#   session:   tool is instantiated once for each user session, and is
+#              stored in the user's temporary hashtable. Tool should be
+#              threadsafe.
 #
 # authorized: tool is instantiated once for each user session once the
 #             user logs in. After this, it is a normal session tool.
 #
-# persistent: tool is instantitated once for each user session once
+# persistent: tool is instantiated once for each user session once
 #             the user logs in and is is stored in the user's permanent
 #             hashtable.
 #             This means for a logged in user the tool will be persisted
-#             in the user's objectdata. Tool should be threadsafe and
-#             Serializable.
+#             in the user's objectdata. Tool should be Serializable.  These
+#             tools do not need to be threadsafe.
+#             <b>persistent scope tools are deprecated in 2.3</b>
 #
 # Defaults: none
 
@@ -159,13 +165,12 @@
 #tool.request.om=org.apache.turbine.om.OMTool
 #tool.request.intake=org.apache.turbine.services.intake.IntakeTool
 
-tool.global.ui=org.apache.turbine.services.pull.util.UIManager
-
-# The UI Manager will allow you to skin your Turbine
-# application using simple properties files that are
-# located in the WEBAPP/resources/ui/skins/ directory
+# The UITool will allow you to skin your Turbine application using simple
+# properties files that are located in the WEBAPP/resources/ directory
 # hierarchy.
 
+tool.global.ui=org.apache.turbine.services.pull.tools.UITool
+## See UI Service documentation for further configuration options for UITool
 tool.ui.skin=default
 
 ]]></source>
@@ -188,9 +193,7 @@
 The next step is to decide what scope you need to give the tool.
 If the tool is retrieving global data in a threadsafe manner, you
 can make the tool global. If the tool holds data specific to the
-user look at the session, authorized  and persistent scopes
-(choose persistent for a convenient way of having the tools fields
-persisted across sessions for logged in users). If the tool needs to
+user look at the session and authorized scopes. If the tool needs to
 be instantiated on each request to fulfill its function, or is not
 threadsafe, then the request scope will be appropriate.
 </p>
@@ -225,10 +228,32 @@
 
 <p>
 Current examples of tools include the afore mentioned $link, $page and
-$content objects, the $ui UI manager, the Intake service tool
+$content objects, the $ui UI service tool, the Intake service tool
 (org.apache.turbine.services.intake.IntakeTool) and the OM tool
 (org.apache.turbine.om.OMTool).
 </p>
+
+</section>
+
+<section name="Velocity Tools">
+
+<p>
+The <a href="http://velocity.apache.org/tools/devel/generic/">Velocity Tools -
+Generic Tools</a> project provides a number of useful tools that can be used
+with your Turbine applications.  To do this, all you need to do is to add the
+relevant velocity-tools-generic jar file to your dependencies and then configure
+the desired tools in your TurbineResources.properties thus:
+</p>
+
+<source><![CDATA[
+tool.global.dateTool = org.apache.velocity.tools.generic.DateTool
+tool.global.mathTool = org.apache.velocity.tools.generic.MathTool
+tool.global.numberTool = org.apache.velocity.tools.generic.NumberTool
+tool.global.escTool = org.apache.velocity.tools.generic.EscapeTool
+tool.global.renderTool = org.apache.velocity.tools.generic.RenderTool
+tool.global.sortTool = org.apache.velocity.tools.generic.SortTool
+...
+]]></source>
 
 </section>
 



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org