key = moduleID + sep + DeploymentStatus.MODULE_TYPE;
status.addProperty(key, String.valueOf(moduleType.getValue())); //moduleType
}
//sub modules
Application app = request.getDescriptor();
if (app!=null) {
if (!app.isVirtual()) {
int counter = 0;
for (Iterator it = app.getModules(); it.hasNext();) {
ModuleDescriptor md = (ModuleDescriptor) it.next();
key = moduleID + sep +
DeploymentStatus.MODULE_ID + sep +
String.valueOf(counter);
String subModuleID = moduleID + "#" + md.getArchiveUri();
status.addProperty(key, subModuleID); //subModuleID
if( XModuleType.isExtensionModule(md.getModuleType())) {
key = subModuleID + sep + DeploymentStatus.XMODULE_TYPE;
} else {
key = subModuleID + sep + DeploymentStatus.MODULE_TYPE;
}
//subModuleType
status.addProperty(key, String.valueOf(md.getModuleType().getValue()));
if (ModuleType.WAR.equals(md.getModuleType())) {
WebBundleDescriptor wbd =
(WebBundleDescriptor) md.getDescriptor();
key = subModuleID + sep + DeploymentStatus.CONTEXT_ROOT;
status.addProperty(key, getContextRoot(wbd)); //contextRoot
}
counter++;
}
key = moduleID + sep + DeploymentStatus.SUBMODULE_COUNT;
status.addProperty(key, String.valueOf(counter)); //nums
} else { //standalone module
BundleDescriptor bd = app.getStandaloneBundleDescriptor();
if (ModuleType.WAR.equals(bd.getModuleType())) {
WebBundleDescriptor wbd = (WebBundleDescriptor) bd;
key = moduleID + sep + DeploymentStatus.CONTEXT_ROOT;
status.addProperty(key, getContextRoot(wbd)); //contextRoot
}