Author: tv
Date: Mon Mar  4 18:29:18 2019
New Revision: 1854786

URL: http://svn.apache.org/viewvc?rev=1854786&view=rev
Log:
Change all modules to be functional interfaces

Modified:
    turbine/core/trunk/src/java/org/apache/turbine/modules/Action.java
    turbine/core/trunk/src/java/org/apache/turbine/modules/ActionEvent.java
    turbine/core/trunk/src/java/org/apache/turbine/modules/ActionLoader.java
    turbine/core/trunk/src/java/org/apache/turbine/modules/Assembler.java
    turbine/core/trunk/src/java/org/apache/turbine/modules/GenericLoader.java
    turbine/core/trunk/src/java/org/apache/turbine/modules/Layout.java
    turbine/core/trunk/src/java/org/apache/turbine/modules/LayoutLoader.java
    turbine/core/trunk/src/java/org/apache/turbine/modules/Navigation.java
    turbine/core/trunk/src/java/org/apache/turbine/modules/NavigationLoader.java
    turbine/core/trunk/src/java/org/apache/turbine/modules/Page.java
    turbine/core/trunk/src/java/org/apache/turbine/modules/PageLoader.java
    turbine/core/trunk/src/java/org/apache/turbine/modules/ScheduledJob.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/ScheduledJobLoader.java
    turbine/core/trunk/src/java/org/apache/turbine/modules/Screen.java
    turbine/core/trunk/src/java/org/apache/turbine/modules/ScreenLoader.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/AccessController.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/DefaultAction.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/InitContextsAction.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/LegacyVelocitySecureAction.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/LoginUser.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/LogoutUser.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/VelocityAction.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/VelocitySecureAction.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/SessionValidator.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/DirectResponseLayout.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/JspLayout.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityCachedLayout.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityDirectLayout.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityOnlyLayout.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityXslLayout.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/navigations/BaseJspNavigation.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/navigations/TemplateNavigation.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/navigations/VelocityNavigation.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/pages/DefaultPage.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/BaseJspScreen.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/RawScreen.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/TemplateScreen.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocityCachedScreen.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocityDirectScreen.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocityScreen.java
    
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/error/InvalidState.java

Modified: turbine/core/trunk/src/java/org/apache/turbine/modules/Action.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/Action.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/modules/Action.java 
(original)
+++ turbine/core/trunk/src/java/org/apache/turbine/modules/Action.java Mon Mar  
4 18:29:18 2019
@@ -22,53 +22,44 @@ package org.apache.turbine.modules;
 import org.apache.turbine.pipeline.PipelineData;
 
 /**
- * Generic Action class.
+ * Generic Action interface.
  *
  * @author <a href="mailto:[email protected]";>Dave Bryson</a>
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public abstract class Action implements Assembler
+@FunctionalInterface
+public interface Action extends Assembler
 {
     /** Prefix for action related classes and templates */
-    public static final String PREFIX = "actions";
+    String PREFIX = "actions";
 
     /** Property for the size of the module cache if caching is on */
-    public static final String CACHE_SIZE_KEY = "action.cache.size";
+    String CACHE_SIZE_KEY = "action.cache.size";
 
     /** The default size for the action cache */
-    public static final int CACHE_SIZE_DEFAULT = 20;
+    int CACHE_SIZE_DEFAULT = 20;
 
     /** Represents Action Objects */
-    public static final String NAME = "action";
+    String NAME = "action";
 
     /**
-     * @see org.apache.turbine.modules.Assembler#getPrefix()
-     */
-    @Override
-    public String getPrefix()
-    {
-        return PREFIX;
-    }
-
-    /**
-     * A subclass must override this method to perform itself.  The
+     * A subclass must implement this method to perform itself.  The
      * Action can also set the screen that is associated with {@link 
PipelineData}.
      *
      * @param pipelineData Turbine information.
      * @throws Exception a generic exception.
      */
-    public abstract void doPerform(PipelineData pipelineData) throws Exception;
+    void doPerform(PipelineData pipelineData) throws Exception;
 
     /**
      * Subclasses can override this method to add additional
-     * functionality.  This method is protected to force clients to
-     * use ActionLoader to perform an Action.
+     * functionality.
      *
      * @param pipelineData Turbine information.
      * @throws Exception a generic exception.
      */
-    protected void perform(PipelineData pipelineData) throws Exception
+    default void perform(PipelineData pipelineData) throws Exception
     {
         doPerform(pipelineData);
     }

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/ActionEvent.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/ActionEvent.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/modules/ActionEvent.java 
(original)
+++ turbine/core/trunk/src/java/org/apache/turbine/modules/ActionEvent.java Mon 
Mar  4 18:29:18 2019
@@ -83,7 +83,7 @@ import org.apache.turbine.pipeline.Pipel
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public abstract class ActionEvent extends Action
+public abstract class ActionEvent implements Action
 {
        /** Logging */
        protected Logger log = LogManager.getLogger(this.getClass());

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/ActionLoader.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/ActionLoader.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/modules/ActionLoader.java 
(original)
+++ turbine/core/trunk/src/java/org/apache/turbine/modules/ActionLoader.java 
Mon Mar  4 18:29:18 2019
@@ -33,7 +33,6 @@ import org.apache.turbine.pipeline.Pipel
  */
 public class ActionLoader
     extends GenericLoader<Action>
-    implements Loader<Action>
 {
     /** The single instance of this class. */
     private static ActionLoader instance = new ActionLoader();
@@ -44,7 +43,9 @@ public class ActionLoader
      */
     private ActionLoader()
     {
-        super(Action.class);
+        super(Action.class,
+                () -> Turbine.getConfiguration().getInt(Action.CACHE_SIZE_KEY,
+                        Action.CACHE_SIZE_DEFAULT));
     }
 
     /**
@@ -62,15 +63,6 @@ public class ActionLoader
     }
 
     /**
-     * @see org.apache.turbine.modules.Loader#getCacheSize()
-     */
-    @Override
-    public int getCacheSize()
-    {
-        return ActionLoader.getConfiguredCacheSize();
-    }
-
-    /**
      * The method through which this class is accessed.
      *
      * @return The single instance of this class.
@@ -79,15 +71,4 @@ public class ActionLoader
     {
         return instance;
     }
-
-    /**
-     * Helper method to get the configured cache size for this module
-     *
-     * @return the configure cache size
-     */
-    private static int getConfiguredCacheSize()
-    {
-        return Turbine.getConfiguration().getInt(Action.CACHE_SIZE_KEY,
-                Action.CACHE_SIZE_DEFAULT);
-    }
 }

Modified: turbine/core/trunk/src/java/org/apache/turbine/modules/Assembler.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/Assembler.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/modules/Assembler.java 
(original)
+++ turbine/core/trunk/src/java/org/apache/turbine/modules/Assembler.java Mon 
Mar  4 18:29:18 2019
@@ -47,12 +47,4 @@ public interface Assembler
         }
         return (RunData) pipelineData;
     }
