org.faktorips.runtime.productdataprovider
Class DetachedContentRuntimeRepositoryManager.Builder

java.lang.Object
  extended by org.faktorips.runtime.productdataprovider.DetachedContentRuntimeRepositoryManager.Builder
Enclosing class:
DetachedContentRuntimeRepositoryManager

public static class DetachedContentRuntimeRepositoryManager.Builder
extends Object


Constructor Summary
DetachedContentRuntimeRepositoryManager.Builder(IProductDataProviderFactory productDataProviderFactory)
          The only mandatory parameter is the IProductDataProviderFactory.
 
Method Summary
 IRuntimeRepositoryManager build()
          This method builds a DetachedContentRuntimeRepositoryManager.
 DetachedContentRuntimeRepositoryManager.Builder setCacheFactory(ICacheFactory cacheFactory)
          Optionally you could specify a ICacheFactory to use your own cache implementation.
 DetachedContentRuntimeRepositoryManager.Builder setClassLoader(ClassLoader classLoader)
          The ClassLoader to instantiate the classes.
 DetachedContentRuntimeRepositoryManager.Builder setFormulaEvaluatorFactory(IFormulaEvaluatorFactory formulaEvaluatorFactory)
          An optional IFormulaEvaluatorFactory to create IFormulaEvaluators.
 DetachedContentRuntimeRepositoryManager.Builder setRepositoryName(String name)
          The optional repository name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DetachedContentRuntimeRepositoryManager.Builder

public DetachedContentRuntimeRepositoryManager.Builder(IProductDataProviderFactory productDataProviderFactory)
The only mandatory parameter is the IProductDataProviderFactory. It is used to create the IProductDataProviders.

Parameters:
productDataProviderFactory - The builder to create IProductDataProviders
Method Detail

setRepositoryName

public DetachedContentRuntimeRepositoryManager.Builder setRepositoryName(String name)
The optional repository name. If you do not specify a name the blank String "" is used

Parameters:
name - the name of the repositories

setClassLoader

public DetachedContentRuntimeRepositoryManager.Builder setClassLoader(ClassLoader classLoader)
The ClassLoader to instantiate the classes. If you do not specify a ClassLoader the Thread.getContextClassLoader() of Thread.currentThread() is used.

Parameters:
classLoader - The ClassLoader to instantiate the classes

setFormulaEvaluatorFactory

public DetachedContentRuntimeRepositoryManager.Builder setFormulaEvaluatorFactory(IFormulaEvaluatorFactory formulaEvaluatorFactory)
An optional IFormulaEvaluatorFactory to create IFormulaEvaluators. If you do not set the IFormulaEvaluatorFactory the 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 - IFormulaEvaluatorFactory to create IFormulaEvaluators

setCacheFactory

public DetachedContentRuntimeRepositoryManager.Builder setCacheFactory(ICacheFactory cacheFactory)
Optionally you could specify a ICacheFactory to use your own cache implementation. If you do not set a ICacheFactory the DefaultCacheFactory is used.

Parameters:
cacheFactory - The cacheFactory to set.

build

public IRuntimeRepositoryManager build()
This method builds a DetachedContentRuntimeRepositoryManager. All the values set in the builder are used to create the manager and the DetachedContentRuntimeRepositorys

Returns:
The created DetachedContentRuntimeRepositoryManager


Copyright © 2015. All rights reserved.