public ApplicationInterface getApplicationInterface(
String applicationInterfaceId) throws InvalidRequestException,
AiravataClientException, AiravataSystemException, TException {
try {
ServiceDescription serviceDescriptor = getRegistry().getServiceDescriptor(applicationInterfaceId);
ApplicationInterface applicationInterface = new ApplicationInterface();
applicationInterface.setApplicationInterfaceId(applicationInterfaceId);
applicationInterface.setApplicationInterfaceData(serviceDescriptor.toXML());
Map<String, ApplicationDescription> applicationDescriptors = getRegistry().getApplicationDescriptors(applicationInterfaceId);
for (String hostId : applicationDescriptors.keySet()) {
ApplicationDeployment applicationDeployment = new ApplicationDeployment();
applicationDeployment.setComputeResourceDescription(getComputeResourceDescription(hostId));
ApplicationDescriptor applicationDescriptor = new ApplicationDescriptor();
applicationDescriptor.setApplicationDescriptorId(applicationDescriptors.get(hostId).getType().getApplicationName().getStringValue());
applicationDescriptor.setApplicationDescriptorData(applicationDescriptors.get(hostId).toXML());
applicationDeployment.setApplicationDescriptor(applicationDescriptor);
applicationInterface.addToApplicationDeployments(applicationDeployment);
}
return applicationInterface;
} catch (Exception e) {
e.printStackTrace();
throw new AiravataSystemException();