*/
@GET
@Path(ResourcePathConstants.DecResourcePathConstants.APP_DESC_ALL_DESCRIPTORS)
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public Response getApplicationDescriptors() {
AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
try {
Map<String[], ApplicationDescription> applicationDeploymentDescriptionMap = airavataRegistry.getApplicationDescriptors();
ApplicationDescriptorList applicationDescriptorList = new ApplicationDescriptorList();
ApplicationDescriptor[] applicationDescriptors = new ApplicationDescriptor[applicationDeploymentDescriptionMap.size()];
int i = 0;
for (String[] descriptors : applicationDeploymentDescriptionMap.keySet()) {
ApplicationDescription applicationDescription = applicationDeploymentDescriptionMap.get(descriptors);
ApplicationDescriptor applicationDescriptor = DescriptorUtil.createApplicationDescriptor(applicationDescription);
applicationDescriptor.setHostdescName(descriptors[1]);
ServiceDescription serviceDescription = airavataRegistry.getServiceDescriptor(descriptors[0]);
if (serviceDescription == null) {
Response.ResponseBuilder builder = Response.status(Response.Status.NO_CONTENT);
return builder.build();
}
ServiceDescriptor serviceDescriptor = DescriptorUtil.createServiceDescriptor(serviceDescription);