return;
}
List moduleDetails = new ArrayList();
ConfigurationManager configManager = ConfigurationUtil.getConfigurationManager(kernel);
DependencyManager depMgr = kernel.getDependencyManager();
List infos = configManager.listConfigurations();
for (Iterator j = infos.iterator(); j.hasNext();) {
ConfigurationInfo info = (ConfigurationInfo) j.next();
if (shouldListConfig(info)) {
ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());
if (info.getType().getValue()== ConfigurationModuleType.WAR.getValue()){
WebModule webModule = (WebModule) PortletManager.getModule(renderRequest, info.getConfigID());
if (webModule != null) {
details.setContextPath(webModule.getContextPath());
details.setUrlFor(webModule.getURLFor());
}
}
try {
AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
boolean flag = false;
// Check if the configuration is loaded. If not, load it to get information.
if(!kernel.isLoaded(configObjName)) {
flag = true;
try {
configManager.loadConfiguration(configObjName.getArtifact());
} catch (NoSuchConfigException e) {
// Should not occur
e.printStackTrace();
} catch (LifecycleException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
java.util.Set parents = depMgr.getParents(configObjName);
for(Iterator itr = parents.iterator(); itr.hasNext(); ) {
AbstractName parent = (AbstractName)itr.next();
details.getParents().add(parent.getArtifact());
}
java.util.Set children = depMgr.getChildren(configObjName);
for(Iterator itr = children.iterator(); itr.hasNext(); ) {
AbstractName child = (AbstractName)itr.next();
//if(configManager.isConfiguration(child.getArtifact()))
if(child.getNameProperty("configurationName") != null) {
details.getChildren().add(child.getArtifact());