Package org.openbravo.erpCommon.modules
Class ModuleUtiltiy
- java.lang.Object
-
- org.openbravo.erpCommon.modules.ModuleUtiltiy
-
public class ModuleUtiltiy extends Object
This class implements different utilities related to modules
-
-
Field Summary
Fields Modifier and Type Field Description static String
APRM_MODULE
protected static org.apache.logging.log4j.Logger
log4j
static String
TEMPLATE_30
-
Constructor Summary
Constructors Constructor Description ModuleUtiltiy()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static HashMap<String,String>
getSystemMaturityLevels(boolean install)
Obtains the global minimum maturity levels defined for module installation and update.static List<String>
orderByDependency(List<String> modules)
It receives an ArrayList<String> with modules IDs and returns the same list ordered taking into account the module dependency tree.static ArrayList<String>
orderByDependency(ConnectionProvider conn, ArrayList<String> modules)
Deprecated.static void
orderModuleByDependency(FieldProvider[] modules)
Modifies the passed modulesFieldProvider
parameter ordering it taking into account dependencies.static void
orderModuleByDependency(ConnectionProvider pool, FieldProvider[] modules)
Deprecated.
-
-
-
Field Detail
-
log4j
protected static org.apache.logging.log4j.Logger log4j
-
TEMPLATE_30
public static final String TEMPLATE_30
- See Also:
- Constant Field Values
-
APRM_MODULE
public static final String APRM_MODULE
- See Also:
- Constant Field Values
-
-
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
-
orderByDependency
@Deprecated public static ArrayList<String> orderByDependency(ConnectionProvider conn, ArrayList<String> modules)
Deprecated.Deprecated useorderByDependency(List)
instead- Parameters:
conn
-modules
-
-
orderModuleByDependency
public static void orderModuleByDependency(FieldProvider[] modules) throws Exception
Modifies the passed modulesFieldProvider
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
-
orderModuleByDependency
@Deprecated public static void orderModuleByDependency(ConnectionProvider pool, FieldProvider[] modules)
Deprecated.Deprecated, use insteadorderModuleByDependency(FieldProvider[])
- Parameters:
pool
-modules
-
-
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 installationfalse
: Module update
- Returns:
- HashMap with install.level and update.level keys.
-
-