org.objectweb.fractal.aokell.lib.factory
Class GenericFactoryImpl

java.lang.Object
  extended by org.objectweb.fractal.aokell.lib.factory.GenericFactoryImpl
All Implemented Interfaces:
GenericFactory

public class GenericFactoryImpl
extends Object
implements GenericFactory

The implementation of the generic factory.

Author:
Lionel Seinturier

Field Summary
static String GEN_FACT_IMPL
          The property name which defines the implementation class for the generic factory.
 
Constructor Summary
GenericFactoryImpl()
           
 
Method Summary
protected  void checkFcContentClassforBC(Type type, Class contentClass)
          Check that the content class implements the BindingController interface if at least one client interface is defined in its type.
protected  void checkFcContentClassImplementsServerInterfaces(Type type, Class contentClass)
          Check that the content class implements the server interfaces defined in the type.
protected  void checkFcContentDesc(Type type, Object controllerDesc, Object contentDesc)
          Check that the value given for the content description is legal.
protected  void checkFcControllerDesc(Object controllerDesc)
          Check that the given value is a legal controller description.
protected  void checkFcType(Type type, Object controllerDesc)
          Check that the value given for the type is legal.
static GenericFactoryImpl get()
           
protected  Object newFcContent(Type type, Object controllerDesc, Object contentDesc)
          Instantiate the content part of a component.
 Component newFcInstance(Type type, Object controllerDesc, Object contentDesc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GEN_FACT_IMPL

public static final String GEN_FACT_IMPL
The property name which defines the implementation class for the generic factory. The value must be a sub-class of the GenericFactoryImpl. The default value is GenericFactoryImpl.

See Also:
Constant Field Values
Constructor Detail

GenericFactoryImpl

public GenericFactoryImpl()
Method Detail

get

public static GenericFactoryImpl get()

newFcInstance

public Component newFcInstance(Type type,
                               Object controllerDesc,
                               Object contentDesc)
                        throws InstantiationException
Specified by:
newFcInstance in interface GenericFactory
Throws:
InstantiationException

newFcContent

protected Object newFcContent(Type type,
                              Object controllerDesc,
                              Object contentDesc)
                       throws InstantiationException
Instantiate the content part of a component.

Throws:
InstantiationException

checkFcType

protected void checkFcType(Type type,
                           Object controllerDesc)
                    throws InstantiationException
Check that the value given for the type is legal.

Throws:
InstantiationException

checkFcControllerDesc

protected void checkFcControllerDesc(Object controllerDesc)
                              throws InstantiationException
Check that the given value is a legal controller description.

Throws:
InstantiationException

checkFcContentDesc

protected void checkFcContentDesc(Type type,
                                  Object controllerDesc,
                                  Object contentDesc)
                           throws InstantiationException
Check that the value given for the content description is legal.

Throws:
InstantiationException

checkFcContentClassImplementsServerInterfaces

protected void checkFcContentClassImplementsServerInterfaces(Type type,
                                                             Class contentClass)
                                                      throws InstantiationException
Check that the content class implements the server interfaces defined in the type.

Throws:
InstantiationException

checkFcContentClassforBC

protected void checkFcContentClassforBC(Type type,
                                        Class contentClass)
                                 throws InstantiationException
Check that the content class implements the BindingController interface if at least one client interface is defined in its type.

Throws:
InstantiationException