Class ModuleUtiltiy


  • public class ModuleUtiltiy
    extends Object
    This class implements different utilities related to modules
    • Constructor Detail

      • ModuleUtiltiy

        public ModuleUtiltiy()
    • Method Detail

      • orderByDependency

        public static List<String> orderByDependency​(List<String> modules)
                                              throws Exception
        It receives an ArrayList<String> with modules IDs and returns the same list ordered taking into account the module dependency tree.

        Note that the module list must be a complete list of modules, no dependencies will be checked for more than one level of deep, this means that passing an incomplete list might not be ordered correctly.

        Parameters:
        modules - List of module to order
        Returns:
        modules list ordered
        Throws:
        Exception
      • orderModuleByDependency

        public static void orderModuleByDependency​(FieldProvider[] modules)
                                            throws Exception
        Modifies the passed modules FieldProvider parameter ordering it taking into account dependencies.
        Parameters:
        modules - FieldProvider that will be sorted. It must contain at least a field named adModuleId
        Throws:
        Exception
      • getSystemMaturityLevels

        public static HashMap<String,​String> getSystemMaturityLevels​(boolean install)
        Obtains the global minimum maturity levels defined for module installation and update. For installation these 2 values might be different, for update both values are set with the MaturityUpdate, this makes new modules installed because of needed dependencies in scan for updates not to be in a lower level than the update one.
        Parameters:
        install -
        • true: Module installation
        • false: Module update
        Returns:
        HashMap with install.level and update.level keys.