String globusJobSubmissionProtocolResourceId)
throws InvalidRequestException, AiravataClientException,
AiravataSystemException, TException {
try {
HostDescription hostDescriptor = getRegistry().getHostDescriptor(globusJobSubmissionProtocolResourceId);
GlobusJobSubmission d = new GlobusJobSubmission();
d.setSecurityProtocol(SecurityProtocol.GSI);
d.setResourceJobManager(ResourceJobManager.PBS);
d.setJobSubmissionDataID(globusJobSubmissionProtocolResourceId);
if (hostDescriptor.getType() instanceof GlobusHostType){
GlobusHostType globusHostType = (GlobusHostType)hostDescriptor.getType();
d.setGlobusGateKeeperEndPoint(Arrays.asList(globusHostType.getGlobusGateKeeperEndPointArray()));
} else {
throw new Exception("Saved job protocol is not Globus");
}
return d;
} catch (Exception e) {