You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jo...@apache.org on 2001/12/08 00:05:43 UTC

cvs commit: jakarta-turbine-3/src/java/org/apache/turbine/pipeline DefaultResolver.java

jon         01/12/07 15:05:43

  Modified:    src/java/org/apache/turbine/pipeline DefaultResolver.java
  Log:
  cleaned up comments.
  
  use the Configuration API properly
  
  Revision  Changes    Path
  1.9       +10 -17    jakarta-turbine-3/src/java/org/apache/turbine/pipeline/DefaultResolver.java
  
  Index: DefaultResolver.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-3/src/java/org/apache/turbine/pipeline/DefaultResolver.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultResolver.java	2001/11/28 17:24:50	1.8
  +++ DefaultResolver.java	2001/12/07 23:05:43	1.9
  @@ -54,10 +54,6 @@
    * <http://www.apache.org/>.
    */
   
  -// Renderers and context builders
  -// We need to match up the target template with sibling
  -// templates and context builders for each of these templates.
  -
   import java.util.Map;
   import org.apache.commons.collections.FastHashMap;
   import java.util.ArrayList;
  @@ -69,6 +65,9 @@
   import org.apache.turbine.Resolver;
   import org.apache.turbine.modules.Module;
   
  +// Renderers and context builders
  +// We need to match up the target template with sibling
  +// templates and context builders for each of these templates.
   
   // Given a target template
   
  @@ -116,7 +115,7 @@
    */
   
   /*
  -   NOTE:  Currently the ModuleLoader handles a lot of the responisbile
  +   NOTE:  Currently the ModuleLoader handles a lot of the responsiblity
      for finding, caching, and serving up modules.  That functionaly
      should be placed in the pluggable resolver.  I'll leave it for now so
      to make the changes more gradually.
  @@ -135,9 +134,8 @@
    *
    * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
    * @author <a href="mailto:mikeh@apache.org">Mike Haberman</a>
  - * @version $Id: DefaultResolver.java,v 1.8 2001/11/28 17:24:50 mikeh Exp $
  + * @version $Id: DefaultResolver.java,v 1.9 2001/12/07 23:05:43 jon Exp $
    */
  -
   public class DefaultResolver
       implements Resolver, TurbineConstants
   {
  @@ -169,14 +167,11 @@
           //
           // set up the cache
           //
  -        String value;
  -        value = Turbine.getConfiguration().getString(RESOLVER_TEMPLATE_CACHE,
  -                                                     "false");
  -        doTemplateCache = Boolean.valueOf(value).booleanValue();
  -
  -        value = Turbine.getConfiguration().getString(RESOLVER_MODULE_CACHE,
  -                                                     "false");
  -        doModuleCache = Boolean.valueOf(value).booleanValue();
  +        doTemplateCache = Turbine.getConfiguration()
  +                            .getBoolean(RESOLVER_TEMPLATE_CACHE, false);
  +
  +        doModuleCache = Turbine.getConfiguration()
  +                            .getBoolean(RESOLVER_MODULE_CACHE, false);
   
           Log.debug("DefaultResolver: default template " + defaultTemplate);
           Log.debug("DefaultResolver: cache templates " + doTemplateCache);
  @@ -247,11 +242,9 @@
           return module;
       }
   
  -
       protected String findTemplate(String moduleType, String targetTemplate)
           throws Exception
       {
  -
           StringBuffer sb = new StringBuffer();
           int i = PipelineUtil.parseTemplatePath(targetTemplate, sb);
           Iterator j = getPossibleTemplates(sb.toString());
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>