org.deduced.controller.implementation
Class DefaultControllerFactory

java.lang.Object
  extended by org.deduced.controller.implementation.AbstractControllerFactory
      extended by org.deduced.controller.implementation.DefaultControllerFactory
All Implemented Interfaces:
ControllerFactory

public class DefaultControllerFactory
extends AbstractControllerFactory

Default Controller Factory

Author:
Steve McDuff

Field Summary
private  java.util.Map<PropertyCollection<?,?>,java.lang.Class<?>> controllerCreationMap
          the map between the type of collection to control and the class of the controller to use
private  java.util.Map<PropertyCollection<?,?>,java.lang.Class<?>> listControllerCreationMap
          the map between the list type of collection to control and the class of the controller to use
 
Constructor Summary
DefaultControllerFactory()
          DefaultControllerFactory Constructor
 
Method Summary
 void addControllerType(java.lang.Class<?> controllerClass, PropertyCollection<?,?> modelType)
          match a controller class type to a controlled collection type
 void addListControllerType(java.lang.Class<?> controllerClass, PropertyCollection<?,?> modelType)
          match a list controller class type to a controlled collection type
 PropertyCollectionController createController(PropertyCollection<?,?> model)
          (non-Javadoc)
 PropertyCollectionController createListController(PropertyCollection<?,?> model, PropertyCollection<?,?> typeInList)
          create a List Controller
 PropertyController createPropertyController(PropertyCollection<?,?> model, java.lang.Object key)
          (non-Javadoc)
 
Methods inherited from class org.deduced.controller.implementation.AbstractControllerFactory
getControlLayer, initializeControlLayer, initializeListController, initializePropertyCollectionController, initializePropertyController, isAddRemoveAvailableOnModel, setControlLayer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

controllerCreationMap

private java.util.Map<PropertyCollection<?,?>,java.lang.Class<?>> controllerCreationMap
the map between the type of collection to control and the class of the controller to use


listControllerCreationMap

private java.util.Map<PropertyCollection<?,?>,java.lang.Class<?>> listControllerCreationMap
the map between the list type of collection to control and the class of the controller to use

Constructor Detail

DefaultControllerFactory

public DefaultControllerFactory()
DefaultControllerFactory Constructor

Method Detail

createPropertyController

public PropertyController createPropertyController(PropertyCollection<?,?> model,
                                                   java.lang.Object key)
(non-Javadoc)

Parameters:
model - the model to control
key - the key to control
Returns:
the created property controller
See Also:
ControllerFactory.createPropertyController(org.deduced.PropertyCollection, java.lang.Object)

createController

public PropertyCollectionController createController(PropertyCollection<?,?> model)
(non-Javadoc)

Parameters:
model - the model to control
Returns:
the created controller
See Also:
ControllerFactory.createController(org.deduced.PropertyCollection)

createListController

public PropertyCollectionController createListController(PropertyCollection<?,?> model,
                                                         PropertyCollection<?,?> typeInList)
create a List Controller

Parameters:
model - the model to control
typeInList - the type of model in the list
Returns:
the created controller

addControllerType

public void addControllerType(java.lang.Class<?> controllerClass,
                              PropertyCollection<?,?> modelType)
match a controller class type to a controlled collection type

Parameters:
controllerClass - the controller class to match
modelType - the controlled model type to associate

addListControllerType

public void addListControllerType(java.lang.Class<?> controllerClass,
                                  PropertyCollection<?,?> modelType)
match a list controller class type to a controlled collection type

Parameters:
controllerClass - the controller class to match
modelType - the controlled model type in the list to associate