org.olat.core.gui.control.creator
Class AutoCreator

java.lang.Object
  extended by org.olat.core.gui.control.creator.AutoCreator
All Implemented Interfaces:
ControllerCreator
Direct Known Subclasses:
FactoryControllerCreator, StatisticAutoCreator

public class AutoCreator
extends java.lang.Object
implements ControllerCreator

Description:
This class automatically creates a controller when needed. the classname of the controller to be created is set via the className setter. The controller to be created must have a constructor with the signature (UserRequest, WindowControl) This class uses reflection and is a convenience class for creating controllers which need no additional arguments besides the two standard arguments UserRequest and WindowControl. example usage in spring:

 <property name="onSuccessControllerCreator">
   <bean class="org.olat.core.gui.control.creator.AutoCreator">
     <property name="className" value="ch.goodsolutions.demo.DemoMainController"/>
   </bean>
 </property>
 

Initial Date: 16.01.2007

Author:
Felix Jost, http://www.goodsolutions.ch

Constructor Summary
AutoCreator()
           
 
Method Summary
 Controller createController(UserRequest ureq, WindowControl wControl)
           
 java.lang.String getClassName()
           
 void setClassName(java.lang.String className)
          [used by spring]
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoCreator

public AutoCreator()
Method Detail

createController

public Controller createController(UserRequest ureq,
                                   WindowControl wControl)
Specified by:
createController in interface ControllerCreator

setClassName

public void setClassName(java.lang.String className)
[used by spring]

Parameters:
className -

getClassName

public java.lang.String getClassName()
Returns:
Returns the className of the Controller which is created