public void moduleContentsModified(ModuleChangeEvent event) {
Set<String> modified = getModifiedModules(event);
if (!modified.isEmpty()) {
ModuleManagementFacade factory = WebServletUtils.getModuleManagementFacade(servletContext);
ApplicationManager applicationManager = factory.getApplicationManager();
Application application = applicationManager.getCurrentApplication();
for (String moduleName : modified) {
logger.info("Processing modified module " + moduleName);
ModuleOperation operation = factory.getModuleOperationRegistry().getOperation(ModuleOperationConstants.ReloadNamedModuleOperation);
ModuleOperationInput moduleOperationInput = new ModuleOperationInput(null, null, moduleName);
operation.execute(application, moduleOperationInput);
}
}