}
private ModuleMetaData populateModuleMetaData(AxisModule axisModule) {
ModuleMetaData moduleMetaData = new ModuleMetaData();
String moduleVersion = "";
if (axisModule.getVersion() != null) {
moduleVersion = axisModule.getVersion().toString();
}
moduleMetaData.setModulename(axisModule.getName());
moduleMetaData.setModuleVersion(moduleVersion);
moduleMetaData.setModuleId(getModuleId(axisModule.getName(), axisModule.getVersion()));
moduleMetaData.setEngagedGlobalLevel(axisConfig.isEngaged(axisModule));
//Some moduels like caching, throtteling use "globallyEngaged" parameter, to engage themself globally without
//affecting the admin services
Parameter param = axisModule.getParameter(GLOBALLY_ENGAGED_PARAM_NAME);
if (param != null) {
String globallyEngaged = (String) param.getValue();
if (globallyEngaged != null && globallyEngaged.length() != 0
&& Boolean.parseBoolean(globallyEngaged.trim())) {
moduleMetaData.setEngagedGlobalLevel(true);
}
}
// Set whether this is a system managed module, like throtelling, caching
moduleMetaData.setManagedModule(SystemFilter.isManagedModule(axisModule));
String description = axisModule.getModuleDescription();
//TODO this logic needs to go in to UI
if (description != null) {
moduleMetaData.setDescription(description);
} else {
moduleMetaData.setDescription("No description found");
}
return moduleMetaData;
}