-
-    /**
-     * Abstract method to provide the prefix for module related classes and
-     * templates
-     *
-     * @return the prefix
-     */
-    String getPrefix();
 }

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/GenericLoader.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/GenericLoader.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/modules/GenericLoader.java 
(original)
+++ turbine/core/trunk/src/java/org/apache/turbine/modules/GenericLoader.java 
Mon Mar  4 18:29:18 2019
@@ -20,6 +20,7 @@ package org.apache.turbine.modules;
  */
 
 import java.util.List;
+import java.util.function.IntSupplier;
 import java.util.stream.Collectors;
 
 import org.apache.turbine.Turbine;
@@ -44,7 +45,10 @@ public abstract class GenericLoader<T ex
     protected AssemblerBrokerService ab;
 
     /** Class of loaded assembler */
-    private Class<T> assemblerClass;
+    private final Class<T> assemblerClass;
+
+    /** Supplier of configured cache for this assembler Class */
+    private final IntSupplier cacheSizeSupplier;
 
     /** @serial This can be serialized */
     private boolean reload = false;
@@ -59,11 +63,13 @@ public abstract class GenericLoader<T ex
      * Basic constructor for creating a loader.
      *
      * @param assemblerClass Class of loaded assembler
+     * @param cacheSizeSupplier Supplier of configured cache size for this 
assembler Class
      */
-    public GenericLoader(Class<T> assemblerClass)
+    public GenericLoader(Class<T> assemblerClass, IntSupplier 
cacheSizeSupplier)
     {
         super();
         this.assemblerClass = assemblerClass;
+        this.cacheSizeSupplier = cacheSizeSupplier;
         this.ab = (AssemblerBrokerService)TurbineServices.getInstance()
                 .getService(AssemblerBrokerService.SERVICE_NAME);
     }
@@ -204,4 +210,13 @@ public abstract class GenericLoader<T ex
 
         return asm;
     }
+
+    /**
+     * @see org.apache.turbine.modules.Loader#getCacheSize()
+     */
+    @Override
+    public int getCacheSize()
+    {
+        return cacheSizeSupplier.getAsInt();
+    }
 }

Modified: turbine/core/trunk/src/java/org/apache/turbine/modules/Layout.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/Layout.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/modules/Layout.java 
(original)
+++ turbine/core/trunk/src/java/org/apache/turbine/modules/Layout.java Mon Mar  
4 18:29:18 2019
@@ -22,52 +22,43 @@ package org.apache.turbine.modules;
 import org.apache.turbine.pipeline.PipelineData;
 
 /**
- * This is the base class that defines what a Layout module is.
+ * This is the interface that defines what a Layout module is.
  *
  * @author <a href="mailto:[email protected]";>Dave Bryson</a>
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public abstract class Layout implements Assembler
+@FunctionalInterface
+public interface Layout extends Assembler
 {
     /** Prefix for layout related classes and templates */
-    public static final String PREFIX = "layouts";
+    String PREFIX = "layouts";
 
     /** Property for the size of the layout cache if caching is on */
-    public static final String CACHE_SIZE_KEY = "layout.cache.size";
+    String CACHE_SIZE_KEY = "layout.cache.size";
 
     /** The default size for the layout cache */
-    public static final int CACHE_SIZE_DEFAULT = 10;
+    int CACHE_SIZE_DEFAULT = 10;
 
     /** Represents Layout Objects */
-    public static final String NAME = "layout";
+    String NAME = "layout";
 
     /**
-     * @see org.apache.turbine.modules.Assembler#getPrefix()
-     */
-    @Override
-    public String getPrefix()
-    {
-        return PREFIX;
-    }
-
-    /**
-     * A subclass must override this method to perform itself.  The
+     * A subclass must implement this method to perform itself.  The
      * Action can also set the screen that is associated with PipelineData.
      * @param pipelineData Turbine information.
      * @throws Exception a generic exception.
      */
-    protected abstract void doBuild(PipelineData pipelineData) throws 
Exception;
+    void doBuild(PipelineData pipelineData) throws Exception;
 
     /**
      * Subclasses can override this method to add additional
-     * functionality.  This method is protected to force clients to
-     * use ActionLoader to perform an Action.
+     * functionality.
      *
      * @param pipelineData Turbine information.
      * @throws Exception a generic exception.
      */
-    protected void build(PipelineData pipelineData) throws Exception
+    default void build(PipelineData pipelineData) throws Exception
     {
         doBuild(pipelineData);
     }

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/LayoutLoader.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/LayoutLoader.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/modules/LayoutLoader.java 
(original)
+++ turbine/core/trunk/src/java/org/apache/turbine/modules/LayoutLoader.java 
Mon Mar  4 18:29:18 2019
@@ -33,7 +33,6 @@ import org.apache.turbine.pipeline.Pipel
  */
 public class LayoutLoader
     extends GenericLoader<Layout>
