public String execute() throws Exception { super.execute(); config = ConfigurationHelper.getActionConfig(namespace, actionName); actionNames = new TreeSet(ConfigurationHelper.getActionNames(namespace)); try { Class clazz = ObjectFactory.getObjectFactory().getClassInstance(getConfig().getClassName()); java.util.Collection pds = OgnlRuntime.getPropertyDescriptors(clazz).values(); properties = (PropertyDescriptor[]) pds.toArray(PDSAT); } catch (Exception e) { log.error("Unable to get properties for action " + actionName, e); addActionError("Unable to retrieve action properties: " + e.toString()); } if (hasErrors()) //super might have set some :) return ERROR; else return SUCCESS; } }
if ( existing != null ) LOG.error( "An action with the specified name already exists in the '" + packageConfig.getName() + "' package: " + name + "; " + existing.getClassName() ); else addAction( actionElement, packageConfig );
if ( !StringUtils.equals( expectedAction.clazz, xwActionConfig.getClassName() ) ) " but got " + quote( xwActionConfig.getClassName() ) + " instead, on action " + quote( expectedAction.name ) + " in package " + quote( expectedPackage.name ) + "." );
Class clazz = ObjectFactory.getObjectFactory().getClassInstance(actionConfig.getClassName()); addParameter("actionClass", clazz); } catch (ClassNotFoundException e) {
public TransientActionConfig( String originalActionName, ActionConfig originalAction, Plugin defaultPlugin ) { super( originalAction.getMethodName(), originalAction.getClassName(), cloneMap( originalAction.getParams() ), cloneMap( originalAction.getResults() ), cloneList( originalAction.getInterceptors() ), cloneList( originalAction.getExternalRefs() ), originalAction.getPackageName(), findPlugin( originalAction, defaultPlugin ) ); this.originalActionName = originalActionName; plugin = super.getPlugin(); }
if ( actionConfig instanceof PluginAwareActionConfig ) { Plugin plugin = ( (PluginAwareActionConfig) actionConfig ).getPlugin(); newConfig = new PluginAwareActionConfig( name.getMethodName(), actionConfig.getClassName(), actionConfig.getParams(), actionConfig.getResults(), actionConfig.getInterceptors(), actionConfig.getExternalRefs(), actionConfig.getPackageName(), plugin ); } else if ( actionConfig != null ) { newConfig = new ActionConfig( name.getMethodName(), actionConfig.getClassName(), actionConfig.getParams(), actionConfig.getResults(), actionConfig.getInterceptors(), actionConfig.getExternalRefs(), actionConfig.getPackageName() ); } else { throw new XworkException( "Unable to find action named '" + name.getActionName() + "' in the '" + namespace + "' namespace." );