Package org.faktorips.runtime.internal
Class AbstractClassLoadingRuntimeRepository
java.lang.Object
org.faktorips.runtime.internal.AbstractRuntimeRepository
org.faktorips.runtime.internal.AbstractCachingRuntimeRepository
org.faktorips.runtime.internal.AbstractTocBasedRuntimeRepository
org.faktorips.runtime.internal.AbstractXmlInputStreamRepository
org.faktorips.runtime.internal.AbstractClassLoadingRuntimeRepository
- All Implemented Interfaces:
IRuntimeRepository
- Direct Known Subclasses:
ClassloaderRuntimeRepository,DetachedContentRuntimeRepository
public abstract class AbstractClassLoadingRuntimeRepository
extends AbstractXmlInputStreamRepository
An abstract repository that handles the common stuff between the
AbstractXmlInputStreamRepository and the concrete runtime repositories. This abstract
layer is responsible for loading the classes and instantiates the objects. The content of the
objects - the concrete data - is provided by the concrete implementation.- Author:
- dirmeier
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractClassLoadingRuntimeRepository(String name, ICacheFactory cacheFactory, ClassLoader cl) -
Method Summary
Modifier and TypeMethodDescriptionprotected <T extends IProductComponent>
voidgetAllProductComponentsInternal(Class<T> productCmptClass, List<T> result) Override the default implementation for better performance.Returns the class loader that is used to load Java classes by this repository.protected abstract StringThis method returns the name of the product component generation implementation class identified by the tocEntry.protected InputStreamgetXmlAsStream(TocEntry tocEntry) Returns the XML data for the specifiedTocEntryasInputStreamMethods inherited from class org.faktorips.runtime.internal.AbstractXmlInputStreamRepository
createCustomObject, createEnumValues, createProductCmpt, createProductCmptGeneration, createProductComponentGenerationInstance, createProductComponentInstance, createTable, createTestCase, getDocumentElement, getDocumentElement, getDocumentElement, getDocumentElement, getProductVariantHelper, getXmlAsStream, getXmlAsStreamMethods inherited from class org.faktorips.runtime.internal.AbstractTocBasedRuntimeRepository
createEnumXmlAdapter, getAllEnumClasses, getAllIpsTestCases, getAllModelTypeImplementationClasses, getAllProductComponentIds, getAllProductComponents, getAllProductComponents, getAllTables, getClass, getIpsTestCaseInternal, getIpsTestCasesStartingWith, getLatestProductComponentGenerationInternal, getNextProductComponentGenerationInternal, getNotCachedCustomObject, getNotCachedEnumValues, getNotCachedEnumXmlAdapter, getNotCachedProductComponent, getNotCachedProductComponentGeneration, getNotCachedTable, getNumberOfProductComponentGenerationsInternal, getPreviousProductComponentGenerationInternal, getProductComponentGenerationInternal, getProductComponentGenerations, getProductComponentInternal, getTableInternal, getTableOfContents, initialize, loadTableOfContentsMethods inherited from class org.faktorips.runtime.internal.AbstractCachingRuntimeRepository
getAllInternalEnumXmlAdapters, getCustomRuntimeObjectInternal, getEnumDescription, getEnumValuesInternal, getProductComponentGenerationInternal, getProductComponentInternal, getTableInternal, initCachesMethods inherited from class org.faktorips.runtime.internal.AbstractRuntimeRepository
addAllEnumXmlAdapters, addDirectlyReferencedRepository, addEnumValueLookupService, getAllEnumClasses, getAllIpsTestCases, getAllModelTypeImplementationClasses, getAllProductComponentIds, getAllProductComponents, getAllProductComponents, getAllProductComponents, getAllReferencedRepositories, getAllTables, getCustomRuntimeObject, getDirectlyReferencedRepositories, getEnumValue, getEnumValue, getEnumValueLookupService, getEnumValues, getEnumValuesDefinedInType, getExistingEnumValue, getExistingProductComponent, getExistingProductComponentGeneration, getFormulaEvaluatorFactory, getIpsTest, getIpsTest, getIpsTestCase, getIpsTestCase, getIpsTestCasesStartingWith, getIpsTestSuite, getIpsTestSuite, getLatestProductComponentGeneration, getModelType, getModelType, getModelType, getName, getNextProductComponentGeneration, getNumberOfProductComponentGenerations, getPreviousProductComponentGeneration, getProductComponent, getProductComponent, getProductComponentGeneration, getProductComponentGenerations, getRuntimeRepositoryLookup, getTable, getTable, newJAXBContext, newJAXBContext, removeEnumValueLookupService, setFormulaEvaluatorFactory, setRuntimeRepositoryLookup, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.faktorips.runtime.IRuntimeRepository
isModifiable
-
Constructor Details
-
AbstractClassLoadingRuntimeRepository
public AbstractClassLoadingRuntimeRepository(String name, ICacheFactory cacheFactory, ClassLoader cl) - Parameters:
name- The name of the runtime repositorycacheFactory- the cache factory used by this runtime repositorycl- theClassLoaderused to load the classes
-
-
Method Details
-
getAllProductComponentsInternal
protected <T extends IProductComponent> void getAllProductComponentsInternal(Class<T> productCmptClass, List<T> result) Override the default implementation for better performance. The default implementation instantiates all product component before using the class filter. In this implementation we use the information in the toc to filter the list of product components before instantiation.- Overrides:
getAllProductComponentsInternalin classAbstractRuntimeRepository- Parameters:
productCmptClass- The class you want to search product components forresult- adding the found product components to result list
-
getClassLoader
Description copied from class:AbstractRuntimeRepositoryReturns the class loader that is used to load Java classes by this repository.This default implementation returns the class loader with which this repository class has been loaded.
- Specified by:
getClassLoaderin interfaceIRuntimeRepository- Overrides:
getClassLoaderin classAbstractRuntimeRepository
-
getXmlAsStream
Description copied from class:AbstractXmlInputStreamRepositoryReturns the XML data for the specifiedTocEntryasInputStream- Specified by:
getXmlAsStreamin classAbstractXmlInputStreamRepository- Parameters:
tocEntry- Specifying the requested ips object- Returns:
- An InputStream containing the XML data - should not return null!
-
getProductComponentGenerationImplClass
This method returns the name of the product component generation implementation class identified by the tocEntry. This could either be an implementation class using the formula evaluation or an implementation class containing the compiled formulas.
-