com.elasticpath.domain.impl
Class PrototypeBeanFactory

java.lang.Object
  extended by com.elasticpath.domain.impl.PrototypeBeanFactory

public class PrototypeBeanFactory
extends java.lang.Object

This is a factory to generate prototype bean instances for domain object. This constructor is package-level since only the ElasticPathImpl should know about this class. The life cycle of this object is controlled by ElasticPathImpl which is a singleton, so there is no need to make this class a singeton, also. addBeanDefinitionPrivate may be called; ie, from test classes so that we can return different domain objects for tests.


Method Summary
 void addBeanDefinition(java.lang.String beanName, java.lang.String beanClassName)
          Add override bean definitions.
 java.lang.Object getBean(java.lang.String beanName)
          Create and return a prototype of a bean with the specified bean name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addBeanDefinition

public void addBeanDefinition(java.lang.String beanName,
                              java.lang.String beanClassName)
Add override bean definitions.

Parameters:
beanName - bean name.
beanClassName - string class name.

getBean

public java.lang.Object getBean(java.lang.String beanName)
Create and return a prototype of a bean with the specified bean name.

Parameters:
beanName - the bean name.
Returns:
a prototype of a bean with the specified bean name