Class PluginDirectoryService


  • @Service
    public class PluginDirectoryService
    extends java.lang.Object
    Service to handle plugin directory related service functionality.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2018 Created on Apr 15, 2018
    • Constructor Detail

      • PluginDirectoryService

        public PluginDirectoryService​(LocalStorage localStorage)
    • Method Detail

      • createPluginDir

        public void createPluginDir()
        Ensure that the plugin directory exists. If it is not yet created, do so.
      • installExtractedPlugin

        public void installExtractedPlugin​(java.lang.String tempPluginFolder)
                                    throws javax.xml.bind.JAXBException,
                                           java.io.IOException
        Install the plugin that was extracted to the tempPluginFolder into the appropriate plugin folder.
        Parameters:
        tempPluginFolder - temp directory containing the extracted plugin
        Throws:
        javax.xml.bind.JAXBException - failed to parse the plugin.xml
        java.io.IOException - failed to copy the plugin jar
      • updatePluginProperties

        public void updatePluginProperties​(java.util.List<java.lang.String> basePackages)
                                    throws java.io.IOException
        Add or update the plugin properties base packages.
        Parameters:
        basePackages - list of base packages that should be added.
        Throws:
        java.io.IOException
      • getPluginType

        private EPluginType getPluginType​(java.lang.String tempDirPath)
                                   throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException