Class ModuleDependencyGraph
- java.lang.Object
-
- com.inductiveautomation.ignition.common.modules.ModuleDependencyGraph
-
public class ModuleDependencyGraph extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ModuleDependencyGraph(java.util.List<ModuleInfo> modules, int scope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModuleDependencyGraph
detectVersionMismatch(java.lang.String sourceModule)
Inspects all module dependencies for any whose versions are wrong, and throws a DependencyVersionMismatchException if any are found.java.util.List<ModuleInfo>
findDependentModules(java.lang.String moduleId)
Find a list of the modules that depend on the given module, directly or indirectly.java.util.List<ModuleInfo>
findRequiredModules(java.lang.String moduleId)
Find a list of the modules that given module requires, directly or indirectly.java.util.List<ModuleInfo>
getInTopologicalOrder()
java.util.Collection<java.lang.String>
getMissingDependencies(java.lang.String moduleId)
Returns a collection of missing dependencies of this module or any of its present dependencies, or empty collection if nothing is missing.
-
-
-
Constructor Detail
-
ModuleDependencyGraph
public ModuleDependencyGraph(java.util.List<ModuleInfo> modules, int scope) throws DependencyCycleException
- Throws:
DependencyCycleException
-
-
Method Detail
-
getMissingDependencies
public java.util.Collection<java.lang.String> getMissingDependencies(java.lang.String moduleId)
Returns a collection of missing dependencies of this module or any of its present dependencies, or empty collection if nothing is missing.
-
detectVersionMismatch
public ModuleDependencyGraph detectVersionMismatch(java.lang.String sourceModule) throws DependencyVersionMismatchException
Inspects all module dependencies for any whose versions are wrong, and throws a DependencyVersionMismatchException if any are found.- Returns:
- this for chained invocation style
- Throws:
DependencyVersionMismatchException
-
findDependentModules
public java.util.List<ModuleInfo> findDependentModules(java.lang.String moduleId)
Find a list of the modules that depend on the given module, directly or indirectly. Order will be "topological", meaning that any module in the list may depend on modules that came before it, but not after.
-
findRequiredModules
public java.util.List<ModuleInfo> findRequiredModules(java.lang.String moduleId)
Find a list of the modules that given module requires, directly or indirectly. Order will be "topological", meaning that any module in the list may depend on modules that came before it, but not after.
-
getInTopologicalOrder
public java.util.List<ModuleInfo> getInTopologicalOrder()
- Returns:
- A list of all modules in topological order, meaning that any module in the list may depend on modules that came before it, but not after.
-
-