Class ModuleResolverImpl

    • Field Detail

      • pepperImporterComponentFactory

        protected org.osgi.service.component.ComponentFactory pepperImporterComponentFactory
        This unnecessary variable must be initialized, because of restrictions of the maven osgi scr plugin. Here it is not possible to use a list as osgi-reference. (this is a workaround)
      • pepperImporterComponentFactories

        protected List<org.osgi.service.component.ComponentFactory> pepperImporterComponentFactories
        TODO make docu
      • pepperManipulatorComponentFactory

        protected org.osgi.service.component.ComponentFactory pepperManipulatorComponentFactory
        This unnecessary variable must be initialized, because of restrictions of the maven osgi scr plugin. Here it is not possible to use a list as osgi-reference. (this is a workaround)
      • pepperManipulatorComponentFactories

        protected List<org.osgi.service.component.ComponentFactory> pepperManipulatorComponentFactories
        TODO make docu
      • pepperExporterComponentFactory

        protected org.osgi.service.component.ComponentFactory pepperExporterComponentFactory
        This unnecessary variable must be initialized, because of restrictions of the maven osgi scr plugin. Here it is not possible to use a list as osgi-reference. (this is a workaround)
      • pepperExporterComponentFactories

        protected List<org.osgi.service.component.ComponentFactory> pepperExporterComponentFactories
        TODO make docu
      • PROP_OSGI_BUNDLES

        public static final String PROP_OSGI_BUNDLES
        name of system property to determine the locations of OSGi bundles
        See Also:
        Constant Field Values
    • Constructor Detail

      • ModuleResolverImpl

        public ModuleResolverImpl()
        TODO make docu
    • Method Detail

      • getComponentContext

        public org.osgi.service.component.ComponentContext getComponentContext()
        Returns the ComponentContext of the OSGi environment the bundle was started in.
        Specified by:
        getComponentContext in interface ModuleResolver
        Returns:
      • activate

        public void activate​(org.osgi.service.component.ComponentContext componentContext)
        Sets the ComponentContext of the OSGi environment the bundle was started in.
        Specified by:
        activate in interface ModuleResolver
      • addPepperImporterComponentFactory

        public void addPepperImporterComponentFactory​(org.osgi.service.component.ComponentFactory pepperImporterComponentFactory)
        This method is called by OSGi framework and adds all registered ComponentFactory objects having the name PepperImporterComponentFactory to this object. All ComponentFactory objects are stored in an internal object #pepperImporterComponentFactories
        Specified by:
        addPepperImporterComponentFactory in interface ModuleResolver
      • removePepperImporterComponentFactory

        public void removePepperImporterComponentFactory​(org.osgi.service.component.ComponentFactory pepperImporterComponentFactory)
        TODO make docu
        Specified by:
        removePepperImporterComponentFactory in interface ModuleResolver
      • addPepperManipulatorComponentFactory

        public void addPepperManipulatorComponentFactory​(org.osgi.service.component.ComponentFactory pepperManipulatorComponentFactory)
        This method is called by OSGi framework and adds all registered ComponentFactory objects having the name PepperManipulatorComponentFactory to this object. All ComponentFactory objects are stored in an internal object #pepperManipulatorComponentFactories.
        Specified by:
        addPepperManipulatorComponentFactory in interface ModuleResolver
      • removePepperManipulatorComponentFactory

        public void removePepperManipulatorComponentFactory​(org.osgi.service.component.ComponentFactory pepperManipulatorComponentFactory)
        TODO make docu
        Specified by:
        removePepperManipulatorComponentFactory in interface ModuleResolver
      • addPepperExporterComponentFactory

        public void addPepperExporterComponentFactory​(org.osgi.service.component.ComponentFactory pepperExporterComponentFactory)
        This method is called by OSGi framework and adds all registered ComponentFactory objects having the name PepperExporterComponentFactory to this object. All ComponentFactory objects are stored in the internal object list #pepperExporterComponentFactories.
        Specified by:
        addPepperExporterComponentFactory in interface ModuleResolver
        Parameters:
        pepperExporterComponentFactory - ComponentFactory object to be stored in internal list
      • removePepperExporterComponentFactory

        public void removePepperExporterComponentFactory​(org.osgi.service.component.ComponentFactory pepperExporterComponentFactory)
        TODO make some docu
        Specified by:
        removePepperExporterComponentFactory in interface ModuleResolver
      • retrieveResourcePathFromBundle

        protected String retrieveResourcePathFromBundle​(PepperModule module)
        Retrieves the path, where the bundle is located and extracts the path, where resources are estimated
        Returns:
      • setTemporaries

        protected void setTemporaries​(PepperModule module,
                                      int number)
        Sets a temporary folder for each PepperModule to store temporary files if necessary. The general temporary folder could either be given via the property PepperConfiguration.PROP_TEMP_FOLDER or if this is not set, resolved by via using the temporary folder provided by the OS.
        The specific temporary folder is given by the general temporary folder + a subfolder for the modules name and a subfolder for the number of the instance of the current module.
        Parameters:
        module - - the object for setting temporaries
        number - - number of module instance
      • getPepperImporters

        public List<PepperImporter> getPepperImporters()
        Creates an instance of PepperImporter for each listed ComponentFactory in list #pepperImporterComponentFactories and returns that list. This PepperModuleResolver instance does not store any link to the created object, so it can be used and removed as the caller like. Thus each call creates a new list containing new objects.
        Specified by:
        getPepperImporters in interface ModuleResolver
        Returns:
        a list of PepperImporter objects.
      • getPepperManipulators

        public List<PepperManipulator> getPepperManipulators()
        Creates an instance of PepperManipulator for each listed ComponentFactory in list #pepperManipulatorComponentFactories and returns that list. This PepperModuleResolver instance does not store any link to the created object, so it can be used and removed as the caller like. Thus each call creates a new list containing new objects.
        Specified by:
        getPepperManipulators in interface ModuleResolver
        Returns:
        a list of PepperManipulator objects.
      • getPepperExporters

        public List<PepperExporter> getPepperExporters()
        Creates an instance of PepperExporter for each listed ComponentFactory in list #pepperExporterComponentFactories and returns that list. This PepperModuleResolver instance does not store any link to the created object, so it can be used and removed as the caller like. Thus each call creates a new list containing new objects.
        Specified by:
        getPepperExporters in interface ModuleResolver
        Returns:
        a list of PepperExporter objects.
      • getPepperImporter

        public PepperImporter getPepperImporter​(StepDesc stepDesc)
        Returns a PepperImporter object matching to the given ImporterParams. A new instance of the specific PepperImporter class is created and returned. No references to the returned object will be stored in this PepperModuleResolver object. When calling #getPepperImporter(ImporterParams) a new instance of PepperImporter is created.
        Specified by:
        getPepperImporter in interface ModuleResolver
        Returns:
        a new instance of PepperImporter matching the given ImporterParams
      • getPepperManipulator

        public PepperManipulator getPepperManipulator​(StepDesc stepDesc)
        Creates an instance of PepperManipulator for each listed ComponentFactory in list #pepperManipulatorComponentFactories and returns that list. This PepperModuleResolver instance does not store any link to the created object, so it can be used and removed as the caller like. Thus each call creates a new list containing new objects.
        Specified by:
        getPepperManipulator in interface ModuleResolver
        Returns:
        a list of PepperManipulator objects.
      • getPepperExporter

        public PepperExporter getPepperExporter​(StepDesc stepDesc)
        Creates an instance of PepperExporter for each listed ComponentFactory in list #pepperExporterComponentFactories and returns that list. This PepperModuleResolver instance does not store any link to the created object, so it can be used and removed as the caller like. Thus each call creates a new list containing new objects.
        Specified by:
        getPepperExporter in interface ModuleResolver
        Returns:
        a list of PepperExporter objects.