You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by tv...@apache.org on 2015/08/13 02:35:48 UTC
svn commit: r1695634 [1/3] - in /turbine/core/trunk/src: changes/
java/org/apache/turbine/modules/ java/org/apache/turbine/modules/actions/
java/org/apache/turbine/modules/actions/sessionvalidator/
java/org/apache/turbine/modules/layouts/ java/org/apac...
Author: tv
Date: Thu Aug 13 00:35:47 2015
New Revision: 1695634
URL: http://svn.apache.org/r1695634
Log:
Remove all deprecated methods using RunData as a parameter to clean up the API.
This is possible because PipelineData is derived from RunData.
Further cleanup is needed to handle legacy code
Modified:
turbine/core/trunk/src/changes/changes.xml
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/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/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/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/DefaultSessionValidator.java
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/TemplateSecureSessionValidator.java
turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/TemplateSessionValidator.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/pages/JspPage.java
turbine/core/trunk/src/java/org/apache/turbine/modules/pages/TemplatePage.java
turbine/core/trunk/src/java/org/apache/turbine/modules/pages/VelocityPage.java
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/BaseJspScreen.java
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/Error.java
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/JSONScreen.java
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/JSONSecureScreen.java
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/JspErrorScreen.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/VelocityErrorScreen.java
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocityScreen.java
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/VelocitySecureScreen.java
turbine/core/trunk/src/java/org/apache/turbine/modules/screens/error/InvalidState.java
turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaBaseFactory.java
turbine/core/trunk/src/java/org/apache/turbine/services/jsonrpc/JSONProcessor.java
turbine/core/trunk/src/java/org/apache/turbine/services/jsp/JspService.java
turbine/core/trunk/src/java/org/apache/turbine/services/jsp/TurbineJsp.java
turbine/core/trunk/src/java/org/apache/turbine/services/jsp/TurbineJspService.java
turbine/core/trunk/src/java/org/apache/turbine/services/rundata/DefaultTurbineRunData.java
turbine/core/trunk/src/java/org/apache/turbine/services/rundata/TurbineRunData.java
turbine/core/trunk/src/java/org/apache/turbine/services/rundata/TurbineRunDataService.java
turbine/core/trunk/src/java/org/apache/turbine/services/velocity/TurbineVelocity.java
turbine/core/trunk/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java
turbine/core/trunk/src/java/org/apache/turbine/services/velocity/VelocityService.java
turbine/core/trunk/src/java/org/apache/turbine/util/RunData.java
turbine/core/trunk/src/java/org/apache/turbine/util/velocity/VelocityActionEvent.java
turbine/core/trunk/src/test/org/apache/turbine/ConfigurationTest.java
turbine/core/trunk/src/test/org/apache/turbine/modules/ActionLoaderTest.java
turbine/core/trunk/src/test/org/apache/turbine/modules/actions/VelocityActionDoesNothing.java
turbine/core/trunk/src/test/org/apache/turbine/modules/actions/VelocityActionThrowsException.java
turbine/core/trunk/src/test/org/apache/turbine/modules/actions/VelocityActionWithServiceInjection.java
turbine/core/trunk/src/test/org/apache/turbine/modules/layouts/TestVelocityOnlyLayout.java
turbine/core/trunk/src/test/org/apache/turbine/modules/pages/TestVelocityPage.java
Modified: turbine/core/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/changes/changes.xml?rev=1695634&r1=1695633&r2=1695634&view=diff
==============================================================================
--- turbine/core/trunk/src/changes/changes.xml (original)
+++ turbine/core/trunk/src/changes/changes.xml Thu Aug 13 00:35:47 2015
@@ -25,6 +25,10 @@
<body>
<release version="4.0-M2" date="in Subversion">
+ <action type="remove" dev="tv">
+ Remove all deprecated methods using RunData as a parameter to clean up the API
+ Further cleanup is needed.
+ </action>
<action type="add" dev="tv">
Add QuartzSchedulerService
</action>
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -20,7 +20,6 @@ package org.apache.turbine.modules;
*/
import org.apache.turbine.pipeline.PipelineData;
-import org.apache.turbine.util.RunData;
/**
* Generic Action class.
@@ -46,6 +45,7 @@ public abstract class Action extends Ass
/**
* @see org.apache.turbine.modules.Assembler#getPrefix()
*/
+ @Override
public String getPrefix()
{
return PREFIX;
@@ -55,37 +55,10 @@ public abstract class Action extends Ass
* A subclass must override this method to perform itself. The
* Action can also set the screen that is associated with RunData.
*
- * @deprecated Use PipelineData version instead.
* @param data Turbine information.
* @exception Exception a generic exception.
*/
- public abstract void doPerform(RunData data) 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.
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @exception Exception a generic exception.
- */
- protected void perform(RunData data) throws Exception
- {
- doPerform(data);
- }
-
- /**
- * A subclass must override this method to perform itself. The
- * Action can also set the screen that is associated with RunData.
- *
- * @param data Turbine information.
- * @exception Exception a generic exception.
- */
- public void doPerform(PipelineData pipelineData) throws Exception
- {
- RunData data = getRunData(pipelineData);
- doPerform(data);
- }
+ public abstract void doPerform(PipelineData pipelineData) throws Exception;
/**
* Subclasses can override this method to add additional
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -33,7 +33,6 @@ import org.apache.turbine.Turbine;
import org.apache.turbine.TurbineConstants;
import org.apache.turbine.annotation.TurbineActionEvent;
import org.apache.turbine.pipeline.PipelineData;
-import org.apache.turbine.util.RunData;
/**
* <p>
@@ -42,7 +41,7 @@ import org.apache.turbine.util.RunData;
* event based actions. Essentially, you label all your submit buttons
* with the prefix of "eventSubmit_" and the suffix of "methodName".
* For example, "eventSubmit_doDelete". Then any class that subclasses
- * this class will get its "doDelete(RunData data)" method executed.
+ * this class will get its "doDelete(PipelineData data)" method executed.
* If for any reason, it was not able to execute the method, it will
* fall back to executing the doPerform() method which is required to
* be implemented.
@@ -187,23 +186,6 @@ public abstract class ActionEvent extend
}
/**
- * This overrides the default Action.perform() to execute the
- * doEvent() method. If that fails, then it will execute the
- * doPerform() method instead.
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @exception Exception a generic exception.
- */
- @Deprecated
- @Override
- protected void perform(RunData data)
- throws Exception
- {
- ParameterParser pp = data.getParameters();
- executeEvents(pp, new Class<?>[]{ RunData.class }, new Object[]{ data });
- }
-
- /**
* This overrides the default Action.perform() to execute the
* doEvent() method. If that fails, then it will execute the
* doPerform() method instead.
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -21,7 +21,6 @@ package org.apache.turbine.modules;
import org.apache.turbine.Turbine;
import org.apache.turbine.pipeline.PipelineData;
-import org.apache.turbine.util.RunData;
/**
* The purpose of this class is to allow one to load and execute
@@ -50,22 +49,6 @@ public class ActionLoader
/**
* Attempts to load and execute the external action.
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @param name Name of object that will execute the action.
- * @exception Exception a generic exception.
- */
- @Deprecated
- @Override
- public void exec(RunData data, String name)
- throws Exception
- {
- // Execute action
- getAssembler(name).perform(data);
- }
-
- /**
- * Attempts to load and execute the external action.
*
* @param pipelineData Turbine information.
* @param name Name of object that will execute the action.
@@ -86,6 +69,7 @@ public class ActionLoader
* @return An Action with the specified name, or null.
* @exception Exception a generic exception.
*/
+ @Override
public Action getAssembler(String name)
throws Exception
{
@@ -95,6 +79,7 @@ public class ActionLoader
/**
* @see org.apache.turbine.modules.Loader#getCacheSize()
*/
+ @Override
public int getCacheSize()
{
return ActionLoader.getConfiguredCacheSize();
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -27,7 +27,6 @@ import org.apache.turbine.TurbineConstan
import org.apache.turbine.pipeline.PipelineData;
import org.apache.turbine.services.assemblerbroker.AssemblerBrokerService;
import org.apache.turbine.services.assemblerbroker.TurbineAssemblerBroker;
-import org.apache.turbine.util.RunData;
/**
* This is the base class for the loaders. It contains code that is
@@ -64,37 +63,10 @@ public abstract class GenericLoader<T ex
/**
* Attempts to load and execute the external action that has been
* set.
- * Should revert to abstract when RunData has gone.
* @exception Exception a generic exception.
*/
- public void exec(PipelineData pipelineData, String name)
- throws Exception
- {
- RunData data = getRunData(pipelineData);
- exec(data, name);
- }
-
-
- /**
- * Attempts to load and execute the external action that has been
- * set.
- * @deprecated Use of this method should be avoided. Use
- * <code>exec(PipelineData data, String name)</code> instead.
- * @exception Exception a generic exception.
- */
- @Deprecated
- public abstract void exec(RunData data, String name)
- throws Exception;
-
- /**
- * Commented out.
- * This method should return the complete classpath + name.
- *
- * @param name
- * @return
- *
- public abstract String getClassName(String name);
- */
+ public abstract void exec(PipelineData pipelineData, String name)
+ throws Exception;
/**
* Returns whether or not this external action is reload itself.
@@ -213,21 +185,4 @@ public abstract class GenericLoader<T ex
return asm;
}
-
- /**
- * Helper method to cast from PipelineData to RunData. This will go when
- * the pipeline is fully implemented and the RunData-methods are removed
- *
- * @param pipelineData a PipelineData object
- *
- * @return the input object casted to RunData
- */
- private RunData getRunData(PipelineData pipelineData)
- {
- if(!(pipelineData instanceof RunData))
- {
- throw new RuntimeException("Can't cast to rundata from pipeline data.");
- }
- return (RunData)pipelineData;
- }
}
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -20,7 +20,6 @@ package org.apache.turbine.modules;
*/
import org.apache.turbine.pipeline.PipelineData;
-import org.apache.turbine.util.RunData;
/**
* This is the base class that defines what a Layout module is.
@@ -34,10 +33,10 @@ public abstract class Layout
{
/** Prefix for layout related classes and templates */
public static final 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";
-
+
/** The default size for the layout cache */
public static final int CACHE_SIZE_DEFAULT = 10;
@@ -47,51 +46,19 @@ public abstract class Layout
/**
* @see org.apache.turbine.modules.Assembler#getPrefix()
*/
+ @Override
public String getPrefix()
{
return PREFIX;
}
/**
- * A subclass must override this method to build itself.
- * Subclasses override this method to store the layout in RunData
- * or to write the layout to the output stream referenced in
- * RunData.
- * @deprecated Use PipelineData version instead
- *
- * @param data Turbine information.
- * @exception Exception a generic exception.
- */
- protected abstract void doBuild(RunData data)
- throws Exception;
-
- /**
- * Subclasses can override this method to add additional
- * functionality. This method is protected to force clients to
- * use LayoutLoader to build a Layout.
- * @deprecated Use PipelineData version instead
- * @param data Turbine information.
- * @exception Exception a generic exception.
- */
- protected void build(RunData data)
- throws Exception
- {
- doBuild(data);
- }
-
-
- /**
* A subclass must override this method to perform itself. The
- * Action can also set the screen that is associated with RunData.
- * Should revert to abstract when RunData is gone.
+ * Action can also set the screen that is associated with PipelineData.
* @param data Turbine information.
* @exception Exception a generic exception.
*/
- protected void doBuild(PipelineData pipelineData) throws Exception
- {
- RunData data = getRunData(pipelineData);
- doBuild(data);
- }
+ protected abstract void doBuild(PipelineData pipelineData) throws Exception;
/**
* Subclasses can override this method to add additional
@@ -105,6 +72,4 @@ public abstract class Layout
{
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -21,7 +21,6 @@ package org.apache.turbine.modules;
import org.apache.turbine.Turbine;
import org.apache.turbine.pipeline.PipelineData;
-import org.apache.turbine.util.RunData;
/**
* The purpose of this class is to allow one to load and execute
@@ -51,23 +50,6 @@ public class LayoutLoader
/**
* Attempts to load and execute the external layout.
*
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @param name Name of object that will execute the layout.
- * @exception Exception a generic exception.
- */
- @Deprecated
- @Override
- public void exec(RunData data, String name)
- throws Exception
- {
- // Execute layout
- getAssembler(name).build(data);
- }
-
- /**
- * Attempts to load and execute the external layout.
- *
* @param pipelineData Turbine information.
* @param name Name of object that will execute the layout.
* @exception Exception a generic exception.
@@ -87,6 +69,7 @@ public class LayoutLoader
* @return A Layout with the specified name, or null.
* @exception Exception a generic exception.
*/
+ @Override
public Layout getAssembler(String name)
throws Exception
{
@@ -96,6 +79,7 @@ public class LayoutLoader
/**
* @see org.apache.turbine.modules.Loader#getCacheSize()
*/
+ @Override
public int getCacheSize()
{
return LayoutLoader.getConfiguredCacheSize();
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -20,10 +20,7 @@ package org.apache.turbine.modules;
*/
import org.apache.ecs.ConcreteElement;
-
import org.apache.turbine.pipeline.PipelineData;
-import org.apache.turbine.util.InputFilterUtils;
-import org.apache.turbine.util.RunData;
/**
* This is the base class that defines what a Navigation module is.
@@ -38,10 +35,10 @@ public abstract class Navigation
{
/** Prefix for navigation related classes and templates */
public static final 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";
-
+
/** The default size for the navigation cache */
public static final int CACHE_SIZE_DEFAULT = 10;
@@ -51,6 +48,7 @@ public abstract class Navigation
/**
* @see org.apache.turbine.modules.Assembler#getPrefix()
*/
+ @Override
public String getPrefix()
{
return PREFIX;
@@ -61,43 +59,11 @@ public abstract class Navigation
* Subclasses override this method to store the navigation in
* RunData or to write the navigation to the output stream
* referenced in RunData.
- * @deprecated Use PipelineData version instead
- *
- * @param data Turbine information.
- * @exception Exception a generic exception.
- */
- protected abstract ConcreteElement doBuild(RunData data)
- 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.
- * @deprecated Use PipelineData version instead
- * @param data Turbine information.
- * @exception Exception a generic exception.
- */
- protected ConcreteElement build(RunData data)
- throws Exception
- {
- return doBuild(data);
- }
-
- /**
- * A subclass must override 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.
*
* @param data Turbine information.
* @exception Exception a generic exception.
*/
- protected ConcreteElement doBuild(PipelineData pipelineData)
- throws Exception
- {
- RunData data = getRunData(pipelineData);
- return doBuild(data);
- }
+ protected abstract ConcreteElement doBuild(PipelineData pipelineData) throws Exception;
/**
* Subclasses can override this method to add additional
@@ -112,19 +78,4 @@ public abstract class Navigation
{
return doBuild(pipelineData);
}
-
-
- /**
- * This function can/should be used in any screen that will output
- * User entered text. This will help prevent users from entering
- * html (<SCRIPT>) tags that will get executed by the browser.
- *
- * @param s The string to prepare.
- * @return A string with the input already prepared.
- * @deprecated Use InputFilterUtils.prepareText(String s)
- */
- public static String prepareText(String s)
- {
- return InputFilterUtils.prepareText(s);
- }
}
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -22,7 +22,6 @@ package org.apache.turbine.modules;
import org.apache.ecs.ConcreteElement;
import org.apache.turbine.Turbine;
import org.apache.turbine.pipeline.PipelineData;
-import org.apache.turbine.util.RunData;
/**
* The purpose of this class is to allow one to load and execute
@@ -56,26 +55,6 @@ public class NavigationLoader
* value. This allows you to easily chain the execution of
* Navigation modules together.
*
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @param name Name of object that will execute the navigation.
- * @exception Exception a generic exception.
- */
- @Deprecated
- public ConcreteElement eval(RunData data, String name)
- throws Exception
- {
- // Execute Navigation
- return getAssembler(name).build(data);
- }
-
- /**
- * Attempts to load and execute the external Navigation. This is
- * used when you want to execute a Navigation which returns its
- * output via a MultiPartElement instead of out the data.getPage()
- * value. This allows you to easily chain the execution of
- * Navigation modules together.
- *
* @param data Turbine information.
* @param name Name of object that will execute the navigation.
* @exception Exception a generic exception.
@@ -87,22 +66,6 @@ public class NavigationLoader
return getAssembler(name).build(pipelineData);
}
-
- /**
- * Attempts to load and execute the external Navigation.
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @param name Name of object instance.
- * @exception Exception a generic exception.
- */
- @Deprecated
- @Override
- public void exec(RunData data, String name)
- throws Exception
- {
- this.eval(data, name);
- }
-
/**
* Attempts to load and execute the external Navigation.
*
@@ -117,7 +80,6 @@ public class NavigationLoader
this.eval(pipelineData, name);
}
-
/**
* Pulls out an instance of the object by name. Name is just the
* single name of the object.
@@ -126,6 +88,7 @@ public class NavigationLoader
* @return A Layout with the specified name, or null.
* @exception Exception a generic exception.
*/
+ @Override
public Navigation getAssembler(String name)
throws Exception
{
@@ -135,6 +98,7 @@ public class NavigationLoader
/**
* @see org.apache.turbine.modules.Loader#getCacheSize()
*/
+ @Override
public int getCacheSize()
{
return NavigationLoader.getConfiguredCacheSize();
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -20,7 +20,6 @@ package org.apache.turbine.modules;
*/
import org.apache.turbine.pipeline.PipelineData;
-import org.apache.turbine.util.RunData;
/**
* This is the base class that defines what a Page module is.
@@ -35,10 +34,10 @@ public abstract class Page
{
/** Prefix for page related classes and templates */
public static final 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";
-
+
/** The default size for the page cache */
public static final int CACHE_SIZE_DEFAULT = 5;
@@ -48,6 +47,7 @@ public abstract class Page
/**
* @see org.apache.turbine.modules.Assembler#getPrefix()
*/
+ @Override
public String getPrefix()
{
return PREFIX;
@@ -55,46 +55,12 @@ public abstract class Page
/**
* A subclass must override this method to build itself.
- * Subclasses override this method to store the page in RunData or
- * to write the page to the output stream referenced in RunData.
- * @deprecated Use <code>doBuild(PipelineData pipelineData)</code> instead
+ * Subclasses override this method to store the page in PipelineData or
+ * to write the page to the output stream referenced in PipelineData.
* @param data Turbine information.
* @exception Exception a generic exception.
*/
- protected abstract void doBuild(RunData data)
- throws Exception;
-
-
- /**
- * A subclass must override this method to build itself.
- * Subclasses override this method to store the page in RunData or
- * to write the page to the output stream referenced in RunData.
- * Should revert to abstract when RunData goes.
- * @param data Turbine information.
- * @exception Exception a generic exception.
- */
- protected void doBuild(PipelineData pipelineData)
- throws Exception
- {
- RunData data = getRunData(pipelineData);
- doBuild(data);
- }
-
- /**
- * Subclasses can override this method to add additional
- * functionality. This method is protected to force clients to
- * use PageLoader to build a Page.
- * @deprecated Use <code>build(PipelineData)</code> instead.
- * @param data Turbine information.
- * @exception Exception a generic exception.
- */
- protected void build(RunData data)
- throws Exception
- {
- doBuild(data);
- }
-
-
+ protected abstract void doBuild(PipelineData pipelineData) throws Exception;
/**
* Subclasses can override this method to add additional
@@ -109,5 +75,4 @@ public abstract class Page
{
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -21,7 +21,6 @@ package org.apache.turbine.modules;
import org.apache.turbine.Turbine;
import org.apache.turbine.pipeline.PipelineData;
-import org.apache.turbine.util.RunData;
/**
* The purpose of this class is to allow one to load and execute Page
@@ -50,22 +49,6 @@ public class PageLoader
/**
* Attempts to load and execute the external page.
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @param name Name of object that will execute the page.
- * @exception Exception a generic exception.
- */
- @Deprecated
- @Override
- public void exec(RunData data, String name)
- throws Exception
- {
- // Execute page
- getAssembler(name).build(data);
- }
-
- /**
- * Attempts to load and execute the external page.
*
* @param data Turbine information.
* @param name Name of object that will execute the page.
@@ -87,6 +70,7 @@ public class PageLoader
* @return A Screen with the specified name, or null.
* @exception Exception a generic exception.
*/
+ @Override
public Page getAssembler(String name)
throws Exception
{
@@ -96,6 +80,7 @@ public class PageLoader
/**
* @see org.apache.turbine.modules.Loader#getCacheSize()
*/
+ @Override
public int getCacheSize()
{
return PageLoader.getConfiguredCacheSize();
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -22,8 +22,8 @@ package org.apache.turbine.modules;
import org.apache.turbine.Turbine;
+import org.apache.turbine.pipeline.PipelineData;
import org.apache.turbine.services.schedule.JobEntry;
-import org.apache.turbine.util.RunData;
/**
* ScheduledJobs loader class.
@@ -68,7 +68,7 @@ public class ScheduledJobLoader
* HELP! - THIS IS UGLY!
*
* I want the cache stuff from GenericLoader, BUT, I don't think
- * the scheduler needs the Rundata object. The scheduler runs
+ * the scheduler needs the PipelineData object. The scheduler runs
* independently of an HTTP request. This should not extend
* GenericLoader! Thoughts??
*
@@ -79,10 +79,10 @@ public class ScheduledJobLoader
*/
@Deprecated
@Override
- public void exec(RunData data, String name)
+ public void exec(PipelineData data, String name)
throws Exception
{
- throw new Exception("RunData objects not accepted for Scheduled jobs");
+ throw new Exception("PipelineData objects not accepted for Scheduled jobs");
}
/**
@@ -93,6 +93,7 @@ public class ScheduledJobLoader
* @return A ScheduledJob with the specified name, or null.
* @exception Exception a generic exception.
*/
+ @Override
public ScheduledJob getAssembler(String name)
throws Exception
{
@@ -102,6 +103,7 @@ public class ScheduledJobLoader
/**
* @see org.apache.turbine.modules.Loader#getCacheSize()
*/
+ @Override
public int getCacheSize()
{
return ScheduledJobLoader.getConfiguredCacheSize();
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -22,9 +22,7 @@ package org.apache.turbine.modules;
import org.apache.ecs.ConcreteElement;
-
import org.apache.turbine.pipeline.PipelineData;
-import org.apache.turbine.util.InputFilterUtils;
import org.apache.turbine.util.RunData;
/**
@@ -40,10 +38,10 @@ public abstract class Screen
{
/** Prefix for screen related classes and templates */
public static final 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";
-
+
/** The default size for the screen cache */
public static final int CACHE_SIZE_DEFAULT = 50;
@@ -53,6 +51,7 @@ public abstract class Screen
/**
* @see org.apache.turbine.modules.Assembler#getPrefix()
*/
+ @Override
public String getPrefix()
{
return PREFIX;
@@ -63,16 +62,10 @@ public abstract class Screen
* Subclasses override this method to store the screen in RunData
* or to write the screen to the output stream referenced in
* RunData.
- * Should revert to abstract when RunData has gone.
- * @param data Turbine information.
+ * @param pipelineData Turbine information.
* @exception Exception a generic exception.
*/
- protected ConcreteElement doBuild(PipelineData pipelineData)
- throws Exception
- {
- RunData data = getRunData(pipelineData);
- return doBuild(data);
- }
+ protected abstract ConcreteElement doBuild(PipelineData pipelineData) throws Exception;
/**
* Subclasses can override this method to add additional
@@ -111,7 +104,7 @@ public abstract class Screen
/**
* Set the layout for a Screen.
*
- * @param data Turbine information.
+ * @param pipelineData Turbine information.
* @param layout The layout name.
*/
public void setLayout(PipelineData pipelineData, String layout)
@@ -119,91 +112,4 @@ public abstract class Screen
RunData data = getRunData(pipelineData);
data.setLayout(layout);
}
-
- /**
- * A subclass must override 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.
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @exception Exception a generic exception.
- */
- protected abstract ConcreteElement doBuild(RunData data)
- 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.
- * @deprecated Use PipelineData version instead.
- *
- * @param data Turbine information.
- * @exception Exception a generic exception.
- */
- protected ConcreteElement build(RunData data)
- throws Exception
- {
- return doBuild(data);
- }
-
- /**
- * If the Layout has not been defined by the Screen then set the
- * layout to be "DefaultLayout". The Screen object can also
- * override this method to provide intelligent determination of
- * the Layout to execute. You can also define that logic here as
- * well if you want it to apply on a global scale. For example,
- * if you wanted to allow someone to define Layout "preferences"
- * where they could dynamically change the Layout for the entire
- * site. The information for the request is passed in with the
- * RunData object.
- * @deprecated Use PipelineData version instead.
- *
- * @param data Turbine information.
- * @return A String with the Layout.
- */
- public String getLayout(RunData data)
- {
- return data.getLayout();
- }
-
- /**
- * Set the layout for a Screen.
- *
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @param layout The layout name.
- */
- public void setLayout(RunData data, String layout)
- {
- data.setLayout(layout);
- }
-
- /**
- * This function can/should be used in any screen that will output
- * User entered text. This will help prevent users from entering
- * html (<SCRIPT>) tags that will get executed by the browser.
- *
- * @param s The string to prepare.
- * @return A string with the input already prepared.
- * @deprecated Use InputFilterUtils.prepareText(String s)
- */
- public static String prepareText(String s)
- {
- return InputFilterUtils.prepareText(s);
- }
-
- /**
- * This function can/should be used in any screen that will output
- * User entered text. This will help prevent users from entering
- * html (<SCRIPT>) tags that will get executed by the browser.
- *
- * @param s The string to prepare.
- * @return A string with the input already prepared.
- * @deprecated Use InputFilterUtils.prepareTextMinimum(String s)
- */
- public static String prepareTextMinimum(String s)
- {
- return InputFilterUtils.prepareTextMinimum(s);
- }
}
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -24,7 +24,6 @@ package org.apache.turbine.modules;
import org.apache.ecs.ConcreteElement;
import org.apache.turbine.Turbine;
import org.apache.turbine.pipeline.PipelineData;
-import org.apache.turbine.util.RunData;
/**
* The purpose of this class is to allow one to load and execute
@@ -58,26 +57,6 @@ public class ScreenLoader
* This allows you to easily chain the execution of Screen modules
* together.
*
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @param name Name of object that will execute the screen.
- * @exception Exception a generic exception.
- */
- @Deprecated
- public ConcreteElement eval(RunData data, String name)
- throws Exception
- {
- // Execute screen
- return getAssembler(name).build(data);
- }
-
- /**
- * Attempts to load and execute the external Screen. This is used
- * when you want to execute a Screen which returns its output via
- * a MultiPartElement instead of out the data.getPage() value.
- * This allows you to easily chain the execution of Screen modules
- * together.
- *
* @param data Turbine information.
* @param name Name of object that will execute the screen.
* @exception Exception a generic exception.
@@ -93,23 +72,6 @@ public class ScreenLoader
* Attempts to load and execute the Screen. This is used when you
* want to execute a Screen which returns its output via the
* data.getPage() object.
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @param name Name of object that will execute the screen.
- * @exception Exception a generic exception.
- */
- @Deprecated
- @Override
- public void exec(RunData data, String name)
- throws Exception
- {
- this.eval(data, name);
- }
-
- /**
- * Attempts to load and execute the Screen. This is used when you
- * want to execute a Screen which returns its output via the
- * data.getPage() object.
*
* @param data Turbine information.
* @param name Name of object that will execute the screen.
@@ -130,6 +92,7 @@ public class ScreenLoader
* @return A Screen with the specified name, or null.
* @exception Exception a generic exception.
*/
+ @Override
public Screen getAssembler(String name)
throws Exception
{
@@ -139,6 +102,7 @@ public class ScreenLoader
/**
* @see org.apache.turbine.modules.Loader#getCacheSize()
*/
+ @Override
public int getCacheSize()
{
return ScreenLoader.getConfiguredCacheSize();
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -83,15 +83,15 @@ public class AccessController
* session, otherwise it is loaded through
* <code>TurbineSecurity.getACL()</code> and added to the current
* session.
- * @deprecated Use PipelineData version instead.
+ *
* @param data Turbine information.
* @exception FulcrumSecurityException problem with the security service.
*/
- @Deprecated
@Override
- public void doPerform(RunData data)
- throws FulcrumSecurityException
+ public void doPerform(PipelineData pipelineData)
+ throws FulcrumSecurityException
{
+ RunData data = getRunData(pipelineData);
User user = data.getUser();
if (!security.isAnonymousUser(user)
@@ -112,24 +112,6 @@ public class AccessController
}
data.setACL(acl);
}
- }
-
- /**
- * If there is a user and the user is logged in, doPerform will
- * set the RunData ACL. The list is first sought from the current
- * session, otherwise it is loaded through
- * <code>TurbineSecurity.getACL()</code> and added to the current
- * session.
- *
- * @param data Turbine information.
- * @exception FulcrumSecurityException problem with the security service.
- */
- @Override
- public void doPerform(PipelineData pipelineData)
- throws FulcrumSecurityException
- {
- RunData data = getRunData(pipelineData);
- doPerform(data);
// Comply with Turbine 4.0 standards
pipelineData.get(Turbine.class).put(AccessControlList.class, data.getACL());
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -38,21 +38,6 @@ public class DefaultAction extends Actio
/**
* Execute the action.
*
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @throws Exception a generic exception.
- */
- @Deprecated
- @Override
- public void doPerform(RunData data)
- throws Exception
- {
- data.setMessage(data.getScreen() + " has been executed!");
- }
-
- /**
- * Execute the action.
- *
* @param data Turbine information.
* @throws Exception a generic exception.
*/
@@ -61,7 +46,7 @@ public class DefaultAction extends Actio
throws Exception
{
RunData data = getRunData(pipelineData);
- doPerform(data);
+ data.setMessage(data.getScreen() + " 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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -53,15 +53,14 @@ public class InitContextsAction
* TurbineResources instance (if any) into the data.contexts
* Hashtable.
*
- * @deprecated Use PipelineData version instead.
- * @param data The RunData object for the current request.
+ * @param pipelineData The PipelineRunData object for the current request.
* @exception NamingException could not create InitialContext
*/
- @Deprecated
@Override
- public void doPerform(RunData data)
- throws NamingException
+ public void doPerform(PipelineData pipelineData)
+ throws NamingException
{
+ RunData data = getRunData(pipelineData);
// Context properties are specified in lines in the properties
// file that begin with "context.contextname.", allowing
// multiple named contexts to be used. Everything after the
@@ -87,7 +86,7 @@ public class InitContextsAction
contextProps = new Properties();
}
contextProps.put(key.substring(end + 1),
- conf.getString(key));
+ conf.getString(key));
contextPropsList.put(contextName, contextProps);
}
@@ -97,22 +96,4 @@ public class InitContextsAction
data.getJNDIContexts().put(contextProps.getKey(), context);
}
}
-
- /**
- * This action will place the contexts defined in the
- * TurbineResources instance (if any) into the data.contexts
- * Hashtable.
- *
- * @param pipelineData The PipelineRunData object for the current request.
- * @exception NamingException could not create InitialContext
- */
- @Override
- public void doPerform(PipelineData pipelineData)
- throws NamingException
- {
- RunData data = getRunData(pipelineData);
- doPerform(data);
- }
-
-
}
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -73,14 +73,15 @@ public class LoginUser
* the screenTemplate is set to this, otherwise the screen is set
* to SCREEN_LOGIN
*
- * @param data Turbine information.
+ * @param pipelineData Turbine information.
* @exception FulcrumSecurityException could not get instance of the
* anonymous user
*/
@Override
- public void doPerform(RunData data)
+ public void doPerform(PipelineData pipelineData)
throws FulcrumSecurityException
{
+ RunData data = getRunData(pipelineData);
String username = data.getParameters().getString(CGI_USERNAME, "");
String password = data.getParameters().getString(CGI_PASSWORD, "");
@@ -146,25 +147,4 @@ public class LoginUser
}
}
-
- /**
- * Updates the user's LastLogin timestamp, sets their state to
- * "logged in" and calls RunData.setUser() . If the user cannot
- * be authenticated (database error?) the user is assigned
- * anonymous status and, if tr.props contains a TEMPLATE_LOGIN,
- * the screenTemplate is set to this, otherwise the screen is set
- * to SCREEN_LOGIN
- *
- * @param pipelineData Turbine information.
- * @exception FulcrumSecurityException could not get instance of the
- * anonymous user
- */
- @Override
- public void doPerform(PipelineData pipelineData)
- throws FulcrumSecurityException
- {
- RunData data = getRunData(pipelineData);
- doPerform(data);
- }
-
}
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -50,9 +50,8 @@ public class LogoutUser
@TurbineConfiguration
private Configuration conf;
-
/**
- * Clears the RunData user object back to an anonymous status not
+ * Clears the PipelineData user object back to an anonymous status not
* logged in, and with a null ACL. If the tr.props ACTION_LOGIN
* is anything except "LogoutUser", flow is transfered to the
* SCREEN_HOMEPAGE
@@ -60,21 +59,20 @@ public class LogoutUser
* If this action name is the value of action.logout then we are
* being run before the session validator, so we don't need to
* set the screen (we assume that the session validator will handle
- * that). This is basically still here simply to preserve old behavior
+ * that). This is basically still here simply to preserve old behaviour
* - it is recommended that action.logout is set to "LogoutUser" and
* that the session validator does handle setting the screen/template
* for a logged out (read not-logged-in) user.
*
- * @deprecated Use PipelineData version instead
* @param data Turbine information.
* @exception FulcrumSecurityException a problem occurred in the security
* service.
*/
- @Deprecated
@Override
- public void doPerform(RunData data)
+ public void doPerform(PipelineData pipelineData)
throws FulcrumSecurityException
{
+ RunData data = getRunData(pipelineData);
User user = data.getUser();
if (!security.isAnonymousUser(user))
@@ -108,7 +106,7 @@ public class LogoutUser
// If this action name is the value of action.logout then we are
// being run before the session validator, so we don't need to
// set the screen (we assume that the session validator will handle
- // that). This is basically still here simply to preserve old behaviour
+ // that). This is basically still here simply to preserve old behavior
// - it is recommended that action.logout is set to "LogoutUser" and
// that the session validator does handle setting the screen/template
// for a logged out (read not-logged-in) user.
@@ -119,30 +117,4 @@ public class LogoutUser
data.setScreen(conf.getString(TurbineConstants.SCREEN_HOMEPAGE));
}
}
-
- /**
- * Clears the RunData user object back to an anonymous status not
- * logged in, and with a null ACL. If the tr.props ACTION_LOGIN
- * is anthing except "LogoutUser", flow is transfered to the
- * SCREEN_HOMEPAGE
- *
- * If this action name is the value of action.logout then we are
- * being run before the session validator, so we don't need to
- * set the screen (we assume that the session validator will handle
- * that). This is basically still here simply to preserve old behaviour
- * - it is recommended that action.logout is set to "LogoutUser" and
- * that the session validator does handle setting the screen/template
- * for a logged out (read not-logged-in) user.
- *
- * @param data Turbine information.
- * @exception FulcrumSecurityException a problem occured in the security
- * service.
- */
- @Override
- public void doPerform(PipelineData pipelineData)
- throws FulcrumSecurityException
- {
- RunData data = getRunData(pipelineData);
- doPerform(data);
- }
}
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -23,7 +23,6 @@ import org.apache.turbine.annotation.Tur
import org.apache.turbine.modules.screens.TemplateScreen;
import org.apache.turbine.pipeline.PipelineData;
import org.apache.turbine.services.velocity.VelocityService;
-import org.apache.turbine.util.RunData;
import org.apache.turbine.util.velocity.VelocityActionEvent;
import org.apache.velocity.context.Context;
@@ -45,20 +44,6 @@ public abstract class VelocityAction ext
/**
* You SHOULD NOT override this method and implement it in your action.
*
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @throws Exception a generic exception.
- */
- @Override
- @Deprecated
- public void doPerform(RunData data) throws Exception
- {
- doPerform(data, getContext(data));
- }
-
- /**
- * You SHOULD NOT override this method and implement it in your action.
- *
* @param data Turbine information.
* @throws Exception a generic exception.
*/
@@ -82,62 +67,14 @@ public abstract class VelocityAction ext
/**
* You SHOULD override this method and implement it in your action.
*
- * @deprecated Use PipelineData version instead.
* @param data Turbine information.
* @param context Context for web pages.
* @throws Exception a generic exception.
*/
- @Deprecated
- public abstract void doPerform(RunData data, Context context)
+ public abstract void doPerform(PipelineData pipelineData, Context context)
throws Exception;
/**
- * You SHOULD override this method and implement it in your action.
- *
- * This should become abstract when the RunData version is removed. For
- * compatibility reasons this method will default to using the RunData
- * method unless it is overridden, which it should be.
- *
- * @param data Turbine information.
- * @param context Context for web pages.
- * @throws Exception a generic exception.
- */
- public void doPerform(PipelineData pipelineData, Context context)
- throws Exception
- {
- RunData data = getRunData(pipelineData);
- doPerform(data, context);
- }
-
- /**
- * Sets up the context and then calls super.perform(); thus, subclasses
- * don't have to worry about getting a context themselves! If a subclass
- * throws an exception then depending on whether
- * action.event.bubbleexception is true, then it bubbles it farther up, or
- * traps it there.
- *
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @throws Exception a generic exception.
- */
- @Deprecated
- @Override
- protected void perform(RunData data) throws Exception
- {
- try
- {
- super.perform(data);
- } catch (Exception e)
- {
- if (bubbleUpException)
- {
- throw e;
- }
-
- }
- }
-
- /**
* Sets up the context and then calls super.perform(); thus, subclasses
* don't have to worry about getting a context themselves! If a subclass
* throws an exception then depending on whether
@@ -167,20 +104,6 @@ public abstract class VelocityAction ext
* This method is used when you want to short circuit an Action and change
* the template that will be executed next.
*
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @param template The template that will be executed next.
- */
- @Deprecated
- public void setTemplate(RunData data, String template)
- {
- TemplateScreen.setTemplate(data, template);
- }
-
- /**
- * This method is used when you want to short circuit an Action and change
- * the template that will be executed next.
- *
* @param data Turbine information.
* @param template The template that will be executed next.
*/
@@ -192,19 +115,6 @@ public abstract class VelocityAction ext
/**
* Return the Context needed by Velocity.
*
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @return Context, a context for web pages.
- */
- @Deprecated
- protected Context getContext(RunData data)
- {
- return velocity.getContext(data);
- }
-
- /**
- * Return the Context needed by Velocity.
- *
* @param data Turbine information.
* @return Context, a context for web pages.
*/
@@ -212,5 +122,4 @@ public abstract class VelocityAction ext
{
return velocity.getContext(pipelineData);
}
-
}
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -45,19 +45,6 @@ public abstract class VelocitySecureActi
{
/**
* Implement this to add information to the context.
- *
- * @deprecated Use the PipelineData version instead.
- * @param data Turbine information.
- * @param context Context for web pages.
- * @throws Exception a generic exception.
- */
- @Deprecated
- @Override
- public abstract void doPerform(RunData data, Context context)
- throws Exception;
-
- /**
- * Implement this to add information to the context.
* Should revert to abstract when RunData has gone.
* @param data Turbine information.
* @param context Context for web pages.
@@ -71,25 +58,6 @@ public abstract class VelocitySecureActi
doPerform(data, context);
}
-
- /**
- * This method overrides the method in WebMacroSiteAction to
- * perform a security check first.
- *
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @throws Exception a generic exception.
- */
- @Deprecated
- @Override
- protected void perform(RunData data) throws Exception
- {
- if (isAuthorized(data))
- {
- super.perform(data);
- }
- }
-
/**
* This method overrides the method in WebMacroSiteAction to
* perform a security check first.
@@ -111,28 +79,9 @@ public abstract class VelocitySecureActi
* You should set the template in this method that you want the
* user to be sent to if they're unauthorized.
*
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @return True if the user is authorized to access the screen.
- * @throws Exception a generic exception.
- */
- @Deprecated
- protected abstract boolean isAuthorized(RunData data)
- throws Exception;
-
- /**
- * Implement this method to perform the security check needed.
- * You should set the template in this method that you want the
- * user to be sent to if they're unauthorized.
- * Should revert to abstract when RunData has gone.
* @param data Turbine information.
* @return True if the user is authorized to access the screen.
* @throws Exception a generic exception.
*/
- protected boolean isAuthorized(PipelineData pipelineData)
- throws Exception
- {
- RunData data = getRunData(pipelineData);
- return isAuthorized(data);
- }
+ protected abstract boolean isAuthorized(PipelineData pipelineData) throws Exception;
}
Modified: turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/DefaultSessionValidator.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/DefaultSessionValidator.java?rev=1695634&r1=1695633&r2=1695634&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/DefaultSessionValidator.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/DefaultSessionValidator.java Thu Aug 13 00:35:47 2015
@@ -70,21 +70,20 @@ public class DefaultSessionValidator
private Configuration conf;
/**
- * Execute the action. The default is to populate the RunData
+ * Execute the action. The default is to populate the PipelineData
* object and, if the user is unknown, to force a login screen (as
* set in the tr.props).
*
- * @deprecated Use PipelineData version instead.
* @see org.apache.turbine.modules.screens.error.InvalidState
- * @param data Turbine RunData context information.
+ * @param pipelineData Turbine PipelineData context information.
* @throws Exception The anonymous user could not be obtained
* from the security service
*/
- @Deprecated
@Override
- public void doPerform(RunData data)
+ public void doPerform(PipelineData pipelineData)
throws Exception
{
+ RunData data = getRunData(pipelineData);
// Pull user from session.
data.populate();
@@ -136,24 +135,6 @@ public class DefaultSessionValidator
data.setAction("");
}
}
- }
-
- /**
- * Execute the action. The default is to populate the RunData
- * object and, if the user is unknown, to force a login screen (as
- * set in the tr.props).
- *
- * @see org.apache.turbine.modules.screens.error.InvalidState
- * @param pipelineData Turbine PipelineData context information.
- * @throws Exception The anonymous user could not be obtained
- * from the security service
- */
- @Override
- public void doPerform(PipelineData pipelineData)
- throws Exception
- {
- RunData data = getRunData(pipelineData);
- doPerform(data);
// Comply with Turbine 4.0 standards
pipelineData.get(Turbine.class).put(User.class, data.getUser());
Modified: turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/TemplateSecureSessionValidator.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/TemplateSecureSessionValidator.java?rev=1695634&r1=1695633&r2=1695634&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/TemplateSecureSessionValidator.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/TemplateSecureSessionValidator.java Thu Aug 13 00:35:47 2015
@@ -75,17 +75,17 @@ public class TemplateSecureSessionValida
* methods. For example, it uses <code>setScreenTemplate</code> to
* load the tr.props TEMPLATE_LOGIN instead of the default's
* setScreen to TurbineConstants.SCREEN_LOGIN.
- * @deprecated Use PipelineData version instead.
+ *
* @see DefaultSessionValidator
- * @param data Turbine information.
+ * @param pipelineData Turbine information.
* @throws Exception The anonymous user could not be obtained
* from the security service
*/
- @Deprecated
@Override
- public void doPerform(RunData data)
- throws Exception
+ public void doPerform(PipelineData pipelineData)
+ throws Exception
{
+ RunData data = getRunData(pipelineData);
// Pull user from session.
data.populate();
@@ -98,7 +98,7 @@ public class TemplateSecureSessionValida
data.save();
}
- // This is the secure sessionvalidator, so user must be logged in.
+ // This is the secure session validator, so user must be logged in.
if (!data.getUser().hasLoggedIn())
{
log.debug("User is not logged in!");
@@ -182,26 +182,6 @@ public class TemplateSecureSessionValida
{
data.setScreen(null);
}
- }
-
- /**
- * doPerform is virtually identical to DefaultSessionValidator
- * except that it calls template methods instead of bare screen
- * methods. For example, it uses <code>setScreenTemplate</code> to
- * load the tr.props TEMPLATE_LOGIN instead of the default's
- * setScreen to TurbineConstants.SCREEN_LOGIN.
- *
- * @see DefaultSessionValidator
- * @param pipelineData Turbine information.
- * @throws Exception The anonymous user could not be obtained
- * from the security service
- */
- @Override
- public void doPerform(PipelineData pipelineData)
- throws Exception
- {
- RunData data = getRunData(pipelineData);
- doPerform(data);
// Comply with Turbine 4.0 standards
pipelineData.get(Turbine.class).put(User.class, data.getUser());
Modified: turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/TemplateSessionValidator.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/TemplateSessionValidator.java?rev=1695634&r1=1695633&r2=1695634&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/TemplateSessionValidator.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/modules/actions/sessionvalidator/TemplateSessionValidator.java Thu Aug 13 00:35:47 2015
@@ -66,16 +66,14 @@ public class TemplateSessionValidator
/**
* Execute the action.
*
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
+ * @param pipelineData Turbine information.
* @exception Exception The anonymous user could not be obtained
* from the security service
*/
- @Deprecated
@Override
- public void doPerform(RunData data)
- throws Exception
+ public void doPerform(PipelineData pipelineData) throws Exception
{
+ RunData data = getRunData(pipelineData);
// Pull user from session.
data.populate();
@@ -142,21 +140,6 @@ public class TemplateSessionValidator
{
data.setScreen(null);
}
- }
-
- /**
- * Execute the action.
- *
- * @param pipelineData Turbine information.
- * @exception Exception The anonymous user could not be obtained
- * from the security service
- */
- @Override
- public void doPerform(PipelineData pipelineData)
- throws Exception
- {
- RunData data = getRunData(pipelineData);
- doPerform(data);
// Comply with Turbine 4.0 standards
pipelineData.get(Turbine.class).put(User.class, data.getUser());
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -39,35 +39,18 @@ public class DirectResponseLayout extend
/**
* Ensures that a direct response has been declared.
*
- * @deprecated Use PipelineData version instead.
* @param data Turbine information.
* @exception TurbineException if a direct response has not been declared.
*/
- @Deprecated
@Override
- public void doBuild(RunData data)
- throws Exception
+ public void doBuild(PipelineData pipelineData)
+ throws Exception
{
+ RunData data = getRunData(pipelineData);
if (!data.isOutSet())
{
throw new TurbineException(
"data.declareDirectResponse() has not been called");
}
}
-
- /**
- * Ensures that a direct response has been declared.
- *
- * @param data Turbine information.
- * @exception TurbineException if a direct response has not been declared.
- */
- @Override
- public void doBuild(PipelineData pipelineData)
- throws Exception
- {
- RunData data = getRunData(pipelineData);
- doBuild(data);
- }
-
-
}
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -52,37 +52,6 @@ public class JspLayout
/**
* Method called by LayoutLoader.
*
- * @deprecated Use PipelineData version instead.
- * @param data RunData
- * @throws Exception generic exception
- */
- @Deprecated
- @Override
- public void doBuild(RunData data)
- throws Exception
- {
- data.getResponse().setContentType("text/html");
- data.declareDirectResponse();
-
- // variable to reference the screen in the layout template
- data.getRequest()
- .setAttribute(TurbineConstants.SCREEN_PLACEHOLDER,
- new JspScreenPlaceholder(data));
-
- // variable to reference the navigations in the layout template
- data.getRequest().setAttribute(
- TurbineConstants.NAVIGATION_PLACEHOLDER,
- new JspNavigation(data));
-
- // Grab the layout template set in the TemplatePage.
- String templateName = data.getTemplateInfo().getLayoutTemplate();
-
- jspService.handleRequest(data, prefix + templateName, true);
- }
-
- /**
- * Method called by LayoutLoader.
- *
* @param data PipelineData
* @throws Exception generic exception
*/
@@ -109,5 +78,4 @@ public class JspLayout
jspService.handleRequest(pipelineData, prefix + templateName, true);
}
-
}
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -57,42 +57,6 @@ public class VelocityCachedLayout
/**
* Method called by LayoutLoader.
*
- * @param data Turbine information.
- * @exception Exception a generic exception.
- */
- public void doBuild(RunData data)
- throws Exception
- {
- // Get the context needed by Velocity.
- Context context = velocityService.getContext(data);
-
- // variable for the screen in the layout template
- context.put(TurbineConstants.SCREEN_PLACEHOLDER,
- new TemplateScreen(data));
-
- // variable to reference the navigation screen in the layout template
- context.put(TurbineConstants.NAVIGATION_PLACEHOLDER,
- new TemplateNavigation(data));
-
- // Grab the layout template set in the VelocityPage.
- // If null, then use the default layout template
- // (done by the TemplateInfo object)
- String templateName = data.getTemplateInfo().getLayoutTemplate();
-
- // Set the locale and content type
- data.getResponse().setLocale(data.getLocale());
- data.getResponse().setContentType(data.getContentType());
-
- log.debug("Now trying to render layout " + templateName);
-
- // Finally, generate the layout template and send it to the browser
- velocityService.handleRequest(context,
- prefix + templateName, data.getOut());
- }
-
- /**
- * Method called by LayoutLoader.
- *
*
* @param data PipelineData
* @throws Exception generic exception
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -63,45 +63,6 @@ public class VelocityDirectLayout
/**
* Method called by LayoutLoader.
*
- * @deprecated Use the PipelineData version instead
- * @param data Turbine information.
- * @exception Exception a generic exception.
- */
- @Deprecated
- @Override
- public void doBuild(RunData data)
- throws Exception
- {
- // Get the context needed by Velocity.
- Context context = velocityService.getContext(data);
-
- // variable for the screen in the layout template
- context.put(TurbineConstants.SCREEN_PLACEHOLDER,
- new TemplateScreen(data));
-
- // variable to reference the navigation screen in the layout template
- context.put(TurbineConstants.NAVIGATION_PLACEHOLDER,
- new TemplateNavigation(data));
-
- // Grab the layout template set in the VelocityPage.
- // If null, then use the default layout template
- // (done by the TemplateInfo object)
- String templateName = data.getTemplateInfo().getLayoutTemplate();
-
- // Set the locale and content type
- data.getResponse().setLocale(data.getLocale());
- data.getResponse().setContentType(data.getContentType());
-
- log.debug("Now trying to render layout " + templateName);
-
- // Finally, generate the layout template and send it to the browser
- velocityService.handleRequest(context,
- prefix + templateName, data.getResponse().getOutputStream());
- }
-
- /**
- * Method called by LayoutLoader.
- *
*
* @param data PipelineData
* @throws Exception generic exception
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -88,55 +88,6 @@ public class VelocityOnlyLayout
/**
* Build the layout. Also sets the ContentType and Locale headers
* of the HttpServletResponse object.
- * @deprecated Use PipelineData version
- * @param data Turbine information.
- * @exception Exception a generic exception.
- */
- @Deprecated
- @Override
- public void doBuild(RunData data)
- throws Exception
- {
- // Get the context needed by Velocity.
- Context context = velocityService.getContext(data);
-
- String screenName = data.getScreen();
-
- log.debug("Loading Screen " + screenName);
-
- // First, generate the screen and put it in the context so
- // we can grab it the layout template.
- ConcreteElement results =
- screenLoader.eval(data, screenName);
-
- String returnValue = (results == null) ? "" : results.toString();
-
- // variable for the screen in the layout template
- context.put(TurbineConstants.SCREEN_PLACEHOLDER, returnValue);
-
- // variable to reference the navigation screen in the layout template
- context.put(TurbineConstants.NAVIGATION_PLACEHOLDER,
- new TemplateNavigation(data));
-
- // Grab the layout template set in the VelocityPage.
- // If null, then use the default layout template
- // (done by the TemplateInfo object)
- String templateName = data.getTemplateInfo().getLayoutTemplate();
-
- // Set the locale and content type
- data.getResponse().setLocale(data.getLocale());
- data.getResponse().setContentType(data.getContentType());
-
- log.debug("Now trying to render layout " + templateName);
-
- // Finally, generate the layout template and send it to the browser
- velocityService.handleRequest(context,
- prefix + templateName, data.getResponse().getOutputStream());
- }
-
- /**
- * Build the layout. Also sets the ContentType and Locale headers
- * of the HttpServletResponse object.
*
*
* @param data PipelineData
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -81,59 +81,6 @@ public class VelocityXslLayout extends L
/**
* Build the layout. Also sets the ContentType and Locale headers
* of the HttpServletResponse object.
- * @deprecated Use PipelineData version instead.
- * @param data Turbine information.
- * @exception Exception a generic exception.
- */
- @Deprecated
- @Override
- public void doBuild(RunData data)
- throws Exception
- {
- // Get the context needed by Velocity.
- Context context = velocityService.getContext(data);
-
- data.getResponse().setContentType("text/html");
-
- String screenName = data.getScreen();
-
- log.debug("Loading Screen " + screenName);
-
- // First, generate the screen and put it in the context so
- // we can grab it the layout template.
- ConcreteElement results =
- screenLoader.eval(data, screenName);
-
- String returnValue = (results == null) ? "" : results.toString();
-
- // variable for the screen in the layout template
- context.put(TurbineConstants.SCREEN_PLACEHOLDER, returnValue);
-
- // variable to reference the navigation screen in the layout template
- context.put(TurbineConstants.NAVIGATION_PLACEHOLDER,
- new TemplateNavigation(data));
-
- // Grab the layout template set in the VelocityPage.
- // If null, then use the default layout template
- // (done by the TemplateInfo object)
- String templateName = data.getTemplateInfo().getLayoutTemplate();
-
- log.debug("Now trying to render layout " + templateName);
-
- // Now, generate the layout template.
- String temp = velocityService.handleRequest(context,
- prefix + templateName);
-
- // Finally we do a transformation and send the result
- // back to the browser
- xsltService.transform(
- data.getTemplateInfo().getScreenTemplate(),
- new StringReader(temp), data.getResponse().getWriter());
- }
-
- /**
- * Build the layout. Also sets the ContentType and Locale headers
- * of the HttpServletResponse object.
*
* @param data Turbine information.
* @exception Exception a generic exception.
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=1695634&r1=1695633&r2=1695634&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 Thu Aug 13 00:35:47 2015
@@ -49,20 +49,6 @@ public class BaseJspNavigation
/**
* Method to be overridden by subclasses to include data in beans, etc.
- * @deprecated Use PipelineData version instead.
- * @param data the Rundata object
- * @throws Exception a generic exception.
- */
- @Deprecated
- @Override
- protected void doBuildTemplate(RunData data)
- throws Exception
- {
- // empty
- }
-
- /**
- * Method to be overidden by subclasses to include data in beans, etc.
*
* @param data the PipelineData object
* @throws Exception a generic exception.
@@ -74,29 +60,6 @@ public class BaseJspNavigation
// empty
}
-
-
- /**
- * Method that sets up beans and forward the request to the JSP.
- *
- * @deprecated Use PipelineData version instead.
- * @param data the Rundata object
- * @return null - the JSP sends the information
- * @throws Exception a generic exception.
- */
- @Deprecated
- @Override
- public ConcreteElement buildTemplate(RunData data)
- throws Exception
- {
- // get the name of the JSP we want to use
- String templateName = data.getTemplateInfo().getNavigationTemplate();
-
- // navigations are used by a layout
- jspService.handleRequest(data, prefix + templateName);
- return null;
- }
-
/**
* Method that sets up beans and forward the request to the JSP.
*
@@ -116,6 +79,4 @@ public class BaseJspNavigation
jspService.handleRequest(pipelineData, prefix + templateName);
return null;
}
-
-
}