// Determine the child modules of the configuration
//TODO might be a hack
List kids = loadChildren(kernel, moduleID.toString());
// Build a response object containing the started configuration and a list of it's contained modules
TargetModuleIDImpl id = new TargetModuleIDImpl(modules[i].getTarget(), module.getModuleID(),
(String[]) kids.toArray(new String[kids.size()]));
if (isWebApp(kernel, moduleID.toString())) {
id.setType(ModuleType.WAR);
}
if (id.getChildTargetModuleID() != null) {
for (int k = 0; k < id.getChildTargetModuleID().length; k++) {
TargetModuleIDImpl child = (TargetModuleIDImpl) id.getChildTargetModuleID()[k];
if (isWebApp(kernel, child.getModuleID())) {
child.setType(ModuleType.WAR);
}
}
}
addModule(id);
java.util.Iterator iterator = lcresult.getStarted().iterator();
while (iterator.hasNext()) {
Artifact config = (Artifact)iterator.next();
if (!config.toString().equals(id.getModuleID())) {
//TODO might be a hack
List kidsChild = loadChildren(kernel, config.toString());
// Build a response object containing the started configuration and a list of it's contained modules
TargetModuleIDImpl idChild = new TargetModuleIDImpl(null, config.toString(),
(String[]) kidsChild.toArray(new String[kidsChild.size()]));
if (isWebApp(kernel, config.toString())) {
idChild.setType(ModuleType.WAR);
}
if (idChild.getChildTargetModuleID() != null) {
for (int k = 0; k < idChild.getChildTargetModuleID().length; k++) {
TargetModuleIDImpl child = (TargetModuleIDImpl) idChild.getChildTargetModuleID()[k];
if (isWebApp(kernel, child.getModuleID())) {
child.setType(ModuleType.WAR);
}
}
}
addModule(idChild);
}