String gsisshJobSubmissionProtocolResourceId)
throws InvalidRequestException, AiravataClientException,
AiravataSystemException, TException {
try {
HostDescription hostDescriptor = getRegistry().getHostDescriptor(gsisshJobSubmissionProtocolResourceId);
GSISSHJobSubmission d = new GSISSHJobSubmission();
d.setJobSubmissionDataID(gsisshJobSubmissionProtocolResourceId);
if (hostDescriptor.getType() instanceof GsisshHostType){
GsisshHostType gsisshHostType = (GsisshHostType)hostDescriptor.getType();
d.setInstalledPath(gsisshHostType.getInstalledPath());
d.setMonitorMode(gsisshHostType.getMonitorMode());
d.setPostJobCommands(Arrays.asList(gsisshHostType.getPostJobCommandsArray()));
d.setPreJobCommands(Arrays.asList(gsisshHostType.getPreJobCommandsArray()));
d.setSshPort(gsisshHostType.getPort());
d.setResourceJobManager(getResourceJobManager(gsisshHostType.getJobManager()));
} else {
throw new Exception("Saved job protocol is not GSISSH");
}
return d;
} catch (Exception e) {