Class 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 Details

    • AbstractClassLoadingRuntimeRepository

      public AbstractClassLoadingRuntimeRepository(String name, ICacheFactory cacheFactory, ClassLoader cl)
      Parameters:
      name - The name of the runtime repository
      cacheFactory - the cache factory used by this runtime repository
      cl - the ClassLoader used 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:
      getAllProductComponentsInternal in class AbstractRuntimeRepository
      Parameters:
      productCmptClass - The class you want to search product components for
      result - adding the found product components to result list
    • getClassLoader

      public ClassLoader getClassLoader()
      Description copied from class: AbstractRuntimeRepository
      Returns 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:
      getClassLoader in interface IRuntimeRepository
      Overrides:
      getClassLoader in class AbstractRuntimeRepository
    • getXmlAsStream

      protected InputStream getXmlAsStream(TocEntry tocEntry)
      Description copied from class: AbstractXmlInputStreamRepository
      Returns the XML data for the specified TocEntry as InputStream
      Specified by:
      getXmlAsStream in class AbstractXmlInputStreamRepository
      Parameters:
      tocEntry - Specifying the requested ips object
      Returns:
      An InputStream containing the XML data - should not return null!
    • getProductComponentGenerationImplClass

      protected abstract String getProductComponentGenerationImplClass(GenerationTocEntry tocEntry)
      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.