Interface ModuleManager
- 
 public interface ModuleManagerManages how modules are installed, restarted, and removed from Ignition
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddModuleObserver(ModuleObserver observer)Register aModuleObserverthat gets notified when modules are added.DemoCountdownStategetDemoCountdownState()Returns what kind of demo state the system is currently in with relation to which modules are installed, which are licensed, and which are in demo mode.java.util.List<GatewayModule>getGatewayModules()Returns a list of all modules that have Gateway-scope hooksjava.util.UUIDgetMenuVersion()GatewayModulegetModule(java.lang.String id)Finds a module with the given id string.intgetModuleCount()The total count of modules currently installedjava.util.List<GatewayModule>getModules()Returns a list of all modulesScopeVersionHashgetVersionHash(int scope)Retrieve the current hash for a given scope.voidinstallModule(java.lang.String filename, byte[] bytes)Installs a new module.voidinstallModule(java.lang.String filename, java.io.File tempModuleLocation)Installs a new module.voidremoveModuleObserver(ModuleObserver observer)Remove a previously registeredModuleObserver.java.lang.Class<?>resolveClass(java.lang.String className)Loops through each module's classloader, giving it a chance to resolve the given class.voidrestartModule(java.lang.String moduleId)Restarts the given module.voiduninstallModule(java.lang.String moduleId)Uninstalls the given module.voidupdateMenuVersion()Call this as a hint to let the system know that the config or status menu may have changed.
 
- 
- 
- 
Method Detail- 
getGatewayModulesjava.util.List<GatewayModule> getGatewayModules() Returns a list of all modules that have Gateway-scope hooks
 - 
getModuleCountint getModuleCount() The total count of modules currently installed
 - 
getModulesjava.util.List<GatewayModule> getModules() Returns a list of all modules
 - 
getModuleGatewayModule getModule(java.lang.String id) Finds a module with the given id string. Case sensitive. Will return null if the module is not found.
 - 
resolveClassjava.lang.Class<?> resolveClass(java.lang.String className) Loops through each module's classloader, giving it a chance to resolve the given class.
 - 
getVersionHashScopeVersionHash getVersionHash(int scope) Retrieve the current hash for a given scope.- See Also:
- ApplicationScope
 
 - 
getMenuVersionjava.util.UUID getMenuVersion() - Returns:
- a UUID representing the state of the config and status menus. This UUID will change when it's possible that the menu has been updated, either when a gateway-scope module has changed or somebody calls
 
 - 
updateMenuVersionvoid updateMenuVersion() Call this as a hint to let the system know that the config or status menu may have changed. Modules whose return value fromGatewayModuleHook.getConfigPanels()orGatewayModuleHook.getStatusPanels()has changed should call this method.
 - 
uninstallModulevoid uninstallModule(java.lang.String moduleId) throws java.lang.ExceptionUninstalls the given module. Any dependent modules will be restarted afterwards.- Throws:
- java.lang.Exception
 
 - 
restartModulevoid restartModule(java.lang.String moduleId) throws java.lang.ExceptionRestarts the given module. Any dependent modules will first be shut down, and then restarted afterwards.- Throws:
- java.lang.Exception
 
 - 
installModulevoid installModule(java.lang.String filename, byte[] bytes) throws java.lang.ExceptionInstalls a new module.- Parameters:
- filename- The desired filename for the new module, like "MyModule.modl"
- bytes- The *.modl file, as a byte array.
- Throws:
- java.lang.Exception- if anything went wrong attempting to decode or install the module
 
 - 
installModulevoid installModule(java.lang.String filename, java.io.File tempModuleLocation) throws java.lang.ExceptionInstalls a new module.- Parameters:
- filename- The desired filename for the new module, like "MyModule.modl"
- tempModuleLocation- The *.modl file, as a file located in a temp directory.
- Throws:
- java.lang.Exception- if anything went wrong attempting to decode or install the module
 
 - 
addModuleObservervoid addModuleObserver(ModuleObserver observer) Register aModuleObserverthat gets notified when modules are added.- Parameters:
- observer- The observer to register.
 
 - 
removeModuleObservervoid removeModuleObserver(ModuleObserver observer) Remove a previously registeredModuleObserver.- Parameters:
- observer- The observer to unregister.
 
 - 
getDemoCountdownStateDemoCountdownState getDemoCountdownState() Returns what kind of demo state the system is currently in with relation to which modules are installed, which are licensed, and which are in demo mode.
 
- 
 
-