-    implements Loader<Layout>
 {
     /** The single instance of this class. */
     private static LayoutLoader instance = new LayoutLoader();
@@ -44,7 +43,9 @@ public class LayoutLoader
      */
     private LayoutLoader()
     {
-        super(Layout.class);
+        super(Layout.class,
+                () -> Turbine.getConfiguration().getInt(Layout.CACHE_SIZE_KEY,
+                        Layout.CACHE_SIZE_DEFAULT));
     }
 
     /**
@@ -62,15 +63,6 @@ public class LayoutLoader
     }
 
     /**
-     * @see org.apache.turbine.modules.Loader#getCacheSize()
-     */
-    @Override
-    public int getCacheSize()
-    {
-        return LayoutLoader.getConfiguredCacheSize();
-    }
-
-    /**
      * The method through which this class is accessed.
      *
      * @return The single instance of this class.
@@ -79,15 +71,4 @@ public class LayoutLoader
     {
         return instance;
     }
-
-    /**
-     * Helper method to get the configured cache size for this module
-     *
-     * @return the configure cache size
-     */
-    private static int getConfiguredCacheSize()
-    {
-        return Turbine.getConfiguration().getInt(Layout.CACHE_SIZE_KEY,
-                Layout.CACHE_SIZE_DEFAULT);
-    }
 }

Modified: turbine/core/trunk/src/java/org/apache/turbine/modules/Navigation.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/Navigation.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/modules/Navigation.java 
(original)
+++ turbine/core/trunk/src/java/org/apache/turbine/modules/Navigation.java Mon 
Mar  4 18:29:18 2019
@@ -22,38 +22,30 @@ package org.apache.turbine.modules;
 import org.apache.turbine.pipeline.PipelineData;
 
 /**
- * This is the base class that defines what a Navigation module is.
+ * This is the interface that defines what a Navigation module is.
  *
  * @author <a href="mailto:[email protected]";>Dave Bryson</a>
  * @author <a href="mailto:[email protected]";>Henning P. Schmiedehausen</a>
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public abstract class Navigation implements Assembler
+@FunctionalInterface
+public interface Navigation extends Assembler
 {
     /** Prefix for navigation related classes and templates */
-    public static final String PREFIX = "navigations";
+    String PREFIX = "navigations";
 
     /** Property for the size of the navigation cache if caching is on */
-    public static final String CACHE_SIZE_KEY = "navigation.cache.size";
+    String CACHE_SIZE_KEY = "navigation.cache.size";
 
     /** The default size for the navigation cache */
-    public static final int CACHE_SIZE_DEFAULT = 10;
+    int CACHE_SIZE_DEFAULT = 10;
 
     /** Represents Navigation Objects */
-    public static final String NAME = "navigation";
+    String NAME = "navigation";
 
     /**
-     * @see org.apache.turbine.modules.Assembler#getPrefix()
-     */
-    @Override
-    public String getPrefix()
-    {
-        return PREFIX;
-    }
-
-    /**
-     * A subclass must override this method to build itself.
+     * A subclass must implement this method to build itself.
      * Subclasses override this method to store the navigation in
      * RunData or to write the navigation to the output stream
      * referenced in RunData.
@@ -62,18 +54,17 @@ public abstract class Navigation impleme
      * @return the content of the navigation module
      * @throws Exception a generic exception.
      */
-    protected abstract String doBuild(PipelineData pipelineData) throws 
Exception;
+    String doBuild(PipelineData pipelineData) throws Exception;
 
     /**
      * Subclasses can override this method to add additional
-     * functionality.  This method is protected to force clients to
-     * use NavigationLoader to build a Navigation.
+     * functionality.
      *
      * @param pipelineData Turbine information.
      * @return the content of the navigation module
      * @throws Exception a generic exception.
      */
