Class InstallConfigurationImporter


  • public class InstallConfigurationImporter
    extends Object
    Does the grunt work of importing from a configuration file.

    Created by Jeff Gaynor
    on 6/14/24 at 7:25 AM

    • Constructor Detail

      • InstallConfigurationImporter

        public InstallConfigurationImporter​(List setup)
    • Method Detail

      • initSetup

        protected void initSetup​(List setup)
      • initDirs

        public void initDirs​(List dirs)
      • doSetup

        protected void doSetup​(Map map)
      • doSingleDirectoryCase

        protected SingleSourceSet doSingleDirectoryCase​(Map map,
                                                        String type)
        the YAML file may have a single directory or a list of them. This processes the case that the top-level element is just a directory
      • processDirectories

        protected void processDirectories​(SingleSourceSet singleSourceSet,
                                          List dirList,
                                          String type)
        The directories entry contains a list of directories
        Parameters:
        dirList -
      • getBoolean

        public static Boolean getBoolean​(Map map,
                                         String key)
        This grabs the boolean value from a map. Note that this is more complex than it would seem. Boolean.parseBoolean(String) always returns, and if the argument is gibberish, it just returns false. We need the values to be true, false or null (showing unset).
        Parameters:
        map -
        key -
        Returns:
      • getMap

        protected Map getMap​(Map map,
                             String key)
        return the entry of the current configuration map cast to a map
        Parameters:
        key -
        Returns:
      • main

        public static void main​(String[] args)
        Just for testing. Only loads everything into an instance of this object.
        Parameters:
        args -