com.sourceforge.jpatterns.core.configuration
Class PropertiesBasedFactory

java.lang.Object
  extended by com.sourceforge.jpatterns.core.configuration.PropertiesBasedFactory

public class PropertiesBasedFactory
extends Object

This factory uses the PropertiesManagerImpl to instantiate the instances of the particular classes are based on the properties definitions. The properties based configuration is done only for the "core" initial components allows us to implement the "factory" pattern. After it the JPatterns framework would use this implemented factory for instantiating all the stuff we would use to imlement other patterns.
This is singleton - there is no sense to have several instances of this class $Author:: zmicer $
$Rev:: 67 $
* $Date:: 2007-08-28 21:37:07 #$
$Date:: 2007-08-28 21:37:07 #$

Version:
1.0

Field Summary
static org.apache.log4j.Logger LOG
          Logger instance.
 
Method Summary
 void cleanImplementations()
          Set all the values of implementations to null.
static PropertiesBasedFactory getInstance()
           
 IJPatternsConfigBeansBuilder getJPatternsConfigBaseBeanBuilder()
           
 IJPConfigurator getJPConfigurator()
           
 IPropertiesManager getPropertiesManager()
           
 IJPFactory instantiateFactory()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.log4j.Logger LOG
Logger instance.

Method Detail

getInstance

public static PropertiesBasedFactory getInstance()
Returns:
the singleton instance of the factory.

getPropertiesManager

public IPropertiesManager getPropertiesManager()
Returns:
the singleton instance of the IPropertiesManager implementation

getJPConfigurator

public IJPConfigurator getJPConfigurator()
                                  throws JPInitializationException
Returns:
the instance of IJPConfigurator defined at the properties file.
Throws:
JPInitializationException - in the case IJPConfigurator instance can not be instantiated

getJPatternsConfigBaseBeanBuilder

public IJPatternsConfigBeansBuilder getJPatternsConfigBaseBeanBuilder()
                                                               throws JPInitializationException
Returns:
the instance of IJPatternsConfigBeansBuilder defined at the properties file.
Throws:
JPInitializationException - in the case IJPatternsConfigBeansBuilder instance can not be instantiated

cleanImplementations

public void cleanImplementations()
Set all the values of implementations to null.


instantiateFactory

public IJPFactory instantiateFactory()
Returns:
the new instance of the IJPFactory


Copyright © 2007 jzmicer.team. All Rights Reserved.