-    protected String build(PipelineData pipelineData)
+    default String build(PipelineData pipelineData)
         throws Exception
     {
         return doBuild(pipelineData);

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/NavigationLoader.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/NavigationLoader.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/NavigationLoader.java 
(original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/NavigationLoader.java 
Mon Mar  4 18:29:18 2019
@@ -33,7 +33,6 @@ import org.apache.turbine.pipeline.Pipel
  */
 public class NavigationLoader
     extends GenericLoader<Navigation>
-    implements Loader<Navigation>
 {
     /** The single instance of this class. */
     private static NavigationLoader instance = new NavigationLoader();
@@ -44,7 +43,9 @@ public class NavigationLoader
      */
     private NavigationLoader()
     {
-        super(Navigation.class);
+        super(Navigation.class,
+                () -> 
Turbine.getConfiguration().getInt(Navigation.CACHE_SIZE_KEY,
+                        Navigation.CACHE_SIZE_DEFAULT));
     }
 
     /**
@@ -81,15 +82,6 @@ public class NavigationLoader
     }
 
     /**
-     * @see org.apache.turbine.modules.Loader#getCacheSize()
-     */
-    @Override
-    public int getCacheSize()
-    {
-        return NavigationLoader.getConfiguredCacheSize();
-    }
-
-    /**
      * The method through which this class is accessed.
      *
      * @return The single instance of this class.
@@ -98,15 +90,4 @@ public class NavigationLoader
     {
         return instance;
     }
-
-    /**
-     * Helper method to get the configured cache size for this module
-     *
-     * @return the configure cache size
-     */
-    private static int getConfiguredCacheSize()
-    {
-        return Turbine.getConfiguration().getInt(Navigation.CACHE_SIZE_KEY,
-                Navigation.CACHE_SIZE_DEFAULT);
-    }
 }

Modified: turbine/core/trunk/src/java/org/apache/turbine/modules/Page.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/Page.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/modules/Page.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/modules/Page.java Mon Mar  4 
18:29:18 2019
@@ -22,35 +22,27 @@ package org.apache.turbine.modules;
 import org.apache.turbine.pipeline.PipelineData;
 
 /**
- * This is the base class that defines what a Page module is.
+ * This is the interface that defines what a Page module is.
  *
  * @author <a href="mailto:[email protected]";>Dave Bryson</a>
  * @author <a href="mailto:[email protected]";>Henning P. Schmiedehausen</a>
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public abstract class Page implements Assembler
+@FunctionalInterface
+public interface Page extends Assembler
 {
     /** Prefix for page related classes and templates */
-    public static final String PREFIX = "pages";
+    String PREFIX = "pages";
 
     /** Property for the size of the page cache if caching is on */
-    public static final String CACHE_SIZE_KEY = "page.cache.size";
+    String CACHE_SIZE_KEY = "page.cache.size";
 
     /** The default size for the page cache */
-    public static final int CACHE_SIZE_DEFAULT = 5;
+    int CACHE_SIZE_DEFAULT = 5;
 
     /** Represents Page Objects */
-    public static final String NAME = "page";
-
-    /**
-     * @see org.apache.turbine.modules.Assembler#getPrefix()
-     */
-    @Override
-    public String getPrefix()
-    {
-        return PREFIX;
-    }
+    String NAME = "page";
 
     /**
      * A subclass must override this method to build itself.
@@ -59,17 +51,16 @@ public abstract class Page implements As
      * @param pipelineData Turbine information.
      * @throws Exception a generic exception.
      */
-    protected abstract void doBuild(PipelineData pipelineData) throws 
Exception;
+    void doBuild(PipelineData pipelineData) throws Exception;
 
     /**
      * Subclasses can override this method to add additional
-     * functionality.  This method is protected to force clients to
-     * use PageLoader to build a Page.
+     * functionality.
      *
      * @param pipelineData Turbine information.
      * @throws Exception a generic exception.
      */
-    protected void build(PipelineData pipelineData)
+    default void build(PipelineData pipelineData)
        throws Exception
     {
         doBuild(pipelineData);

Modified: turbine/core/trunk/src/java/org/apache/turbine/modules/PageLoader.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/PageLoader.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/modules/PageLoader.java 
(original)
+++ turbine/core/trunk/src/java/org/apache/turbine/modules/PageLoader.java Mon 
Mar  4 18:29:18 2019
@@ -33,7 +33,6 @@ import org.apache.turbine.pipeline.Pipel
  */
 public class PageLoader
     extends GenericLoader<Page>
-    implements Loader<Page>
 {
     /** The single instance of this class. */
     private static PageLoader instance = new PageLoader();
@@ -44,7 +43,9 @@ public class PageLoader
      */
     private PageLoader()
     {
-        super(Page.class);
+        super(Page.class,
+                () -> Turbine.getConfiguration().getInt(Page.CACHE_SIZE_KEY,
+                        Page.CACHE_SIZE_DEFAULT));
     }
 
     /**
@@ -63,15 +64,6 @@ public class PageLoader
     }
 
     /**
-     * @see org.apache.turbine.modules.Loader#getCacheSize()
-     */
-    @Override
-    public int getCacheSize()
-    {
-        return PageLoader.getConfiguredCacheSize();
-    }
-
-    /**
      * The method through which this class is accessed.
      *
      * @return The single instance of this class.
@@ -80,15 +72,4 @@ public class PageLoader
     {
         return instance;
     }
-
-    /**
-     * Helper method to get the configured cache size for this module
-     *
-     * @return the configure cache size
-     */
-    private static int getConfiguredCacheSize()
-    {
-        return Turbine.getConfiguration().getInt(Page.CACHE_SIZE_KEY,
-                Page.CACHE_SIZE_DEFAULT);
-    }
 }

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/ScheduledJob.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/ScheduledJob.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/modules/ScheduledJob.java 
(original)
+++ turbine/core/trunk/src/java/org/apache/turbine/modules/ScheduledJob.java 
Mon Mar  4 18:29:18 2019
@@ -26,36 +26,28 @@ package org.apache.turbine.modules;
 import org.apache.turbine.services.schedule.JobEntry;
 
 /**
- * All Scheduled jobs should extend this.  The class that extends
- * ScheduledJobs should contain the code that you actually want to
+ * All Scheduled jobs should implement this.  The class that implements
+ * ScheduledJob should contain the code that you actually want to
  * execute at a specific time.  The name of this class is what you
  * register in the JobEntry.
  *
  * @author <a href="mailto:[email protected]";>Dave Bryson</a>
  * @version $Id$
  */
-public abstract class ScheduledJob implements Assembler
+@FunctionalInterface
+public interface ScheduledJob extends Assembler
 {
     /** Prefix for scheduler job related classes */
-    public static final String PREFIX = "scheduledjobs";
+    String PREFIX = "scheduledjobs";
 
     /** The key for the scheduler job cache size if module caching is on. */
-    public static final String CACHE_SIZE_KEY = "scheduledjob.cache.size";
+    String CACHE_SIZE_KEY = "scheduledjob.cache.size";
 
     /** The default size of the scheduler job cache if module caching is on. */
-    public static final int CACHE_SIZE_DEFAULT = 10;
+    int CACHE_SIZE_DEFAULT = 10;
 
     /** Represents Scheduled Job Objects */
-    public static final String NAME = "scheduledjob";
-
-    /**
-     * @see org.apache.turbine.modules.Assembler#getPrefix()
-     */
-    @Override
-    public String getPrefix()
-    {
-        return PREFIX;
-    }
+    String NAME = "scheduledjob";
 
     /**
      * Run the Jobentry from the scheduler queue.
@@ -63,6 +55,5 @@ public abstract class ScheduledJob imple
      * @param job The job to run.
      * @throws Exception if something goes wrong
      */
-    public abstract void run(JobEntry job)
-            throws Exception;
+    void run(JobEntry job) throws Exception;
 }

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/ScheduledJobLoader.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/ScheduledJobLoader.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/ScheduledJobLoader.java 
(original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/ScheduledJobLoader.java 
Mon Mar  4 18:29:18 2019
@@ -34,7 +34,6 @@ import org.apache.turbine.services.sched
  */
 public class ScheduledJobLoader
     extends GenericLoader<ScheduledJob>
-    implements Loader<ScheduledJob>
 {
     /** The single instance of this class. */
     private static ScheduledJobLoader instance = new ScheduledJobLoader();
@@ -45,7 +44,9 @@ public class ScheduledJobLoader
      */
     private ScheduledJobLoader()
     {
-        super(ScheduledJob.class);
+        super(ScheduledJob.class,
+                () -> 
Turbine.getConfiguration().getInt(ScheduledJob.CACHE_SIZE_KEY,
+                        ScheduledJob.CACHE_SIZE_DEFAULT));
     }
 
     /**
@@ -86,15 +87,6 @@ public class ScheduledJobLoader
     }
 
     /**
-     * @see org.apache.turbine.modules.Loader#getCacheSize()
-     */
-    @Override
-    public int getCacheSize()
-    {
-        return ScheduledJobLoader.getConfiguredCacheSize();
-    }
-
-    /**
      * The method through which this class is accessed.
      *
      * @return The single instance of this class.
@@ -103,15 +95,4 @@ public class ScheduledJobLoader
     {
         return instance;
     }
-
-    /**
-     * Helper method to get the configured cache size for this module
-     *
-     * @return the configure cache size
-     */
-    private static int getConfiguredCacheSize()
-    {
-        return Turbine.getConfiguration().getInt(ScheduledJob.CACHE_SIZE_KEY,
-                ScheduledJob.CACHE_SIZE_DEFAULT);
-    }
 }

Modified: turbine/core/trunk/src/java/org/apache/turbine/modules/Screen.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/Screen.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/modules/Screen.java 
(original)
+++ turbine/core/trunk/src/java/org/apache/turbine/modules/Screen.java Mon Mar  
4 18:29:18 2019
@@ -25,38 +25,30 @@ import org.apache.turbine.pipeline.Pipel
 import org.apache.turbine.util.RunData;
 
 /**
- * This is the base class which defines the Screen modules.
+ * This is the interface which defines the Screen modules.
  *
  * @author <a href="mailto:[email protected]";>Dave Bryson</a>
  * @author <a href="mailto:[email protected]";>Henning P. Schmiedehausen</a>
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public abstract class Screen implements Assembler
+@FunctionalInterface
+public interface Screen extends Assembler
 {
     /** Prefix for screen related classes and templates */
-    public static final String PREFIX = "screens";
+    String PREFIX = "screens";
 
     /** Property for the size of the screen cache if caching is on */
-    public static final String CACHE_SIZE_KEY = "screen.cache.size";
+    String CACHE_SIZE_KEY = "screen.cache.size";
 
     /** The default size for the screen cache */
-    public static final int CACHE_SIZE_DEFAULT = 50;
+    int CACHE_SIZE_DEFAULT = 50;
 
     /** Represents Screen Objects */
-    public static final String NAME = "screen";
+    String NAME = "screen";
 
     /**
-     * @see org.apache.turbine.modules.Assembler#getPrefix()
-     */
-    @Override
-    public String getPrefix()
-    {
-        return PREFIX;
-    }
-
-    /**
-     * A subclass must override this method to build itself.
+     * A subclass must implement this method to build itself.
      * Subclasses override this method to store the screen in RunData
      * or to write the screen to the output stream referenced in
      * RunData.
@@ -64,18 +56,17 @@ public abstract class Screen implements
      * @return the content of the screen
      * @throws Exception a generic exception.
      */
-    protected abstract String doBuild(PipelineData pipelineData) throws 
Exception;
+    String doBuild(PipelineData pipelineData) throws Exception;
 
     /**
      * Subclasses can override this method to add additional
-     * functionality.  This method is protected to force clients to
-     * use ScreenLoader to build a Screen.
+     * functionality.
      *
      * @param pipelineData Turbine information.
      * @return the content of the screen
      * @throws Exception a generic exception.
      */
-    protected String build(PipelineData pipelineData)
+    default String build(PipelineData pipelineData)
         throws Exception
     {
         return doBuild(pipelineData);
@@ -95,7 +86,7 @@ public abstract class Screen implements
      * @param pipelineData Turbine information.
      * @return A String with the Layout.
      */
-    public String getLayout(PipelineData pipelineData)
+    default String getLayout(PipelineData pipelineData)
     {
         RunData data = getRunData(pipelineData);
         return data.getLayout();
@@ -107,7 +98,7 @@ public abstract class Screen implements
      * @param pipelineData Turbine information.
      * @param layout The layout name.
      */
-    public void setLayout(PipelineData pipelineData, String layout)
+    default void setLayout(PipelineData pipelineData, String layout)
     {
         RunData data = getRunData(pipelineData);
         data.setLayout(layout);

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/ScreenLoader.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/ScreenLoader.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/modules/ScreenLoader.java 
(original)
+++ turbine/core/trunk/src/java/org/apache/turbine/modules/ScreenLoader.java 
Mon Mar  4 18:29:18 2019
@@ -35,7 +35,6 @@ import org.apache.turbine.pipeline.Pipel
  */
 public class ScreenLoader
     extends GenericLoader<Screen>
-    implements Loader<Screen>
 {
     /** The single instance of this class. */
     private static ScreenLoader instance = new ScreenLoader();
@@ -46,7 +45,9 @@ public class ScreenLoader
      */
     private ScreenLoader()
     {
-        super(Screen.class);
+        super(Screen.class,
+                () -> Turbine.getConfiguration().getInt(Screen.CACHE_SIZE_KEY,
+                        Screen.CACHE_SIZE_DEFAULT));
     }
 
     /**
@@ -85,15 +86,6 @@ public class ScreenLoader
        }
 
     /**
-     * @see org.apache.turbine.modules.Loader#getCacheSize()
-     */
-    @Override
-    public int getCacheSize()
-    {
-        return ScreenLoader.getConfiguredCacheSize();
-    }
-
-    /**
      * The method through which this class is accessed.
      *
      * @return The single instance of this class.
@@ -102,15 +94,4 @@ public class ScreenLoader
     {
         return instance;
     }
-
-    /**
-     * Helper method to get the configured cache size for this module
-     *
-     * @return the configure cache size
-     */
-    private static int getConfiguredCacheSize()
-    {
-        return Turbine.getConfiguration().getInt(Screen.CACHE_SIZE_KEY,
-                Screen.CACHE_SIZE_DEFAULT);
-    }
 }

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/AccessController.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/actions/AccessController.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/AccessController.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/AccessController.java
 Mon Mar  4 18:29:18 2019
@@ -68,12 +68,10 @@ import org.apache.turbine.util.RunData;
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public class AccessController
-        extends Action
+public class AccessController implements Action
 {
-
     /** Logging */
-    private static Logger log = LogManager.getLogger(AccessController.class);
+    private static final Logger log = 
LogManager.getLogger(AccessController.class);
 
     /** Injected service instance */
     @TurbineService

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/DefaultAction.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/actions/DefaultAction.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/DefaultAction.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/DefaultAction.java
 Mon Mar  4 18:29:18 2019
@@ -33,7 +33,7 @@ import org.apache.turbine.util.RunData;
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public class DefaultAction extends Action
+public class DefaultAction implements Action
 {
     /**
      * Execute the action.
@@ -48,5 +48,4 @@ public class DefaultAction extends Actio
         RunData data = getRunData(pipelineData);
         data.setMessage(data.getAction() + " has been executed!");
     }
-
 }

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/InitContextsAction.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/actions/InitContextsAction.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/InitContextsAction.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/InitContextsAction.java
 Mon Mar  4 18:29:18 2019
@@ -41,8 +41,7 @@ import org.apache.turbine.util.RunData;
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public class InitContextsAction
-        extends Action
+public class InitContextsAction implements Action
 {
     /** Injected configuration instance */
     @TurbineConfiguration

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/LegacyVelocitySecureAction.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/actions/LegacyVelocitySecureAction.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/LegacyVelocitySecureAction.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/LegacyVelocitySecureAction.java
 Mon Mar  4 18:29:18 2019
@@ -48,7 +48,7 @@ public abstract class LegacyVelocitySecu
      * @throws Exception a generic exception.
      */
     @Override
-    protected void perform(PipelineData pipelineData) throws Exception
+    public void perform(PipelineData pipelineData) throws Exception
     {
         if (isAuthorized(getRunData(pipelineData)))
         {

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/LoginUser.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/actions/LoginUser.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/LoginUser.java 
(original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/LoginUser.java 
Mon Mar  4 18:29:18 2019
@@ -20,10 +20,10 @@ package org.apache.turbine.modules.actio
  */
 
 import org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.LogManager;
 import org.apache.fulcrum.security.util.DataBackendException;
 import org.apache.fulcrum.security.util.FulcrumSecurityException;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.apache.turbine.TurbineConstants;
 import org.apache.turbine.annotation.TurbineConfiguration;
 import org.apache.turbine.annotation.TurbineService;
@@ -45,8 +45,7 @@ import org.apache.turbine.util.TurbineEx
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public class LoginUser
-        extends Action
+public class LoginUser implements Action
 {
     /** CGI Parameter for the user name */
     public static final String CGI_USERNAME = "username";
@@ -139,7 +138,7 @@ public class LoginUser
 
             // Set Error Message and clean out the user.
             data.setMessage(loginError);
-            
+
             User anonymousUser = security.getAnonymousUser();
             data.setUser(anonymousUser);
 

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/LogoutUser.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/actions/LogoutUser.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/LogoutUser.java 
(original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/LogoutUser.java 
Mon Mar  4 18:29:18 2019
@@ -38,8 +38,7 @@ import org.apache.turbine.util.RunData;
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public class LogoutUser
-        extends Action
+public class LogoutUser implements Action
 {
     /** Injected service instance */
     @TurbineService
@@ -102,7 +101,7 @@ public class LogoutUser
         // Retrieve an anonymous user.
         User anonymousUser = security.getAnonymousUser();
         data.setUser(anonymousUser);
-        data.save();        
+        data.save();
 
         // In the event that the current screen or related navigations
         // require acl info, we cannot wait for Turbine to handle

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/VelocityAction.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/actions/VelocityAction.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/VelocityAction.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/VelocityAction.java
 Mon Mar  4 18:29:18 2019
@@ -67,7 +67,7 @@ public abstract class VelocityAction ext
      * @throws Exception a generic exception.
      */
     @Override
-    protected void perform(PipelineData pipelineData) throws Exception
+    public void perform(PipelineData pipelineData) throws Exception
     {
         try
         {

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/VelocitySecureAction.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/actions/VelocitySecureAction.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/VelocitySecureAction.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/VelocitySecureAction.java
 Mon Mar  4 18:29:18 2019
@@ -49,7 +49,7 @@ public abstract class VelocitySecureActi
      * @throws Exception a generic exception.
      */
     @Override
-    protected void perform(PipelineData pipelineData) throws Exception
+    public void perform(PipelineData pipelineData) throws Exception
     {
         if (isAuthorized(pipelineData))
         {

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/SessionValidator.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/SessionValidator.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/SessionValidator.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/SessionValidator.java
 Mon Mar  4 18:29:18 2019
@@ -41,7 +41,7 @@ import org.apache.turbine.util.RunData;
  * a hit to the database for each and every connection that a user
  * makes.
  * </p>
- * 
+ *
  * <p>
  * This action is special in that it should only be executed by the
  * Turbine servlet.
@@ -50,7 +50,7 @@ import org.apache.turbine.util.RunData;
  * @author <a href="mailto:[email protected]";>Dave Bryson</a>
  * @version $Id$
  */
-public abstract class SessionValidator extends Action
+public abstract class SessionValidator implements Action
 {
 
     @TurbineService

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/DirectResponseLayout.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/DirectResponseLayout.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/DirectResponseLayout.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/DirectResponseLayout.java
 Mon Mar  4 18:29:18 2019
@@ -34,7 +34,7 @@ import org.apache.turbine.util.TurbineEx
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public class DirectResponseLayout extends Layout
+public class DirectResponseLayout implements Layout
 {
     /**
      * Ensures that a direct response has been declared.
@@ -44,7 +44,7 @@ public class DirectResponseLayout extend
      */
     @Override
     public void doBuild(PipelineData pipelineData)
-    throws Exception
+            throws Exception
     {
         RunData data = getRunData(pipelineData);
         if (!data.isOutSet())

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/JspLayout.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/JspLayout.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/JspLayout.java 
(original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/JspLayout.java 
Mon Mar  4 18:29:18 2019
@@ -39,11 +39,10 @@ import org.apache.turbine.util.RunData;
  * @author <a href="mailto:[email protected]";>Henning P. Schmiedehausen</a>
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  */
-public class JspLayout
-    extends Layout
+public class JspLayout implements Layout
 {
     /** The prefix for lookup up layout pages */
-    private String prefix = Layout.PREFIX + "/";
+    private static final String prefix = PREFIX + "/";
 
     /** Injected service instance */
     @TurbineService

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityCachedLayout.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityCachedLayout.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityCachedLayout.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityCachedLayout.java
 Mon Mar  4 18:29:18 2019
@@ -48,14 +48,13 @@ import org.apache.velocity.context.Conte
  * @author <a href="mailto:[email protected]";>Henning P. Schmiedehausen</a>
  * @version $Id$
  */
-public class VelocityCachedLayout
-    extends Layout
+public class VelocityCachedLayout implements Layout
 {
     /** Logging */
-    private static Logger log = 
LogManager.getLogger(VelocityCachedLayout.class);
+    protected final Logger log = LogManager.getLogger(this.getClass());
 
     /** The prefix for lookup up layout pages */
-    private String prefix = getPrefix() + "/";
+    private static final String prefix = PREFIX + "/";
 
     /** Injected service instance */
     @TurbineService

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityDirectLayout.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityDirectLayout.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityDirectLayout.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityDirectLayout.java
 Mon Mar  4 18:29:18 2019
@@ -48,14 +48,13 @@ import org.apache.velocity.context.Conte
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public class VelocityDirectLayout
-    extends Layout
+public class VelocityDirectLayout implements Layout
 {
     /** Logging */
-    private static Logger log = 
LogManager.getLogger(VelocityDirectLayout.class);
+    protected final Logger log = LogManager.getLogger(this.getClass());
 
     /** The prefix for lookup up layout pages */
-    private String prefix = Layout.PREFIX + "/";
+    private static final String prefix = PREFIX + "/";
 
     /** Injected service instance */
     @TurbineService

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityOnlyLayout.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityOnlyLayout.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityOnlyLayout.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityOnlyLayout.java
 Mon Mar  4 18:29:18 2019
@@ -68,14 +68,13 @@ import org.apache.velocity.context.Conte
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public class VelocityOnlyLayout
-    extends Layout
+public class VelocityOnlyLayout implements Layout
 {
     /** Logging */
-    private static Logger log = LogManager.getLogger(VelocityOnlyLayout.class);
+    protected final Logger log = LogManager.getLogger(this.getClass());
 
     /** The prefix for lookup up layout pages */
-    private final String prefix = Layout.PREFIX + "/";
+    private static final String prefix = PREFIX + "/";
 
     /** Injected service instance */
     @TurbineService

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityXslLayout.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityXslLayout.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityXslLayout.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/layouts/VelocityXslLayout.java
 Mon Mar  4 18:29:18 2019
@@ -58,13 +58,13 @@ import org.apache.velocity.context.Conte
  * @author <a href="mailto:[email protected]";>Henning P. Schmiedehausen</a>
  * @version $Id$
  */
-public class VelocityXslLayout extends Layout
+public class VelocityXslLayout implements Layout
 {
     /** Logging */
-    private static Logger log = LogManager.getLogger(VelocityXslLayout.class);
+    protected final Logger log = LogManager.getLogger(this.getClass());
 
     /** The prefix for lookup up layout pages */
-    private final String prefix = Layout.PREFIX + "/";
+    private static final String prefix = PREFIX + "/";
 
     /** Injected service instance */
     @TurbineService

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/navigations/BaseJspNavigation.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/navigations/BaseJspNavigation.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/navigations/BaseJspNavigation.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/navigations/BaseJspNavigation.java
 Mon Mar  4 18:29:18 2019
@@ -22,7 +22,6 @@ package org.apache.turbine.modules.navig
 
 
 import org.apache.turbine.annotation.TurbineService;
-import org.apache.turbine.modules.Navigation;
 import org.apache.turbine.pipeline.PipelineData;
 import org.apache.turbine.services.jsp.JspService;
 import org.apache.turbine.util.RunData;
@@ -40,7 +39,7 @@ public class BaseJspNavigation
         extends TemplateNavigation
 {
     /** The prefix for lookup up navigation pages */
-    private final String prefix = Navigation.PREFIX + "/";
+    private static final String prefix = PREFIX + "/";
 
     /** Injected service instance */
     @TurbineService

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/navigations/TemplateNavigation.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/navigations/TemplateNavigation.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/navigations/TemplateNavigation.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/navigations/TemplateNavigation.java
 Mon Mar  4 18:29:18 2019
@@ -31,8 +31,7 @@ import org.apache.turbine.pipeline.Pipel
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public abstract class TemplateNavigation
-        extends Navigation
+public abstract class TemplateNavigation implements Navigation
 {
     /**
      * WebMacro Navigations extending this class should override this
@@ -60,7 +59,7 @@ public abstract class TemplateNavigation
      * @throws Exception a generic exception.
      */
     @Override
-    protected String doBuild(PipelineData pipelineData)
+    public String doBuild(PipelineData pipelineData)
             throws Exception
     {
         doBuildTemplate(pipelineData);

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/navigations/VelocityNavigation.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/navigations/VelocityNavigation.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/navigations/VelocityNavigation.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/navigations/VelocityNavigation.java
 Mon Mar  4 18:29:18 2019
@@ -22,7 +22,6 @@ package org.apache.turbine.modules.navig
 
 
 import org.apache.turbine.annotation.TurbineService;
-import org.apache.turbine.modules.Navigation;
 import org.apache.turbine.pipeline.PipelineData;
 import org.apache.turbine.services.template.TemplateService;
 import org.apache.turbine.services.velocity.VelocityService;
@@ -46,7 +45,7 @@ public class VelocityNavigation
         extends TemplateNavigation
 {
     /** The prefix for lookup up navigation pages */
-    private final String prefix = Navigation.PREFIX + "/";
+    private static final String prefix = PREFIX + "/";
 
     /** Injected service instance */
     @TurbineService

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/pages/DefaultPage.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/pages/DefaultPage.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/pages/DefaultPage.java 
(original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/pages/DefaultPage.java 
Mon Mar  4 18:29:18 2019
@@ -89,11 +89,10 @@ import org.apache.turbine.util.RunData;
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public class DefaultPage
-    extends Page
+public class DefaultPage implements Page
 {
     /** Logging */
-    protected Logger log = LogManager.getLogger(this.getClass());
+    protected final Logger log = LogManager.getLogger(this.getClass());
 
     /** Injected loader instance */
     @TurbineLoader( Action.class )

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/BaseJspScreen.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/screens/BaseJspScreen.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/BaseJspScreen.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/BaseJspScreen.java
 Mon Mar  4 18:29:18 2019
@@ -40,7 +40,7 @@ public class BaseJspScreen
         extends TemplateScreen
 {
     /** The prefix for lookup up screen pages */
-    private String prefix = getPrefix() + "/";
+    private static final String prefix = PREFIX + "/";
 
     /** Injected service instance */
     @TurbineService

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/RawScreen.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/screens/RawScreen.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/RawScreen.java 
(original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/RawScreen.java 
Mon Mar  4 18:29:18 2019
@@ -42,7 +42,7 @@ import org.apache.turbine.util.RunData;
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public abstract class RawScreen extends Screen
+public abstract class RawScreen implements Screen
 {
     /**
      * Build the Screen.  This method actually makes a call to the
@@ -53,7 +53,7 @@ public abstract class RawScreen extends
      * @throws Exception a generic exception.
      */
     @Override
-    protected final String doBuild(PipelineData pipelineData)
+    public final String doBuild(PipelineData pipelineData)
             throws Exception
     {
         RunData data = getRunData(pipelineData);

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/TemplateScreen.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/screens/TemplateScreen.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/TemplateScreen.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/TemplateScreen.java
 Mon Mar  4 18:29:18 2019
@@ -49,8 +49,7 @@ import org.apache.turbine.util.template.
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public abstract class TemplateScreen
-    extends Screen
+public abstract class TemplateScreen implements Screen
 {
     /** Logging */
     protected Logger log = LogManager.getLogger(this.getClass());
@@ -104,7 +103,7 @@ public abstract class TemplateScreen
      * @throws Exception A generic exception.
      */
     @Override
-    protected String doBuild(PipelineData pipelineData)
+    public String doBuild(PipelineData pipelineData)
             throws Exception
     {
         String out = null;

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocityCachedScreen.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocityCachedScreen.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocityCachedScreen.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocityCachedScreen.java
 Mon Mar  4 18:29:18 2019
@@ -39,9 +39,6 @@ import org.apache.velocity.context.Conte
 public class VelocityCachedScreen
     extends VelocityScreen
 {
-    /** The prefix for lookup up screen pages */
-    private String prefix = getPrefix() + "/";
-
     /**
      * This builds the Velocity template.
      *

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocityDirectScreen.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocityDirectScreen.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocityDirectScreen.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocityDirectScreen.java
 Mon Mar  4 18:29:18 2019
@@ -40,9 +40,6 @@ import org.apache.velocity.context.Conte
 public class VelocityDirectScreen
     extends VelocityScreen
 {
-    /** The prefix for lookup up screen pages */
-    private String prefix = getPrefix() + "/";
-
     /**
      * This builds the Velocity template.
      *

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocityScreen.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocityScreen.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocityScreen.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocityScreen.java
 Mon Mar  4 18:29:18 2019
@@ -49,7 +49,7 @@ public class VelocityScreen
     extends TemplateScreen
 {
     /** The prefix for lookup up screen pages */
-    private final String prefix = getPrefix() + "/";
+    protected static final String prefix = PREFIX + "/";
 
     /** Injected service instance */
     @TurbineService

Modified: 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/error/InvalidState.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/screens/error/InvalidState.java?rev=1854786&r1=1854785&r2=1854786&view=diff
==============================================================================
--- 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/error/InvalidState.java
 (original)
+++ 
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/error/InvalidState.java
 Mon Mar  4 18:29:18 2019
@@ -43,8 +43,7 @@ import org.apache.turbine.util.uri.Turbi
  * @author <a href="mailto:[email protected]";>Peter Courcoux</a>
  * @version $Id$
  */
-public class InvalidState
-    extends Screen
+public class InvalidState implements Screen
 {
     /**
      * Build the Screen.
@@ -59,7 +58,7 @@ public class InvalidState
         RunData data = getRunData(pipelineData);
         StringBuilder body = new StringBuilder();
         body.append("<body>");
-        
+
         StringBuilder message = new StringBuilder();
         StringBuilder sb = new StringBuilder();
         sb.append("<b>There has been an error.</b>")


Reply via email to