List<ServiceDescription> serviceDescriptors = applicationManager.getAllServiceDescriptions();
for (ServiceDescription serviceDescription : serviceDescriptors) {
String serviceName = serviceDescription.getType().getName();
Map<String,ApplicationDescription> deploymentDescriptions = applicationManager.getApplicationDescriptors(serviceName);
for (String hostName : deploymentDescriptions.keySet()) {
ApplicationDescription descriptionWrap=deploymentDescriptions.get(hostName);
list.add(new ApplicationDeploymentDescriptionWrap(getAiravataAPI(), descriptionWrap, serviceName,hostName));
}
}
}else{
Map<String,ApplicationDescription> deploymentDescriptions = getAiravataAPI().getApplicationManager().getApplicationDescriptors(serviceName);
for (String hostName : deploymentDescriptions.keySet()) {
ApplicationDescription descriptionWrap=deploymentDescriptions.get(hostName);
list.add(new ApplicationDeploymentDescriptionWrap(getAiravataAPI(), descriptionWrap, getServiceName(),hostName));
}
}
return list;
}