Class DetachedContentRuntimeRepositoryManager.Builder
java.lang.Object
org.faktorips.runtime.productdataprovider.DetachedContentRuntimeRepositoryManager.Builder
- Enclosing class:
- DetachedContentRuntimeRepositoryManager
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder(IProductDataProviderFactory productDataProviderFactory) The only mandatory parameter is theIProductDataProviderFactory. -
Method Summary
Modifier and TypeMethodDescriptionbuild()This method builds aDetachedContentRuntimeRepositoryManager.setCacheFactory(ICacheFactory cacheFactory) Optionally you could specify aICacheFactoryto use your own cache implementation.setClassLoader(ClassLoader classLoader) TheClassLoaderto instantiate the classes.setFormulaEvaluatorFactory(IFormulaEvaluatorFactory formulaEvaluatorFactory) An optionalIFormulaEvaluatorFactoryto createIFormulaEvaluators.setRepositoryName(String name) The optional repository name.
-
Constructor Details
-
Builder
The only mandatory parameter is theIProductDataProviderFactory. It is used to create theIProductDataProviders.- Parameters:
productDataProviderFactory- The builder to createIProductDataProviders
-
-
Method Details
-
setRepositoryName
The optional repository name. If you do not specify a name the blankString"" is used- Parameters:
name- the name of the repositories
-
setClassLoader
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
Optionally you could specify aICacheFactoryto use your own cache implementation. If you do not set aICacheFactorytheDefaultCacheFactoryis used.- Parameters:
cacheFactory- The cacheFactory to set.
-
build
This method builds aDetachedContentRuntimeRepositoryManager. All the values set in the builder are used to create the manager and theDetachedContentRuntimeRepositorys- Returns:
- The created
DetachedContentRuntimeRepositoryManager
-