import com.opensymphony.xwork.interceptor.Interceptor;
/**
- * Replacement for WebWorkSpringObjectFactory ("webwork.objectFactory = spring") to support
- * plexus components lookup as expected by plexus-xwork integration.
+ * Replacement for WebWorkSpringObjectFactory ("webwork.objectFactory = spring")
+ * to support plexus components lookup as expected by plexus-xwork integration.
*
* @author <a href="mailto:nicolas@apache.org">Nicolas De Loof</a>
*/
}
return super.buildBean( name, map );
}
+
+ public Class getClassInstance( String className )
+ throws ClassNotFoundException
+ {
+ String id = PlexusToSpringUtils.buildSpringId( Action.class, className );
+ if ( appContext.containsBean( id ) )
+ {
+ return appContext.getType( id );
+ }
+
+ id = PlexusToSpringUtils.buildSpringId( Result.class, className );
+ if ( appContext.containsBean( id ) )
+ {
+ return appContext.getType( id );
+ }
+
+ id = PlexusToSpringUtils.buildSpringId( Interceptor.class, className );
+ if ( appContext.containsBean( id ) )
+ {
+ return appContext.getType( id );
+ }
+ return super.getClassInstance( className );
+ }
}