Author: husted Date: Sun Sep 24 18:28:48 2006 New Revision: 449541 URL: http://svn.apache.org/viewvc?view=rev&rev=449541 Log: Catch a few legacy -> integration stragglers.
Modified: struts/struts2/trunk/apps/showcase/src/main/resources/struts-integration.xml struts/struts2/trunk/integration/pom.xml struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/ActionFormResetInterceptor.java struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/ActionFormValidationInterceptor.java struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/WrapperActionMapping.java struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/WrapperModuleConfig.java Modified: struts/struts2/trunk/apps/showcase/src/main/resources/struts-integration.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/resources/struts-integration.xml?view=diff&rev=449541&r1=449540&r2=449541 ============================================================================== --- struts/struts2/trunk/apps/showcase/src/main/resources/struts-integration.xml (original) +++ struts/struts2/trunk/apps/showcase/src/main/resources/struts-integration.xml Sun Sep 24 18:28:48 2006 @@ -27,13 +27,13 @@ <default-action-ref name="editGangster" /> <!-- Diplay entry page that uses Model-Driven technique --> - <action name="editGangster" class="org.apache.struts2.s1.LegacyAction"> + <action name="editGangster" class="org.apache.struts2.s1.Struts1Action"> <param name="className">org.apache.struts2.showcase.integration.EditGangsterAction</param> <result>modelDriven.jsp</result> </action> <!-- Display the result page whose content is populated using the Model-Driven technique --> - <action name="saveGangster" class="org.apache.struts2.s1.LegacyAction"> + <action name="saveGangster" class="org.apache.struts2.s1.Struts1Action"> <param name="className">org.apache.struts2.showcase.integration.SaveGangsterAction</param> <param name="validate">true</param> <result name="input">modelDriven.jsp</result> Modified: struts/struts2/trunk/integration/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/integration/pom.xml?view=diff&rev=449541&r1=449540&r2=449541 ============================================================================== --- struts/struts2/trunk/integration/pom.xml (original) +++ struts/struts2/trunk/integration/pom.xml Sun Sep 24 18:28:48 2006 @@ -10,12 +10,12 @@ <groupId>org.apache.struts</groupId> <artifactId>struts2-integration</artifactId> <packaging>jar</packaging> - <name>Struts Legacy</name> + <name>Struts 2 Integration</name> <distributionManagement> <site> <id>apache-site</id> - <url>scp://people.apache.org/www/struts.apache.org/2.x/struts-legacy</url> + <url>scp://people.apache.org/www/struts.apache.org/2.x/struts-integration</url> </site> </distributionManagement> Modified: struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/ActionFormResetInterceptor.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/ActionFormResetInterceptor.java?view=diff&rev=449541&r1=449540&r2=449541 ============================================================================== --- struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/ActionFormResetInterceptor.java (original) +++ struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/ActionFormResetInterceptor.java Sun Sep 24 18:28:48 2006 @@ -42,7 +42,7 @@ ScopedModelDriven modelDriven = (ScopedModelDriven) action; Object model = modelDriven.getModel(); if (model != null && model instanceof ActionForm) { - StrutsFactory factory = new StrutsFactory(Dispatcher.getInstance().getConfigurationManager().getConfiguration()); + Struts1Factory factory = new Struts1Factory(Dispatcher.getInstance().getConfigurationManager().getConfiguration()); ActionMapping mapping = factory.createActionMapping(invocation.getProxy().getConfig()); HttpServletRequest req = ServletActionContext.getRequest(); ((ActionForm)model).reset(mapping, req); Modified: struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/ActionFormValidationInterceptor.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/ActionFormValidationInterceptor.java?view=diff&rev=449541&r1=449540&r2=449541 ============================================================================== --- struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/ActionFormValidationInterceptor.java (original) +++ struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/ActionFormValidationInterceptor.java Sun Sep 24 18:28:48 2006 @@ -33,7 +33,7 @@ /** * Calls the validate() method on the ActionForm, if it exists. The errors are handled * like regular XWork validation errors. Action-level validation flag supported if the - * action is a subclass of LegacyAction. + * action is a subclass of Struts1Action. */ public class ActionFormValidationInterceptor extends AbstractInterceptor { @@ -43,11 +43,11 @@ if ((action instanceof ScopedModelDriven) && - (!(action instanceof LegacyAction) || ((LegacyAction)action).isValidate())) { + (!(action instanceof Struts1Action) || ((Struts1Action)action).isValidate())) { ScopedModelDriven modelDriven = (ScopedModelDriven) action; Object model = modelDriven.getModel(); if (model != null) { - StrutsFactory strutsFactory = new StrutsFactory(Dispatcher.getInstance().getConfigurationManager().getConfiguration()); + Struts1Factory strutsFactory = new Struts1Factory(Dispatcher.getInstance().getConfigurationManager().getConfiguration()); ActionMapping mapping = strutsFactory.createActionMapping(invocation.getProxy().getConfig()); HttpServletRequest req = ServletActionContext.getRequest(); ActionErrors errors = ((ActionForm)model).validate(mapping, req); Modified: struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/WrapperActionMapping.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/WrapperActionMapping.java?view=diff&rev=449541&r1=449540&r2=449541 ============================================================================== --- struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/WrapperActionMapping.java (original) +++ struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/WrapperActionMapping.java Sun Sep 24 18:28:48 2006 @@ -39,16 +39,16 @@ private ActionConfig delegate; private String actionPath; - private StrutsFactory strutsFactory; + private Struts1Factory strutsFactory; - public WrapperActionMapping(StrutsFactory factory, ActionConfig delegate) { + public WrapperActionMapping(Struts1Factory factory, ActionConfig delegate) { this.delegate = delegate; this.strutsFactory = factory; forwards = null; exceptions = null; } - public WrapperActionMapping(StrutsFactory factory, ActionConfig delegate, String actionPath, ModuleConfig moduleConfig) { + public WrapperActionMapping(Struts1Factory factory, ActionConfig delegate, String actionPath, ModuleConfig moduleConfig) { this(factory, delegate); this.moduleConfig = moduleConfig; this.actionPath = actionPath; Modified: struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/WrapperModuleConfig.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/WrapperModuleConfig.java?view=diff&rev=449541&r1=449540&r2=449541 ============================================================================== --- struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/WrapperModuleConfig.java (original) +++ struts/struts2/trunk/integration/src/main/java/org/apache/struts2/s1/WrapperModuleConfig.java Sun Sep 24 18:28:48 2006 @@ -40,13 +40,13 @@ */ class WrapperModuleConfig implements ModuleConfig { - private StrutsFactory strutsFactory; + private Struts1Factory strutsFactory; private PackageConfig delegate; private Map _actionMappings; private Map _exceptionConfigs; private Map _actionForwards; - public WrapperModuleConfig(StrutsFactory factory, PackageConfig config) { + public WrapperModuleConfig(Struts1Factory factory, PackageConfig config) { delegate = config; this.strutsFactory = factory; }