Author: lukaszlenart
Date: Thu Dec 13 07:24:06 2012
New Revision: 1421096

URL: http://svn.apache.org/viewvc?rev=1421096&view=rev
Log:
WW-3943 adds support for REST plugin

Modified:
    struts/struts2/trunk/apps/rest-showcase/pom.xml
    
struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ActionNamesAction.java
    
struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ListValidatorsAction.java
    
struts/struts2/trunk/plugins/config-browser/src/main/resources/struts-plugin.xml

Modified: struts/struts2/trunk/apps/rest-showcase/pom.xml
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/apps/rest-showcase/pom.xml?rev=1421096&r1=1421095&r2=1421096&view=diff
==============================================================================
--- struts/struts2/trunk/apps/rest-showcase/pom.xml (original)
+++ struts/struts2/trunk/apps/rest-showcase/pom.xml Thu Dec 13 07:24:06 2012
@@ -48,6 +48,11 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.struts</groupId>
+            <artifactId>struts2-config-browser-plugin</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>

Modified: 
struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ActionNamesAction.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ActionNamesAction.java?rev=1421096&r1=1421095&r2=1421096&view=diff
==============================================================================
--- 
struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ActionNamesAction.java
 (original)
+++ 
struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ActionNamesAction.java
 Thu Dec 13 07:24:06 2012
@@ -95,4 +95,19 @@ public class ActionNamesAction extends A
         actionNames = new 
TreeSet<String>(configHelper.getActionNames(namespace));
         return SUCCESS;
     }
+
+    /**
+     * Index action to support cooperation with REST plugin
+     *
+     * @return action result
+     * @throws Exception
+     */
+    public String index() throws Exception {
+        return execute();
+    }
+
+    public String redirect() {
+        return SUCCESS;
+    }
+
 }

Modified: 
struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ListValidatorsAction.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ListValidatorsAction.java?rev=1421096&r1=1421095&r2=1421096&view=diff
==============================================================================
--- 
struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ListValidatorsAction.java
 (original)
+++ 
struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ListValidatorsAction.java
 Thu Dec 13 07:24:06 2012
@@ -83,6 +83,16 @@ public class ListValidatorsAction extend
         return super.execute();
     }
 
+    /**
+     * Index action to support cooperation with REST plugin
+     *
+     * @return action result
+     * @throws Exception
+     */
+    public String index() throws Exception {
+        return execute();
+    }
+
     protected void loadValidators() {
         Class value = getClassInstance();
         if ( value != null ) {

Modified: 
struts/struts2/trunk/plugins/config-browser/src/main/resources/struts-plugin.xml
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/resources/struts-plugin.xml?rev=1421096&r1=1421095&r2=1421096&view=diff
==============================================================================
--- 
struts/struts2/trunk/plugins/config-browser/src/main/resources/struts-plugin.xml
 (original)
+++ 
struts/struts2/trunk/plugins/config-browser/src/main/resources/struts-plugin.xml
 Thu Dec 13 07:24:06 2012
@@ -42,7 +42,7 @@
             <result name="input" 
type="freemarker">/config-browser/error.ftl</result>
         </global-results>
 
-        <action name="index">
+        <action name="index" 
class="org.apache.struts2.config_browser.ActionNamesAction" method="redirect">
             <result type="redirectAction">actionNames</result>
         </action>
 


Reply via email to