You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by he...@apache.org on 2003/07/15 17:10:45 UTC

cvs commit: jakarta-turbine-2/src/java/org/apache/turbine/services/template/mapper TemplateBaseLayoutMapper.java TemplateBaseMapper.java TemplateClassMapper.java TemplateDirectMapper.java TemplateLayoutMapper.java TemplateMapper.java TemplateScreenMapper.java

henning     2003/07/15 08:10:45

  Modified:    src/java/org/apache/turbine/services/template/mapper
                        TemplateBaseLayoutMapper.java
                        TemplateBaseMapper.java TemplateClassMapper.java
                        TemplateDirectMapper.java TemplateLayoutMapper.java
                        TemplateMapper.java TemplateScreenMapper.java
  Log:
  - Add Bean Getter and Setter for the various parameters passed in the
    constructors.
  
  - Add a default constructor to all mapper classes.
  
  - Add bean signatures to the TemplateMapper interface
  
  Revision  Changes    Path
  1.3       +29 -1     jakarta-turbine-2/src/java/org/apache/turbine/services/template/mapper/TemplateBaseLayoutMapper.java
  
  Index: TemplateBaseLayoutMapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/template/mapper/TemplateBaseLayoutMapper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TemplateBaseLayoutMapper.java	9 Mar 2003 03:06:33 -0000	1.2
  +++ TemplateBaseLayoutMapper.java	15 Jul 2003 15:10:44 -0000	1.3
  @@ -75,6 +75,16 @@
       protected String prefix = "";
   
       /**
  +     * Default C'tor. If you use this C'tor, you must use
  +     * the bean setter to set the various properties needed for
  +     * this mapper before first usage.
  +     */
  +    public TemplateBaseLayoutMapper()
  +    {
  +        super();
  +    }
  +
  +    /**
        * C'tor
        *
        * @param useCache If true, then the resulting mapper will cache mappings.
  @@ -85,6 +95,24 @@
       public TemplateBaseLayoutMapper(boolean useCache, int cacheSize, String defaultProperty, String separator, String prefix)
       {
           super(useCache, cacheSize, defaultProperty, separator);
  +        setPrefix(prefix);
  +    }
  +
  +    /**
  +     * Get the Prefix value.
  +     * @return the Prefix value.
  +     */
  +    public String getPrefix()
  +    {
  +        return prefix;
  +    }
  +
  +    /**
  +     * Set the Prefix value.
  +     * @param prefix The new Prefix value.
  +     */
  +    public void setPrefix(String prefix)
  +    {
           this.prefix = prefix;
       }
   
  
  
  
  1.3       +82 -1     jakarta-turbine-2/src/java/org/apache/turbine/services/template/mapper/TemplateBaseMapper.java
  
  Index: TemplateBaseMapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/template/mapper/TemplateBaseMapper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TemplateBaseMapper.java	9 Mar 2003 03:06:33 -0000	1.2
  +++ TemplateBaseMapper.java	15 Jul 2003 15:10:44 -0000	1.3
  @@ -92,6 +92,15 @@
       // Service which leads to an endless loop and a deadlock.
   
       /**
  +     * Default C'tor. If you use this C'tor, you must use
  +     * the bean setter to set the various properties needed for
  +     * this mapper before first usage.
  +     */
  +    public TemplateBaseMapper()
  +    {
  +    }
  +
  +    /**
        * C'tor
        *
        * @param useCache If true, then the resulting mapper will cache mappings.
  @@ -101,9 +110,81 @@
        */
       public TemplateBaseMapper(boolean useCache, int cacheSize, String defaultProperty, String separator)
       {
  +        setCacheSize(cacheSize);
  +        setUseCache(useCache);
  +        setDefaultProperty(defaultProperty);
  +        setSeparator(separator);
  +    }
  +
  +    /**
  +     * Get the CacheSize value.
  +     * @return the CacheSize value.
  +     */
  +    public int getCacheSize()
  +    {
  +        return cacheSize;
  +    }
  +
  +    /**
  +     * Set the CacheSize value.
  +     * @param cacheSize The new CacheSize value.
  +     */
  +    public void setCacheSize(int cacheSize)
  +    {
           this.cacheSize = cacheSize;
  +    }
  +
  +    /**
  +     * Get the UseCache value.
  +     * @return the UseCache value.
  +     */
  +    public boolean isUseCache()
  +    {
  +        return useCache;
  +    }
  +
  +    /**
  +     * Set the UseCache value.
  +     * @param newUseCache The new UseCache value.
  +     */
  +    public void setUseCache(boolean useCache)
  +    {
           this.useCache = useCache;
  +    }
  +
  +    /**
  +     * Get the DefaultProperty value.
  +     * @return the DefaultProperty value.
  +     */
  +    public String getDefaultProperty()
  +    {
  +        return defaultProperty;
  +    }
  +
  +    /**
  +     * Set the DefaultProperty value.
  +     * @param defaultProperty The new DefaultProperty value.
  +     */
  +    public void setDefaultProperty(String defaultProperty)
  +    {
           this.defaultProperty = defaultProperty;
  +    }
  +
  +    /**
  +     * Get the Separator value.
  +     * @return the Separator value.
  +     */
  +    public String getSeparator()
  +    {
  +        return separator;
  +    }
  +
  +    /**
  +     * Set the Separator value.
  +     * @param separator The new Separator value.
  +     */
  +    public void setSeparator(String separator)
  +    {
           this.separator = separator;
       }
   
  
  
  
  1.4       +29 -2     jakarta-turbine-2/src/java/org/apache/turbine/services/template/mapper/TemplateClassMapper.java
  
  Index: TemplateClassMapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/template/mapper/TemplateClassMapper.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TemplateClassMapper.java	9 Mar 2003 03:06:33 -0000	1.3
  +++ TemplateClassMapper.java	15 Jul 2003 15:10:44 -0000	1.4
  @@ -97,6 +97,15 @@
       private static Log log = LogFactory.getLog(TemplateClassMapper.class);
   
       /**
  +     * Default C'tor. If you use this C'tor, you must use
  +     * the bean setter to set the various properties needed for
  +     * this mapper before first usage.
  +     */
  +    public TemplateClassMapper()
  +    {
  +    }
  +
  +    /**
        * C'tor.
        *
        * @param useCache If true, then the resulting mapper will cache mappings.
  @@ -112,8 +121,26 @@
           Loader loader)
       {
           super(useCache, cacheSize, defaultProperty, separator);
  +        setLoader(loader);
  +    }
  +
  +    /**
  +     * Get the Loader value.
  +     * @return the Loader value.
  +     */
  +    public Loader getLoader()
  +    {
  +        return loader;
  +    }
  +
  +    /**
  +     * Set the Loader value.
  +     * @param loader The new Loader value.
  +     */
  +    public void setLoader(Loader loader)
  +    {
           this.loader = loader;
  -        log.debug("Loader is " + loader);
  +        log.debug("Loader is " + this.loader);
       }
   
       /**
  
  
  
  1.3       +10 -1     jakarta-turbine-2/src/java/org/apache/turbine/services/template/mapper/TemplateDirectMapper.java
  
  Index: TemplateDirectMapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/template/mapper/TemplateDirectMapper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TemplateDirectMapper.java	9 Mar 2003 03:06:33 -0000	1.2
  +++ TemplateDirectMapper.java	15 Jul 2003 15:10:44 -0000	1.3
  @@ -70,6 +70,15 @@
       implements TemplateMapper
   {
       /**
  +     * Default C'tor. If you use this C'tor, you must use
  +     * the bean setter to set the various properties needed for
  +     * this mapper before first usage.
  +     */
  +    public TemplateDirectMapper()
  +    {
  +    }
  +
  +    /**
        * C'tor
        *
        * @param defaultProperty The name of the default property to pull from the TemplateEngine
  
  
  
  1.3       +10 -1     jakarta-turbine-2/src/java/org/apache/turbine/services/template/mapper/TemplateLayoutMapper.java
  
  Index: TemplateLayoutMapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/template/mapper/TemplateLayoutMapper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TemplateLayoutMapper.java	9 Mar 2003 03:06:33 -0000	1.2
  +++ TemplateLayoutMapper.java	15 Jul 2003 15:10:44 -0000	1.3
  @@ -90,6 +90,15 @@
       private static Log log = LogFactory.getLog(TemplateLayoutMapper.class);
   
       /**
  +     * Default C'tor. If you use this C'tor, you must use
  +     * the bean setter to set the various properties needed for
  +     * this mapper before first usage.
  +     */
  +    public TemplateLayoutMapper()
  +    {
  +    }
  +
  +    /**
        * C'tor
        *
        * @param useCache If true, then the resulting mapper will cache mappings.
  
  
  
  1.3       +50 -1     jakarta-turbine-2/src/java/org/apache/turbine/services/template/mapper/TemplateMapper.java
  
  Index: TemplateMapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/template/mapper/TemplateMapper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TemplateMapper.java	9 Mar 2003 03:06:33 -0000	1.2
  +++ TemplateMapper.java	15 Jul 2003 15:10:44 -0000	1.3
  @@ -71,6 +71,55 @@
       void init();
   
       /**
  +     * Get the CacheSize value.
  +     * @return the CacheSize value.
  +     */
  +    int getCacheSize();
  +
  +    /**
  +     * Set the CacheSize value.
  +     * @param cacheSize The new CacheSize value.
  +     */
  +    void setCacheSize(int cacheSize);
  +
  +    /**
  +     * Get the UseCache value.
  +     * @return the UseCache value.
  +     */
  +    boolean isUseCache();
  +
  +    /**
  +     * Set the UseCache value.
  +     * @param newUseCache The new UseCache value.
  +     */
  +    void setUseCache(boolean useCache);
  +
  +    /**
  +     * Get the DefaultProperty value.
  +     * @return the DefaultProperty value.
  +     */
  +    String getDefaultProperty();
  +
  +    /**
  +     * Set the DefaultProperty value.
  +     * @param defaultProperty The new DefaultProperty value.
  +     */
  +    void setDefaultProperty(String defaultProperty);
  +
  +    /**
  +     * Get the Separator value.
  +     * @return the Separator value.
  +     */
  +    String getSeparator();
  +
  +    /**
  +     * Set the Separator value.
  +     * @param separator The new Separator value.
  +     */
  +    void setSeparator(String separator);
  +
  +
  +    /**
        * Returns the default name for the supplied template
        * name. Must never return null.
        *
  
  
  
  1.3       +10 -1     jakarta-turbine-2/src/java/org/apache/turbine/services/template/mapper/TemplateScreenMapper.java
  
  Index: TemplateScreenMapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/template/mapper/TemplateScreenMapper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TemplateScreenMapper.java	9 Mar 2003 03:06:33 -0000	1.2
  +++ TemplateScreenMapper.java	15 Jul 2003 15:10:44 -0000	1.3
  @@ -74,6 +74,15 @@
       implements TemplateMapper
   {
       /**
  +     * Default C'tor. If you use this C'tor, you must use
  +     * the bean setter to set the various properties needed for
  +     * this mapper before first usage.
  +     */
  +    public TemplateScreenMapper()
  +    {
  +    }
  +
  +    /**
        * C'tor
        *
        * @param useCache If true, then the resulting mapper will cache mappings.
  
  
  

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