Class DetachedContentRuntimeRepositoryManager.Builder
- java.lang.Object
-
- org.faktorips.runtime.productdataprovider.DetachedContentRuntimeRepositoryManager.Builder
-
- Enclosing class:
- DetachedContentRuntimeRepositoryManager
public static class DetachedContentRuntimeRepositoryManager.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder(IProductDataProviderFactory productDataProviderFactory)The only mandatory parameter is theIProductDataProviderFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IRuntimeRepositoryManagerbuild()This method builds aDetachedContentRuntimeRepositoryManager.DetachedContentRuntimeRepositoryManager.BuildersetCacheFactory(ICacheFactory cacheFactory)Optionally you could specify aICacheFactoryto use your own cache implementation.DetachedContentRuntimeRepositoryManager.BuildersetClassLoader(java.lang.ClassLoader classLoader)TheClassLoaderto instantiate the classes.DetachedContentRuntimeRepositoryManager.BuildersetFormulaEvaluatorFactory(IFormulaEvaluatorFactory formulaEvaluatorFactory)An optionalIFormulaEvaluatorFactoryto createIFormulaEvaluators.DetachedContentRuntimeRepositoryManager.BuildersetRepositoryName(java.lang.String name)The optional repository name.
-
-
-
Constructor Detail
-
Builder
public Builder(IProductDataProviderFactory productDataProviderFactory)
The only mandatory parameter is theIProductDataProviderFactory. It is used to create theIProductDataProviders.- Parameters:
productDataProviderFactory- The builder to createIProductDataProviders
-
-
Method Detail
-
setRepositoryName
public DetachedContentRuntimeRepositoryManager.Builder setRepositoryName(java.lang.String name)
The optional repository name. If you do not specify a name the blankString"" is used- Parameters:
name- the name of the repositories
-
setClassLoader
public DetachedContentRuntimeRepositoryManager.Builder setClassLoader(java.lang.ClassLoader classLoader)
TheClassLoaderto instantiate the classes. If you do not specify aClassLoadertheThread.getContextClassLoader()ofThread.currentThread()is used.- Parameters:
classLoader- TheClassLoaderto instantiate the classes
-
setFormulaEvaluatorFactory
public DetachedContentRuntimeRepositoryManager.Builder setFormulaEvaluatorFactory(IFormulaEvaluatorFactory formulaEvaluatorFactory)
An optionalIFormulaEvaluatorFactoryto createIFormulaEvaluators. If you do not set theIFormulaEvaluatorFactorythe repository tries to load the generated subclasses of product components containing the compiled formula. This would not work if you want to change product data while application is running.- Parameters:
formulaEvaluatorFactory-IFormulaEvaluatorFactoryto createIFormulaEvaluators
-
setCacheFactory
public DetachedContentRuntimeRepositoryManager.Builder setCacheFactory(ICacheFactory cacheFactory)
Optionally you could specify aICacheFactoryto use your own cache implementation. If you do not set aICacheFactorytheDefaultCacheFactoryis used.- Parameters:
cacheFactory- The cacheFactory to set.
-
build
public IRuntimeRepositoryManager build()
This method builds aDetachedContentRuntimeRepositoryManager. All the values set in the builder are used to create the manager and theDetachedContentRuntimeRepositorys- Returns:
- The created
DetachedContentRuntimeRepositoryManager
-
-