Class AdaptTemplatesCommand

  • All Implemented Interfaces:
    Callable<Integer>

    public class AdaptTemplatesCommand
    extends Object
    implements Callable<Integer>
    This class handles the user defined template directory e.g. determining and obtaining the latest templates jar, unpacking the sources and compiled classes and storing the custom location path in a configuration file
    • Constructor Detail

      • AdaptTemplatesCommand

        public AdaptTemplatesCommand()
    • Method Detail

      • processJar

        public static void processJar​(Path destinationPath)
                               throws IOException
        Unpacks the source CobiGen_Templates Jar and creates a new CobiGen_Templates folder structure at $destinationPath/CobiGen_Templates location
        Parameters:
        destinationPath - path to be used as target directory
        Throws:
        IOException - if no destination path could be set
      • deleteDirectoryRecursively

        public static void deleteDirectoryRecursively​(Path pathToBeDeleted)
                                               throws IOException
        Deletes a directory and its sub directories recursively
        Parameters:
        pathToBeDeleted - the directory which should be deleted recursively
        Throws:
        IOException - if the file could not be deleted