Commits

Joe Xie  committed 55999f2

CONF-27294 : remove the ability to perform an action command

  • Participants
  • Parent commits 3d4ad6d
  • Branches CONF-27294, xwork_1-0-3 1
    1. xwork_1-0-3_branch

Comments (0)

Files changed (1)

File src/java/com/opensymphony/xwork/DefaultActionProxyFactory.java

     * Use this method to build an DefaultActionProxy instance.
     */
     public ActionProxy createActionProxy(String namespace, String actionName, Map extraContext) throws Exception {
-        setupConfigIfActionIsCommand(namespace, actionName);
-
         return new DefaultActionProxy(namespace, actionName, extraContext, true);
     }
 
     * Use this method to build an DefaultActionProxy instance.
     */
     public ActionProxy createActionProxy(String namespace, String actionName, Map extraContext, boolean executeResult) throws Exception {
-        setupConfigIfActionIsCommand(namespace, actionName);
-
         return new DefaultActionProxy(namespace, actionName, extraContext, executeResult);
     }
-
-    private void setupConfigIfActionIsCommand(String namespace, String actionName) {
-        if (ConfigurationManager.getConfiguration().getRuntimeConfiguration().getActionConfig(namespace, actionName) != null) {
-            return;
-        }
-
-        int bang = actionName.indexOf('!');
-
-        if (bang != -1) {
-            String realAction = actionName.substring(0, bang);
-            String command = actionName.substring(bang + 1);
-
-            ActionConfig actionConfig = ConfigurationManager.getConfiguration().getRuntimeConfiguration().getActionConfig(namespace, realAction);
-            ActionConfig newConfig = new ActionConfig(command, actionConfig.getClassName(), actionConfig.getParams(), actionConfig.getResults(), actionConfig.getInterceptors(), actionConfig.getExternalRefs(), actionConfig.getPackageName());
-
-            ConfigurationManager.getConfiguration().getPackageConfig(newConfig.getPackageName()).addActionConfig(actionName, newConfig);
-            ConfigurationManager.getConfiguration().rebuildRuntimeConfiguration();
-        }
-    }
 }